diff mbox series

[v4,3/9] lib/tst_test: define TEST_VOID() macro

Message ID 1550739616-24054-4-git-send-email-sumit.garg@linaro.org
State Accepted
Commit 13d518242a0b994a7de48468f568a315d6694b1b
Headers show
Series syscalls: add sync device test-cases | expand

Commit Message

Sumit Garg Feb. 21, 2019, 9 a.m. UTC
Define TEST_VOID() macro for syscalls whose return type is void like
sync() etc.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
---
 include/tst_test.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/include/tst_test.h b/include/tst_test.h
index 12dda2e..03c88e3 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;