X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest.h;h=0cc8f60c51ba15aa48e207c6088bfe4d39b70050;hp=1aa921813bf7af6c433ab1f6e46ebfe6032b91b7;hb=1a0c636bc38213bd0322db47529f78f2dc22ffdd;hpb=c9f915e02c760caffe75da7f9a6a9a1de1bf1747 diff --git a/ccan/failtest/failtest.h b/ccan/failtest/failtest.h index 1aa92181..0cc8f60c 100644 --- a/ccan/failtest/failtest.h +++ b/ccan/failtest/failtest.h @@ -1,5 +1,10 @@ +/* Licensed under LGPL - see LICENSE file for details */ #ifndef CCAN_FAILTEST_H #define CCAN_FAILTEST_H +#include "config.h" +#if HAVE_FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif #include #include #include @@ -195,6 +200,16 @@ extern enum failtest_result extern bool (*failtest_exit_check)(struct failtest_call *history, unsigned num); +/** + * failtest_has_failed - determine if a failure has occurred. + * + * Sometimes you want to exit immediately if you've experienced a failure. + * This is useful when you have four separate tests in your test suite, + * and you don't want to do the next one if you've had a failure in a + * previous one. + */ +extern bool failtest_has_failed(void); + /** * failtest_timeout_ms - how long to wait before killing child. *