tst: fsbench: --empty-cache option

This commit is contained in:
Bill Zissimopoulos
2022-04-19 10:21:31 +01:00
parent 4b65871747
commit bda0477a79
4 changed files with 124 additions and 7 deletions

View File

@@ -65,6 +65,23 @@ void tlib_add_test_suite(const char *name, void (*fn)(void));
void tlib_add_test(const char *name, void (*fn)(void));
void tlib_add_test_opt(const char *name, void (*fn)(void));
/**
* Register a test hook to be run before and after every test.
*
* Test hooks are functions with prototype
* <code>void testhook(const char *name, void (*fn)(void), int v)</code>.
* The parameter v specifies that a test is about to be executed (v is +1)
* or it was just executed (v is -1).
*/
#define TESTHOOK(fn)\
do\
{\
void fn(const char *name, void (*fn)(void), int v);\
tlib_add_hook(fn);\
} while (0)
void tlib_add_hook(void (*fn)(const char *name, void (*fn)(void), int v));
/**
* Printf function.
*