aboutsummaryrefslogtreecommitdiff
path: root/tests/ubi-tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ubi-tests')
-rw-r--r--tests/ubi-tests/common.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/ubi-tests/common.h b/tests/ubi-tests/common.h
index 3821098..86357cb 100644
--- a/tests/ubi-tests/common.h
+++ b/tests/ubi-tests/common.h
@@ -35,11 +35,15 @@ extern "C" {
#define min(a, b) ((a) < (b) ? (a) : (b))
-#define errmsg(fmt, ...) \
- __errmsg(TESTNAME, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)
+#define errmsg(fmt, ...) ({ \
+ __errmsg(TESTNAME, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__); \
+ -1; \
+})
-#define failed(name) \
- __failed(TESTNAME, __FUNCTION__, __LINE__, name)
+#define failed(name) ({ \
+ __failed(TESTNAME, __FUNCTION__, __LINE__, name); \
+ -1; \
+})
#define initial_check(argc, argv) \
__initial_check(TESTNAME, argc, argv)