[PATCH] Make fio_assert() core dump the job
authorJens Axboe <jens.axboe@oracle.com>
Tue, 13 Feb 2007 19:09:10 +0000 (20:09 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 13 Feb 2007 19:09:10 +0000 (20:09 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.h

diff --git a/fio.h b/fio.h
index c15232a214e6919cfae4e43b0ef452c8d5e52cc9..b420db5a20571401cf26ad82aba12935df8946de 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -672,10 +672,11 @@ extern void close_ioengine(struct thread_data *);
 
 #define fio_assert(td, cond)   do {    \
        if (!(cond)) {                  \
+               int *__foo = NULL;      \
                fprintf(stderr, "file:%s:%d, assert %s failed\n", __FILE__, __LINE__, #cond);   \
                (td)->runstate = TD_EXITED;     \
                (td)->error = EFAULT;           \
-               exit(0);                        \
+               *__foo = 0;                     \
        }       \
 } while (0)