diff options
author | Sumit Garg <sumit.garg@linaro.org> | 2019-02-21 14:30:10 +0530 |
---|---|---|
committer | Cyril Hrubis <chrubis@suse.cz> | 2019-02-25 14:08:19 +0100 |
commit | 13d518242a0b994a7de48468f568a315d6694b1b (patch) | |
tree | 19c62d50e8c24c211f9ab97b8e50ab3586c5a608 /include | |
parent | 0efad138483496b8e6294cd5c82dec4da7c7e8c9 (diff) |
lib/tst_test: define TEST_VOID() macro
Define TEST_VOID() macro for syscalls whose return type is void like
sync() etc.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/tst_test.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/tst_test.h b/include/tst_test.h index ef7643f8f..da41f776d 100644 --- a/include/tst_test.h +++ b/include/tst_test.h @@ -216,6 +216,13 @@ void tst_reinit(void); TST_ERR = errno; \ } while (0) +#define TEST_VOID(SCALL) \ + do { \ + errno = 0; \ + SCALL; \ + TST_ERR = errno; \ + } while (0) + extern long TST_RET; extern int TST_ERR; |