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:
parent
d73c0e0d48
commit
87f85350cc
@ -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)) { \
|
||||
|
Loading…
Reference in New Issue
Block a user