summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-06-01 16:46:37 +0200
committerGünther Deschner <gd@samba.org>2010-06-01 16:49:24 +0200
commit582847412a1f4d7d971b96551cd07ff738e9ff82 (patch)
treee9c6a542d7a9ac77fef0658dd826596e2091bbd3 /source4/torture
parentfc9644a7d6bbf4f02c5cb1ce9fc5b3f3ddb66d2a (diff)
downloadsamba-582847412a1f4d7d971b96551cd07ff738e9ff82.tar.gz
samba-582847412a1f4d7d971b96551cd07ff738e9ff82.tar.bz2
samba-582847412a1f4d7d971b96551cd07ff738e9ff82.zip
s4-smbtorture: Make sure RPC-SPOOLSS and RPC-SPOOLSS-PRINTER pass against s3.
Printjobs are extremely fragile beasts on paused virtual printers within make test. Very often the printq updater in the background is not fast enough, so subsequent tests don't get to the updated information. Something to remember and to work on later... Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/spoolss.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index d5b0f0ea77..233d6e7ec8 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -3258,6 +3258,35 @@ static bool test_DoPrintTest(struct torture_context *tctx,
uint32_t *job_ids;
int i;
+ torture_comment(tctx, "Testing real print operations\n");
+
+ job_ids = talloc_zero_array(tctx, uint32_t, num_jobs);
+
+ for (i=0; i < num_jobs; i++) {
+ ret &= test_DoPrintTest_add_one_job(tctx, b, handle, &job_ids[i]);
+ }
+
+ for (i=0; i < num_jobs; i++) {
+ ret &= test_SetJob(tctx, b, handle, job_ids[i], NULL, SPOOLSS_JOB_CONTROL_DELETE);
+ }
+
+ if (ret == true) {
+ torture_comment(tctx, "real print operations test succeeded\n\n");
+ }
+
+ return ret;
+}
+
+static bool test_DoPrintTest_extended(struct torture_context *tctx,
+ struct dcerpc_binding_handle *b,
+ struct policy_handle *handle)
+{
+ bool ret = true;
+ uint32_t num_jobs = 8;
+ uint32_t *job_ids;
+ int i;
+ torture_comment(tctx, "Testing real print operations (extended)\n");
+
job_ids = talloc_zero_array(tctx, uint32_t, num_jobs);
for (i=0; i < num_jobs; i++) {
@@ -3270,6 +3299,10 @@ static bool test_DoPrintTest(struct torture_context *tctx,
ret &= test_SetJob(tctx, b, handle, job_ids[i], NULL, SPOOLSS_JOB_CONTROL_DELETE);
}
+ if (ret == true) {
+ torture_comment(tctx, "real print operations (extended) test succeeded\n\n");
+ }
+
return ret;
}
@@ -6347,6 +6380,10 @@ static bool test_one_printer(struct torture_context *tctx,
ret = false;
}
+ if (!test_DoPrintTest_extended(tctx, b, handle)) {
+ torture_comment(tctx, "extended printing test failed!\n");
+ }
+
if (!test_ResumePrinter(tctx, b, handle)) {
ret = false;
}