The Samba-Bugzilla – Attachment 10665 Details for
Bug 10808
Job missing when the queue is paused
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
simple smbtorture reproducer - don't commit
0001-XXX-don-t-commit-bso10808-reproducer.patch (text/plain), 3.05 KB, created by
David Disseldorp
on 2015-01-26 14:23:38 UTC
(
hide
)
Description:
simple smbtorture reproducer - don't commit
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2015-01-26 14:23:38 UTC
Size:
3.05 KB
patch
obsolete
>From c41a9c4db9c0b5ee55128ec50c40fa65461a59b9 Mon Sep 17 00:00:00 2001 >From: David Disseldorp <ddiss@samba.org> >Date: Mon, 26 Jan 2015 15:20:33 +0100 >Subject: [PATCH] XXX don't commit: bso10808 reproducer > >This test pauses the printer queues a bunch of jobs then sleeps. After >sleeping, the printer jobs have vanished due to a bug in the background >print queue update process. > >Signed-off-by: David Disseldorp <ddiss@samba.org> >--- > source4/torture/rpc/spoolss.c | 59 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 59 insertions(+) > >diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c >index 23f501d..7a8789a 100644 >--- a/source4/torture/rpc/spoolss.c >+++ b/source4/torture/rpc/spoolss.c >@@ -8937,6 +8937,64 @@ static bool test_print_job_enum(struct torture_context *tctx, > return true; > } > >+static bool test_print_test_pause_wait(struct torture_context *tctx, >+ void *private_data) >+{ >+ struct torture_printer_context *t = >+ (struct torture_printer_context *)talloc_get_type_abort(private_data, struct torture_printer_context); >+ struct dcerpc_pipe *p = t->spoolss_pipe; >+ struct dcerpc_binding_handle *b = p->binding_handle; >+ struct policy_handle *handle = &t->handle; >+ uint32_t num_jobs = 8; >+ uint32_t *job_ids; >+ int i; >+ bool ret = true; >+ >+ torture_assert(tctx, >+ test_PausePrinter(tctx, b, &t->handle), >+ "failed to pause printer"); >+ >+ 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++) { >+ ret &= test_DoPrintTest_add_one_job(tctx, b, handle, "TorturePrintJob", &job_ids[i]); >+ } >+ >+ ret &= test_DoPrintTest_check_jobs(tctx, b, handle, num_jobs, job_ids); >+ if (ret == true) { >+ torture_comment(tctx, "initial job check passed, sleeping...\n\n"); >+ } >+ >+ sleep(10); >+ >+ ret &= test_DoPrintTest_check_jobs(tctx, b, handle, num_jobs, job_ids); >+ if (ret == true) { >+ torture_comment(tctx, "secondary job check passed\n\n"); >+ } else { >+ torture_comment(tctx, "secondary job check failed\n\n"); >+ torture_assert(tctx, >+ test_ResumePrinter(tctx, b, &t->handle), >+ "failed to resume printer"); >+ return false; >+ } >+ >+ 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 (extended) test succeeded\n\n"); >+ } >+ >+ torture_assert(tctx, >+ test_ResumePrinter(tctx, b, &t->handle), >+ "failed to resume printer"); >+ >+ return ret; >+} >+ > void torture_tcase_printer(struct torture_tcase *tcase) > { > torture_tcase_add_simple_test(tcase, "openprinter", test_openprinter_wrap); >@@ -8965,6 +9023,7 @@ void torture_tcase_printer(struct torture_tcase *tcase) > torture_tcase_add_simple_test(tcase, "publish_toggle", > test_printer_publish_toggle); > torture_tcase_add_simple_test(tcase, "print_job_enum", test_print_job_enum); >+ torture_tcase_add_simple_test(tcase, "print_test_pause_wait", test_print_test_pause_wait); > } > > struct torture_suite *torture_rpc_spoolss_printer(TALLOC_CTX *mem_ctx) >-- >2.1.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10808
:
10278
|
10279
|
10280
| 10665 |
10696
|
10710
|
10711
|
10712