GithubHelp home page GithubHelp logo

ykankaya / autoclave Goto Github PK

View Code? Open in Web Editor NEW

This project forked from silentbicycle/autoclave

0.0 2.0 0.0 26 KB

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

Makefile 5.57% C 94.43%

autoclave's Introduction

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

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

autoclave's People

Contributors

hugovk avatar silentbicycle avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.