mirror of
https://github.com/samba-team/samba.git
synced 2025-02-12 21:58:10 +03:00
torture: add torture_assert_mem_not_equal_goto()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12715 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit f31fd41ca728d664ded940a7309ef1e32383bb66)
This commit is contained in:
parent
cdf3f57176
commit
6b3cc69390
@ -367,6 +367,16 @@ void torture_result(struct torture_context *test,
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define torture_assert_mem_not_equal_goto(torture_ctx,got,expected,len,ret,label,cmt) \
|
||||
do { const void *__got = (got), *__expected = (expected); \
|
||||
if (memcmp(__got, __expected, len) == 0) { \
|
||||
torture_result(torture_ctx, TORTURE_FAIL, \
|
||||
__location__": "#got" of len %d unexpectedly matches "#expected": %s", (int)len, cmt); \
|
||||
ret = false; \
|
||||
goto label; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
|
||||
{
|
||||
char **dump = (char **)private_data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user