torture/spoolss: issue GetJob after StartDocPrinter
authorDavid Disseldorp <ddiss@samba.org>
Wed, 3 Dec 2014 17:44:37 +0000 (18:44 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 19 Dec 2014 17:03:20 +0000 (18:03 +0100)
This reflects Windows XP spoolss client behaviour. This fails if the job
is not yet instantiated on the server, and prior to the bso#10984 fix
resulted in an unsable DCERPC pipe.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Dec 19 18:03:20 CET 2014 on sn-devel-104

source4/torture/rpc/spoolss.c

index 20e86fc16a733523fdf5ca490a6bba8e8fc93957..23f501d7401802021f4f663ef1567a04ccde1cd1 100644 (file)
@@ -3446,6 +3446,9 @@ static bool test_DoPrintTest_add_one_job_common(struct torture_context *tctx,
        torture_assert_werr_ok(tctx, s.out.result, "StartDocPrinter failed");
 
        for (i=1; i < 4; i++) {
+               union spoolss_JobInfo ginfo;
+               bool ok;
+
                torture_comment(tctx, "Testing StartPagePrinter: Page[%d], JobId[%d]\n", i, *job_id);
 
                sp.in.handle            = handle;
@@ -3455,6 +3458,11 @@ static bool test_DoPrintTest_add_one_job_common(struct torture_context *tctx,
                                           "dcerpc_spoolss_StartPagePrinter failed");
                torture_assert_werr_ok(tctx, sp.out.result, "StartPagePrinter failed");
 
+               ok = test_GetJob_args(tctx, b, handle, *job_id, 1, &ginfo);
+               if (!ok) {
+                       torture_comment(tctx, "test_GetJob failed for JobId[%d]\n", *job_id);
+               }
+
                torture_comment(tctx, "Testing WritePrinter: Page[%d], JobId[%d]\n", i, *job_id);
 
                w.in.handle             = handle;