summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-16 00:01:16 +0100
committerGünther Deschner <gd@samba.org>2010-03-16 10:43:57 +0100
commit4379b082b80e4976120860310259248eea09f863 (patch)
tree3a3e8366f6f7e4aa4d5ed7870235a8fa5253eece /source4/torture/rpc
parentd7de3fa799fa64a3463765b3f6159fccda581b0c (diff)
downloadsamba-4379b082b80e4976120860310259248eea09f863.tar.gz
samba-4379b082b80e4976120860310259248eea09f863.tar.bz2
samba-4379b082b80e4976120860310259248eea09f863.zip
s3-spoolss: be very strict on OpenPrinter{Ex} failures for bad names.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/spoolss.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 728ecd1089..7ce0a7ccff 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -4047,10 +4047,8 @@ static bool test_OpenPrinter_badname(struct torture_context *tctx,
status = dcerpc_spoolss_OpenPrinter(p, tctx, &op);
torture_assert_ntstatus_ok(tctx, status, "OpenPrinter failed");
- if (!W_ERROR_EQUAL(WERR_INVALID_PRINTER_NAME,op.out.result)) {
- torture_comment(tctx, "OpenPrinter(%s) unexpected result[%s] should be WERR_INVALID_PRINTER_NAME\n",
- name, win_errstr(op.out.result));
- }
+ torture_assert_werr_equal(tctx, op.out.result, WERR_INVALID_PRINTER_NAME,
+ "unexpected result");
if (W_ERROR_IS_OK(op.out.result)) {
ret &=test_ClosePrinter(tctx, p, &handle);
@@ -4068,10 +4066,8 @@ static bool test_OpenPrinter_badname(struct torture_context *tctx,
status = dcerpc_spoolss_OpenPrinterEx(p, tctx, &opEx);
torture_assert_ntstatus_ok(tctx, status, "OpenPrinterEx failed");
- if (!W_ERROR_EQUAL(WERR_INVALID_PARAM,opEx.out.result)) {
- torture_comment(tctx, "OpenPrinterEx(%s) unexpected result[%s] should be WERR_INVALID_PARAM\n",
- name, win_errstr(opEx.out.result));
- }
+ torture_assert_werr_equal(tctx, opEx.out.result, WERR_INVALID_PARAM,
+ "unexpected result");
if (W_ERROR_IS_OK(opEx.out.result)) {
ret &=test_ClosePrinter(tctx, p, &handle);