diff options
author | dzwdz | 2022-10-18 18:39:14 +0200 |
---|---|---|
committer | dzwdz | 2022-10-18 18:39:14 +0200 |
commit | 6bb22b0a144646788f8c14bce1bde147693da780 (patch) | |
tree | 8c498167dcf9aeeab7552d7780dcf47d233672b6 /src/user/app/tests/tests.h | |
parent | b3f0606f7d206f355647f5c266aadea137e93429 (diff) |
user/tests: more info when a test crashes
Diffstat (limited to 'src/user/app/tests/tests.h')
-rw-r--r-- | src/user/app/tests/tests.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/user/app/tests/tests.h b/src/user/app/tests/tests.h index e9b06e5..e93653e 100644 --- a/src/user/app/tests/tests.h +++ b/src/user/app/tests/tests.h @@ -29,4 +29,9 @@ int forkpipe(FILE **f, handle_t *h); fflush(fail_trig); \ exit(0); \ } while (0) +#define test_failf(fmt, ...) do { \ + fprintf(fail_trig, "%s():%u " fmt, __func__, __LINE__, __VA_ARGS__); \ + fflush(fail_trig); \ + exit(0); \ +} while (0) #define test(cond) if (!(cond)) test_fail(); |