1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

lib/torture: add torture_assert_nttime_equal_goto()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15656

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Stefan Metzmacher 2024-07-30 13:57:25 +02:00 committed by Volker Lendecke
parent d73c0e0d48
commit 87f85350cc

View File

@ -771,6 +771,15 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
}\
} while(0)
#define torture_assert_nttime_equal_goto(torture_ctx,got,expected,ret,label,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(torture_ctx, __got), nt_time_string(torture_ctx, __expected), cmt); \
ret = false; \
goto label; \
}\
} while(0)
#define torture_assert_sid_equal(torture_ctx,got,expected,cmt)\
do {const struct dom_sid *__got = (got), *__expected = (expected); \
if (!dom_sid_equal(__got, __expected)) { \