[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha3-246-g43fc10a
Andrew Bartlett
abartlet at samba.org
Thu Apr 17 16:45:32 GMT 2008
The branch, v4-0-test has been updated
via 43fc10aaa7c3d50cb9fee5ecab859103aec4a62e (commit)
via b26662be196a84237543eb90d6e08809489df3a9 (commit)
via ba6546504505f19abaa5aa35fe3e469ddfd3d619 (commit)
via 500544f4127d4042ab5ea8e3800156246982c297 (commit)
from c73a3b837ec16fbb846c6e63a45599fca99b3d0b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit 43fc10aaa7c3d50cb9fee5ecab859103aec4a62e
Merge: b26662be196a84237543eb90d6e08809489df3a9 c73a3b837ec16fbb846c6e63a45599fca99b3d0b
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 17 18:44:48 2008 +0200
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
commit b26662be196a84237543eb90d6e08809489df3a9
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 17 18:40:56 2008 +0200
More endian fixes in the registry
commit ba6546504505f19abaa5aa35fe3e469ddfd3d619
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 17 16:44:55 2008 +0200
Fix typo
commit 500544f4127d4042ab5ea8e3800156246982c297
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Apr 17 16:38:53 2008 +0200
More work to avoid endian bugs in registry tests.
Andrew Bartlett
-----------------------------------------------------------------------
Summary of changes:
source/lib/registry/tests/registry.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/registry/tests/registry.c b/source/lib/registry/tests/registry.c
index ac81282..661d7c2 100644
--- a/source/lib/registry/tests/registry.c
+++ b/source/lib/registry/tests/registry.c
@@ -431,9 +431,9 @@ static bool test_get_value(struct torture_context *tctx, void *_data)
&data);
torture_assert_werr_ok(tctx, error, "getting value");
- torture_assert_int_equal(tctx, 4, data.length, "value length ok");
- torture_assert_mem_equal(tctx, data.data, value, 4,
- "value content ok");
+ torture_assert_int_equal(tctx, sizeof(value), data.length, "value length ok");
+ torture_assert_mem_equal(tctx, data.data, value, sizeof(value),
+ "value content ok");
torture_assert_int_equal(tctx, REG_DWORD, type, "value type");
return true;
@@ -448,8 +448,9 @@ static bool test_del_value(struct torture_context *tctx, void *_data)
struct registry_key *subkey = NULL, *root;
WERROR error;
DATA_BLOB data;
- uint32_t value = 42;
uint32_t type;
+ char value[4];
+ SIVAL(value, 0, 42);
if (!create_test_key(tctx, rctx, "Warschau", &root, &subkey))
return false;
@@ -460,7 +461,7 @@ static bool test_del_value(struct torture_context *tctx, void *_data)
"getting missing value");
error = reg_val_set(subkey, __FUNCTION__, REG_DWORD,
- data_blob_talloc(tctx, &value, 4));
+ data_blob_talloc(tctx, value, sizeof(value)));
torture_assert_werr_ok (tctx, error, "setting value");
error = reg_del_value(subkey, __FUNCTION__);
@@ -483,15 +484,16 @@ static bool test_list_values(struct torture_context *tctx, void *_data)
struct registry_key *subkey = NULL, *root;
WERROR error;
DATA_BLOB data;
- uint32_t value = 42;
uint32_t type;
const char *name;
+ char value[4];
+ SIVAL(value, 0, 42);
if (!create_test_key(tctx, rctx, "Bonn", &root, &subkey))
return false;
error = reg_val_set(subkey, "bar", REG_DWORD,
- data_blob_talloc(tctx, &value, 4));
+ data_blob_talloc(tctx, value, sizeof(value)));
torture_assert_werr_ok (tctx, error, "setting value");
error = reg_key_get_value_by_index(tctx, subkey, 0, &name,
@@ -499,8 +501,8 @@ static bool test_list_values(struct torture_context *tctx, void *_data)
torture_assert_werr_ok(tctx, error, "getting value");
torture_assert_str_equal(tctx, name, "bar", "value name");
- torture_assert_int_equal(tctx, 4, data.length, "value length");
- torture_assert_mem_equal(tctx, data.data, &value, 4,
+ torture_assert_int_equal(tctx, sizeof(value), data.length, "value length");
+ torture_assert_mem_equal(tctx, data.data, value, sizeof(value),
"value content");
torture_assert_int_equal(tctx, REG_DWORD, type, "value type");
--
Samba Shared Repository
More information about the samba-cvs
mailing list