summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-02-17 11:21:56 +0100
committerGünther Deschner <gd@samba.org>2010-02-17 11:29:37 +0100
commit3a9dc490b459514c2117572824dca3830c3a9951 (patch)
tree6efd588de8ab430af8f6e1d8c727a3b8f7c9c3b0 /source4/torture
parentb32c1e2975bc00ce94e8d02460d98ca3277cf5b6 (diff)
downloadsamba-3a9dc490b459514c2117572824dca3830c3a9951.tar.gz
samba-3a9dc490b459514c2117572824dca3830c3a9951.tar.bz2
samba-3a9dc490b459514c2117572824dca3830c3a9951.zip
s4-smbtorture: unify test list to run against single created printers in RPC-SPOOLSS-PRINTER.
This is to make sure we run the same tests for printers created via AddPrinter and via AddPrinterEx. Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/spoolss.c46
1 files changed, 28 insertions, 18 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 5a603e5412..0c9c076fda 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -4322,6 +4322,32 @@ bool test_printer_keys(struct torture_context *tctx,
return true;
}
+static bool test_one_printer(struct torture_context *tctx,
+ struct dcerpc_pipe *p,
+ struct policy_handle *handle,
+ const char *name)
+{
+ bool ret = true;
+
+ if (!test_printer_info(tctx, p, handle)) {
+ ret = false;
+ }
+
+ if (!test_PrinterInfo_SD(tctx, p, handle)) {
+ ret = false;
+ }
+
+ if (!test_PrinterInfo_DevMode(tctx, p, handle, name)) {
+ ret = false;
+ }
+
+ if (!test_printer_keys(tctx, p, handle)) {
+ ret = false;
+ }
+
+ return ret;
+}
+
static bool test_printer(struct torture_context *tctx,
struct dcerpc_pipe *p)
{
@@ -4337,19 +4363,7 @@ static bool test_printer(struct torture_context *tctx,
return false;
}
- if (!test_printer_info(tctx, p, &handle[0])) {
- ret = false;
- }
-
- if (!test_PrinterInfo_SD(tctx, p, &handle[0])) {
- ret = false;
- }
-
- if (!test_PrinterInfo_DevMode(tctx, p, &handle[0], TORTURE_PRINTER)) {
- ret = false;
- }
-
- if (!test_printer_keys(tctx, p, &handle[0])) {
+ if (!test_one_printer(tctx, p, &handle[0], TORTURE_PRINTER)) {
ret = false;
}
@@ -4370,11 +4384,7 @@ static bool test_printer(struct torture_context *tctx,
return false;
}
- if (!test_printer_info(tctx, p, &handle[1])) {
- ret = false;
- }
-
- if (!test_printer_keys(tctx, p, &handle[1])) {
+ if (!test_one_printer(tctx, p, &handle[1], TORTURE_PRINTER_EX)) {
ret = false;
}