diff options
author | Günther Deschner <gd@samba.org> | 2010-06-29 11:40:24 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-06-29 11:48:53 +0200 |
commit | bf07bf2857517b0972f47f5e9b46b7bde80c041b (patch) | |
tree | 4262cb828f9dfc4366ec0e529114f6f5cc440e98 /source4/torture/ndr | |
parent | ee01fe8c5bd450c82db3f7a7e8c783ac32b0812d (diff) | |
download | samba-bf07bf2857517b0972f47f5e9b46b7bde80c041b.tar.gz samba-bf07bf2857517b0972f47f5e9b46b7bde80c041b.tar.bz2 samba-bf07bf2857517b0972f47f5e9b46b7bde80c041b.zip |
winreg: fix winreg_QueryMultipleValues() IDL and torture tests.
Guenther
Diffstat (limited to 'source4/torture/ndr')
-rw-r--r-- | source4/torture/ndr/winreg.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/source4/torture/ndr/winreg.c b/source4/torture/ndr/winreg.c index 14ee84484a..2bd28f0fb7 100644 --- a/source4/torture/ndr/winreg.c +++ b/source4/torture/ndr/winreg.c @@ -242,14 +242,16 @@ static const uint8_t querymultiplevalues_in_data[] = { static bool querymultiplevalues_in_check(struct torture_context *tctx, struct winreg_QueryMultipleValues *r) { + torture_assert_mem_equal(tctx, r->in.key_handle, querymultiplevalues_in_data, sizeof(struct policy_handle), "key handle"); torture_assert_int_equal(tctx, r->in.num_values, 1, "num values"); - torture_assert_str_equal(tctx, r->in.values[0].name->name, "HOMEPATH", - "name"); - - torture_assert_int_equal(tctx, r->in.values[0].type, 0, "type"); - torture_assert_int_equal(tctx, r->in.values[0].offset, 0, "offset"); - torture_assert_int_equal(tctx, r->in.values[0].length, 0, "length"); - torture_assert_int_equal(tctx, *r->in.buffer_size, 76, "buffer size"); + torture_assert_str_equal(tctx, r->in.values_in[0].ve_valuename->name, "HOMEPATH", "name"); + torture_assert_int_equal(tctx, r->in.values_in[0].ve_valuename->length, 18, "name len"); + torture_assert_int_equal(tctx, r->in.values_in[0].ve_valuename->size, 18, "name size"); + torture_assert_int_equal(tctx, r->in.values_in[0].ve_valuelen, 0, "length"); + torture_assert(tctx, (r->in.values_in[0].ve_valueptr == NULL), "ve_valueptr"); + torture_assert_int_equal(tctx, r->in.values_in[0].ve_type, 0, "type"); + torture_assert_mem_equal(tctx, r->in.buffer, querymultiplevalues_in_data+0x6C, *r->in.buffer_size, "buffer"); + torture_assert_int_equal(tctx, *r->in.buffer_size, 32, "buffer size"); return true; } @@ -274,16 +276,12 @@ static const uint8_t querymultiplevalues_out_data[] = { static bool querymultiplevalues_out_check(struct torture_context *tctx, struct winreg_QueryMultipleValues *r) { - torture_assert_str_equal(tctx, r->out.values[0].name->name, "HOMEPATH", - "name"); - - torture_assert_int_equal(tctx, r->out.values[0].type, 0, "type"); - torture_assert_int_equal(tctx, r->out.values[0].offset, 0, "offset"); - torture_assert_int_equal(tctx, r->out.values[0].length, 0, "length"); + torture_assert_str_equal(tctx, r->out.values_out[0].ve_valuename->name, "HOMEPATH", "name"); + torture_assert_int_equal(tctx, r->out.values_out[0].ve_type, 0, "type"); + torture_assert_int_equal(tctx, r->out.values_out[0].ve_valuelen, 0, "length"); /* FIXME: r->out.buffer */ torture_assert_int_equal(tctx, *r->out.buffer_size, 76, "buffer size"); - torture_assert_werr_equal(tctx, r->out.result, WERR_MORE_DATA, - "return code"); + torture_assert_werr_equal(tctx, r->out.result, WERR_MORE_DATA, "return code"); return true; } @@ -543,8 +541,10 @@ struct torture_suite *ndr_winreg_suite(TALLOC_CTX *ctx) torture_suite_add_ndr_pull_fn_test(suite, winreg_QueryValue, queryvalue_in_data, NDR_IN, queryvalue_in_check ); torture_suite_add_ndr_pull_fn_test(suite, winreg_QueryValue, queryvalue_out_data, NDR_OUT, queryvalue_out_check ); - /*torture_suite_add_ndr_pull_fn_test(suite, winreg_QueryMultipleValues, querymultiplevalues_in_data, NDR_IN, querymultiplevalues_in_check ); - torture_suite_add_ndr_pull_fn_test(suite, winreg_QueryMultipleValues, querymultiplevalues_out_data, NDR_OUT, querymultiplevalues_out_check );*/ + torture_suite_add_ndr_pull_fn_test(suite, winreg_QueryMultipleValues, querymultiplevalues_in_data, NDR_IN, querymultiplevalues_in_check ); + /* we cannot do this as long we don't have the ability to bring in + * r->in.num_values */ +/* torture_suite_add_ndr_pull_fn_test(suite, winreg_QueryMultipleValues, querymultiplevalues_out_data, NDR_OUT, querymultiplevalues_out_check ); */ torture_suite_add_ndr_pull_fn_test(suite, winreg_FlushKey, flushkey_in_data, NDR_IN, flushkey_in_check ); torture_suite_add_ndr_pull_fn_test(suite, winreg_FlushKey, flushkey_out_data, NDR_OUT, flushkey_out_check ); |