diff options
author | Günther Deschner <gd@samba.org> | 2010-03-17 15:32:42 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-03-17 15:43:06 +0100 |
commit | c05a06187d6a9b2f065dfc65112ab5188d2f11b7 (patch) | |
tree | 5c1858d7347d9115cb013300ba50225cc88707f1 | |
parent | d41b8c305342de0795dd49dac588b5c0b8f00bfe (diff) | |
download | samba-c05a06187d6a9b2f065dfc65112ab5188d2f11b7.tar.gz samba-c05a06187d6a9b2f065dfc65112ab5188d2f11b7.tar.bz2 samba-c05a06187d6a9b2f065dfc65112ab5188d2f11b7.zip |
s4-smbtorture: only use "friendly" data in extended SetPrinterDataEx test.
Passes against windows but not against samba yet :-(
Guenther
-rw-r--r-- | source4/torture/rpc/spoolss.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 1f143a3dbc..8e454ea66d 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -3691,6 +3691,7 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, }; enum winreg_Type types[] = { REG_SZ, + REG_MULTI_SZ, REG_DWORD, REG_BINARY }; @@ -3714,12 +3715,20 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, uint32_t ecount; struct spoolss_PrinterEnumValues *einfo; + if (types[t] == REG_DWORD) { + s = 0xffff; + } + switch (types[t]) { case REG_BINARY: - case REG_DWORD: data = blob; offered = blob.length; break; + case REG_DWORD: + data = data_blob_talloc(tctx, NULL, 4); + SIVAL(data.data, 0, 0x12345678); + offered = 4; + break; case REG_SZ: torture_assert(tctx, reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx), @@ -3727,6 +3736,14 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, offered = data.length; /*strlen_m_term(data.string)*2;*/ break; + case REG_MULTI_SZ: + torture_assert(tctx, + reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx), + "REG_SZ", string, &type, &data), ""); + torture_assert(tctx, data_blob_realloc(tctx, &data, data.length + 2), ""); + memset(&data.data[data.length - 2], '\0', 2); + offered = data.length; + break; default: torture_fail(tctx, talloc_asprintf(tctx, "type %d untested\n", types[t])); } |