]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4-smbtorture: move test_ReplyOpenPrinter from RPC-SPOOLSS to RPC-SPOOLSS-NOTIFY.
authorGünther Deschner <gd@samba.org>
Mon, 13 Apr 2009 15:05:12 +0000 (17:05 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 13 Apr 2009 21:45:29 +0000 (23:45 +0200)
Guenther

source4/torture/rpc/spoolss.c
source4/torture/rpc/spoolss_notify.c

index f2a503b6fdf9b3a0190ff8ec7fb3598e5c5a9b16..6c78cf3cc2e0b063ec774cad0d2ea6015b2dd889 100644 (file)
@@ -1941,41 +1941,6 @@ static bool test_EnumPrinterDrivers_old(struct torture_context *tctx,
        return true;
 }
 
-/** Test that makes sure that calling ReplyOpenPrinter()
- * on Samba 4 will cause an irpc broadcast call.
- */
-static bool test_ReplyOpenPrinter(struct torture_context *tctx, 
-                                 struct dcerpc_pipe *pipe)
-{
-       struct spoolss_ReplyOpenPrinter r;
-       struct spoolss_ReplyClosePrinter s;
-       struct policy_handle h;
-
-       r.in.server_name = "earth";
-       r.in.printer_local = 2;
-       r.in.type = REG_DWORD;
-       r.in.bufsize = 0;
-       r.in.buffer = NULL;
-       r.out.handle = &h;
-
-       torture_assert_ntstatus_ok(tctx, 
-                       dcerpc_spoolss_ReplyOpenPrinter(pipe, tctx, &r),
-                       "spoolss_ReplyOpenPrinter call failed");
-
-       torture_assert_werr_ok(tctx, r.out.result, "error return code");
-
-       s.in.handle = &h;
-       s.out.handle = &h;
-
-       torture_assert_ntstatus_ok(tctx,
-                       dcerpc_spoolss_ReplyClosePrinter(pipe, tctx, &s),
-                       "spoolss_ReplyClosePrinter call failed");
-
-       torture_assert_werr_ok(tctx, r.out.result, "error return code");
-
-       return true;
-}
-
 bool torture_rpc_spoolss(struct torture_context *torture)
 {
        NTSTATUS status;
@@ -2029,7 +1994,6 @@ bool torture_rpc_spoolss(struct torture_context *torture)
        ret &= test_EnumPorts_old(torture, p);
        ret &= test_EnumPrinters_old(torture, p);
        ret &= test_EnumPrinterDrivers_old(torture, p);
-       ret &= test_ReplyOpenPrinter(torture, p);
 
        return ret;
 }
index b7f2d3c4101b64b9262b947f10811082d8f586f0..a8a0ca5df63de26f97e4f1675ab339ef44f6e560 100644 (file)
@@ -289,6 +289,41 @@ static bool test_RFFPCNEx(struct torture_context *tctx,
        return true;
 }
 
+/** Test that makes sure that calling ReplyOpenPrinter()
+ * on Samba 4 will cause an irpc broadcast call.
+ */
+static bool test_ReplyOpenPrinter(struct torture_context *tctx,
+                                 struct dcerpc_pipe *pipe)
+{
+       struct spoolss_ReplyOpenPrinter r;
+       struct spoolss_ReplyClosePrinter s;
+       struct policy_handle h;
+
+       r.in.server_name = "earth";
+       r.in.printer_local = 2;
+       r.in.type = REG_DWORD;
+       r.in.bufsize = 0;
+       r.in.buffer = NULL;
+       r.out.handle = &h;
+
+       torture_assert_ntstatus_ok(tctx,
+                       dcerpc_spoolss_ReplyOpenPrinter(pipe, tctx, &r),
+                       "spoolss_ReplyOpenPrinter call failed");
+
+       torture_assert_werr_ok(tctx, r.out.result, "error return code");
+
+       s.in.handle = &h;
+       s.out.handle = &h;
+
+       torture_assert_ntstatus_ok(tctx,
+                       dcerpc_spoolss_ReplyClosePrinter(pipe, tctx, &s),
+                       "spoolss_ReplyClosePrinter call failed");
+
+       torture_assert_werr_ok(tctx, r.out.result, "error return code");
+
+       return true;
+}
+
 struct torture_suite *torture_rpc_spoolss_notify(TALLOC_CTX *mem_ctx)
 {
        struct torture_suite *suite = torture_suite_create(mem_ctx, "SPOOLSS-NOTIFY");
@@ -297,6 +332,7 @@ struct torture_suite *torture_rpc_spoolss_notify(TALLOC_CTX *mem_ctx)
                                                        "notify", &ndr_table_spoolss);
 
        torture_rpc_tcase_add_test(tcase, "testRFFPCNEx", test_RFFPCNEx);
+       torture_rpc_tcase_add_test(tcase, "testReplyOpenPrinter", test_ReplyOpenPrinter);
        
        return suite;
 }