bool torture_run_suite(struct torture_context *context,
struct torture_suite *suite);
+/* Run the specified testsuite recursively, but only the specified
+ * tests */
+bool torture_run_suite_restricted(struct torture_context *context,
+ struct torture_suite *suite, char **restricted);
+
/* Run the specified testcase */
bool torture_run_tcase(struct torture_context *context,
struct torture_tcase *tcase);
return false; \
}
+#define torture_assert_goto(torture_ctx,expr,ret,label,cmt) \
+ if (!(expr)) { \
+ torture_result(torture_ctx, TORTURE_FAIL, __location__": Expression `%s' failed: %s", __STRING(expr), cmt); \
+ ret = false; \
+ goto label; \
+ }
+
#define torture_assert_werr_equal(torture_ctx, got, expected, cmt) \
do { WERROR __got = got, __expected = expected; \
if (!W_ERROR_EQUAL(__got, __expected)) { \
do { int __got = (got), __expected = (expected); \
if (__got != __expected) { \
torture_result(torture_ctx, TORTURE_FAIL, \
- __location__": "#got" was %d, expected %d: %s", \
- __got, __expected, cmt); \
+ __location__": "#got" was %d (0x%X), expected %d (0x%X): %s", \
+ __got, __got, __expected, __expected, cmt); \
return false; \
} \
} while(0)
do { int __got = (got), __expected = (expected); \
if (__got != __expected) { \
torture_result(torture_ctx, TORTURE_FAIL, \
- __location__": "#got" was %d, expected %d: %s", \
- __got, __expected, cmt); \
+ __location__": "#got" was %d (0x%X), expected %d (0x%X): %s", \
+ __got, __got, __expected, __expected, cmt); \
ret = false; \
goto label; \
} \
do { uint64_t __got = (got), __expected = (expected); \
if (__got != __expected) { \
torture_result(torture_ctx, TORTURE_FAIL, \
- __location__": "#got" was %llu, expected %llu: %s", \
- (unsigned long long)__got, (unsigned long long)__expected, cmt); \
+ __location__": "#got" was %llu (0x%llX), expected %llu (0x%llX): %s", \
+ (unsigned long long)__got, (unsigned long long)__got, \
+ (unsigned long long)__expected, (unsigned long long)__expected, \
+ cmt); \
return false; \
} \
} while(0)