1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Attempt to fix get_value() test on sparc machines.

(This used to be commit 10102d80d0)
This commit is contained in:
Jelmer Vernooij 2008-04-13 21:31:06 +02:00
parent 8ed6f6d5a8
commit 225a65da2d
2 changed files with 10 additions and 1 deletions

View File

@ -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;

View File

@ -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; \