summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/torture/torture.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index 39f83df4e4..00de5e8efc 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -450,7 +450,13 @@ void torture_result(struct torture_context *test,
} \
} while(0)
-
+#define torture_assert_nttime_equal(torture_ctx,got,expected,cmt) \
+ do { NTTIME __got = got, __expected = expected; \
+ if (!nt_time_equal(&__got, &__expected)) { \
+ torture_result(torture_ctx, TORTURE_FAIL, __location__": "#got" was %s, expected %s: %s", nt_time_string(tctx, __got), nt_time_string(tctx, __expected), cmt); \
+ return false; \
+ }\
+ } while(0)
#define torture_skip(torture_ctx,cmt) do {\
torture_result(torture_ctx, TORTURE_SKIP, __location__": %s", cmt);\