• Stars
    star
    188
  • Rank 205,563 (Top 5 %)
  • Language
    C
  • Created almost 10 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

repeatedly run programs until they break, and be ready to attach a debugger

autoclave: a pressure cooker for programs

Summary

autoclave repeatedly executes a command line until its process exits with a non-zero status, is stopped/terminated by a signal, a user-specified timeout (-t) runs out, or a user-specified number of runs (-r) have passed without any failures.

It can log the contents of stdout (-l) and/or stderr (-e), and can rotate the log files so a fixed number of logs are kept (-c).

On failure, a handler program (-x) can be called with information about the child process. That way, a debugger can be opened if the stressed program times out or dumps core. For particularly long-running stress tests, the handler may also be a great place to send a notification.

For more detailed usage info, see the examples below the man page, and this blog post.

Examples

Repeatedly run buggy_program until it crashes:

$ autoclave buggy_program

Same, but print run and failure counts:

$ autoclave -v buggy_program

Same, but if it succeeds 10 times, return EXIT_SUCCESS:

$ autoclave -v -r 10 buggy_program

Same, but ensure there is at least 500 mesc between runs, sleeping if necessary:

$ autoclave -v -r 10 -m 500 buggy_program

Run without any delay:

$ autoclave -v -r 10 -m 0 buggy_program

Repeatedly run buggy_program, logging stdout to buggy_program.1.stdout.log, buggy_program.2.stdout.log, and so on:

$ autoclave -l buggy_program

Same, but log to /tmp/buggy.ID.stdout.log instead:

$ autoclave -l -o /tmp/buggy buggy_program

Log, but only keep the 5 most recent log files:

$ autoclave -l -c 5 buggy_program

Same, but log stderr as well as stdout (keeping 10 files):

$ autoclave -l -e -c 5 buggy_program

A shortcut for autoclave -l -e -v ('s' for 'supervise'):

$ autoclave -s buggy_program

Repeatedly run buggy_program until it has failed 10 times:

$ autoclave -f 10 buggy_program

Run a program that occasionally deadlocks, halting it and counting it as a failure if it takes more than 10 seconds to complete:

$ autoclave -t 10  examples/deadlock_example

Same, but run the script examples/gdb_it when it times out, so gdb can attach to the stopped process and investigate what is deadlocking. (Note: the process is not halted after the -x command returns.)

$ autoclave -t 10 -x examples/gdb_it examples/deadlock_example

Run examples/crash_example, calling examples/gdb_it if it fails:

$ autoclave -x examples/gdb_it examples/crash_example

More Repositories

1

greatest

A C testing library in 1 file. No dependencies, no dynamic allocation. ISC licensed.
C
1,467
star
2

theft

property-based testing for C: generate input to find obscure bugs, then reduce to minimal failing input
C
609
star
3

guff

a plot device
C
275
star
4

ff

fuzzy-completion for finding files
C
157
star
5

tamale

TAble MAtching Lua Extension - An Erlang-style pattern-matching library for Lua
Lua
146
star
6

socket99

Wrapper library for the BSD sockets API with a nicer C99 interface
C
142
star
7

lunatest

xUnit-style + randomized unit testing framework for Lua (and C projects using Lua, etc.)
Lua
83
star
8

sample

filter for random sampling of input
C
69
star
9

tangram

Jumprope-based local content store
Lua
56
star
10

skiplist

skiplist library for C.
C
54
star
11

mpool

memory pool allocator
C
47
star
12

loom

a lock-less thread pool for C99
C
43
star
13

wn

"what next?" - simple command-line task-interdependency tracker
Lua
42
star
14

curlbash

locally save and checksum/review before curl | bash-ing installers
Shell
36
star
15

spooky

C library for OOK Manchester encoding, decoding, and dynamic clock recovery
C
33
star
16

parade

run multiple shell commands in parallel and coordinate their output
C
32
star
17

lua-ukanren

Lua port of of microKanren, a minimal logic programming engine.
Lua
31
star
18

glean

lightweight search engine for local text docs
C
29
star
19

oscar

mark/sweep garbage collector for C
C
28
star
20

sidereal

Redis library for Lua, with optional non-blocking mode and Lua-style lists & sets.
Lua
27
star
21

markdown_to_reveal

minimal plumbing to convert slides in markdown to reveal.js presentations via pandoc
CSS
27
star
22

skiparray

unrolled skip list library for C
C
21
star
23

lua-memcached

A Lua client for memcached, with optional non-blocking mode.
Lua
21
star
24

skel

tiny command-line skeleton/snippet thing
C
21
star
25

hashchop

C library to deterministically chunk byte streams with a rolling hash
C
20
star
26

lua-sqlite

wrapper for sqlite3
C
19
star
27

lua-bdd

Binary decision diagram library (Lua)
Lua
17
star
28

ansible_thinkpad

Example Ansible-based setup for a 6th gen. Thinkpad X1 Carbon
Shell
16
star
29

lua-mpd

A Lua client library for mpd.
Lua
15
star
30

mqtt_demo

example using mosquitto MQTT client library
C
15
star
31

bluebottle

C library for bit-banging async serial communication (UARTs)
C
12
star
32

hopscotch

An implementation of Tarjan's Strongly Connected Components algorithm
C
12
star
33

GPL_v-3

GPL, version -3
11
star
34

zwiebel

A simple work/break interval timer for Emacs
Emacs Lisp
9
star
35

lua-bcrypt

bcrypt wrapper for Lua
Lua
9
star
36

lookup

Search for a file in parent directories, up to / .
C
7
star
37

denv

setenv via files in directory (standalone envdir clone)
C
6
star
38

motorcycle-el

motorcycle animation for the emacs modeline
Emacs Lisp
5
star
39

one_weird_C_trick

weird c vararg function pointer trick
C
5
star
40

idlewait

suspend execution until system load is low (with optional timeout)
C
5
star
41

ministat

quick adaptation of PHK's FreeBSD ministat for OpenBSD
C
5
star
42

slides-completing_the_circuit

slides: "Completing the Circuit: From Arduino to General Embedded Hardware"
CSS
5
star
43

lua-ev

libev wrapper for Lua, including most watchers
C
4
star
44

lua-endhook

Lua library to run a hook after the main script is read
Lua
4
star
45

git-nethack

git-nethack, so you can hack while you hack
Shell
3
star
46

wifi

simple OpenBSD wifi network auth manager script
3
star
47

lua-xosd

XOSD wrapper for Lua
C
3
star
48

rollavg

rolling average of file stream
C
3
star
49

presentation-Configuring_a_laptop_with_Ansible

Slides for DevOps West Michigan - "Configuring a Laptop with Ansible"
CSS
3
star
50

study-grade_up

a study in sorting stable algorithms for an APL-style grade-up operation
C
2
star
51

callaloo_web

Minimal web server for publishing current callaloo MQTT events
C
2
star
52

betwixt

Python impl. of the Burrows-Wheeler Transform for my !!Con 2015 talk
Python
1
star
53

presentation-write-a-parser-today

slides for "Write a parser today!" presentation
1
star