From 0e3069186186ffed24269968d75c8f007900fd95 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 10 Oct 2007 14:12:25 +0200 Subject: r25613: verify the length and type before checking the value, hopefully gives more info why this fails some bigendian platforms metze (This used to be commit 1d2bc79aa5841bbdbaf003005a161bbf294c7366) --- source4/lib/registry/tests/hive.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c index 9e76ce6aa1..2ddfe6f036 100644 --- a/source4/lib/registry/tests/hive.c +++ b/source4/lib/registry/tests/hive.c @@ -187,10 +187,9 @@ static bool test_get_value(struct torture_context *tctx, const void *test_data) error = hive_get_value(mem_ctx, subkey, "Answer", &type, &value); torture_assert_werr_ok(tctx, error, "getting value"); - torture_assert(tctx, memcmp(value.data, &data, 4) == 0, "value data"); - torture_assert_int_equal(tctx, value.length, 4, "value length"); torture_assert_int_equal(tctx, type, REG_DWORD, "value type"); + torture_assert(tctx, memcmp(value.data, &data, 4) == 0, "value data"); return true; } @@ -251,10 +250,10 @@ static bool test_list_values(struct torture_context *tctx, torture_assert_werr_ok(tctx, error, "getting value"); torture_assert_str_equal(tctx, name, "Answer", "value name"); - torture_assert(tctx, memcmp(value.data, &data, 4) == 0, "value data"); torture_assert_int_equal(tctx, value.length, 4, "value length"); torture_assert_int_equal(tctx, type, REG_DWORD, "value type"); + torture_assert(tctx, memcmp(value.data, &data, 4) == 0, "value data"); error = hive_get_value_by_index(mem_ctx, subkey, 1, &name, &type, &value); -- cgit