1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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
This commit is contained in:
Günther Deschner 2010-06-01 16:46:37 +02:00
parent fc9644a7d6
commit 582847412a

View File

@ -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;
}