mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
Attempt to fix get_value() test on sparc machines.
(This used to be commit 10102d80d0
)
This commit is contained in:
parent
8ed6f6d5a8
commit
225a65da2d
@ -220,7 +220,7 @@ static bool test_get_value(struct torture_context *tctx, const void *test_data)
|
||||
torture_assert_int_equal(tctx, value.length, 4, "value length");
|
||||
torture_assert_int_equal(tctx, type, REG_DWORD, "value type");
|
||||
|
||||
torture_assert_int_equal(tctx, data, IVAL(value.data, 0),
|
||||
torture_assert_mem_equal(tctx, &data, value.data, sizeof(uint32_t),
|
||||
"value data");
|
||||
|
||||
return true;
|
||||
|
@ -253,6 +253,15 @@ void torture_result(struct torture_context *test,
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define torture_assert_mem_equal(torture_ctx,got,expected,len,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 did not match"#expected": %s", len, cmt); \
|
||||
return false; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define torture_assert_file_contains_text(torture_ctx,filename,expected,cmt)\
|
||||
do { \
|
||||
char *__got; \
|
||||
|
Loading…
Reference in New Issue
Block a user