From 52b669b68e7de2ffa2b55ebfde90f9419f3b068b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 30 Apr 2010 13:38:49 +0200 Subject: s4-smbtorture: pause and resume printq in RAP-PRINTING test. Guenther --- source4/torture/rap/printing.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'source4/torture/rap') diff --git a/source4/torture/rap/printing.c b/source4/torture/rap/printing.c index d05188c692..9933db06cb 100644 --- a/source4/torture/rap/printing.c +++ b/source4/torture/rap/printing.c @@ -227,6 +227,23 @@ static bool test_netprintq_pause(struct torture_context *tctx, return true; } +static bool test_netprintq_resume(struct torture_context *tctx, + struct smbcli_state *cli, + const char *PrintQueueName) +{ + struct rap_NetPrintQueueResume r; + + r.in.PrintQueueName = PrintQueueName; + + torture_comment(tctx, "Testing rap_NetPrintQueueResume(%s)\n", r.in.PrintQueueName); + + torture_assert_ntstatus_ok(tctx, + smbcli_rap_netprintqueueresume(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r), + "smbcli_rap_netprintqueueresume failed"); + + return true; +} + static bool test_netprintq(struct torture_context *tctx, struct smbcli_state *cli) { @@ -242,9 +259,15 @@ static bool test_netprintq(struct torture_context *tctx, for (i=0; i < r.out.count; i++) { + const char *printqname = r.out.info[i].info5.PrintQueueName; + torture_assert(tctx, - test_netprintq_pause(tctx, cli, r.out.info[i].info5.PrintQueueName), + test_netprintq_pause(tctx, cli, printqname), "failed to pause print queue"); + + torture_assert(tctx, + test_netprintq_resume(tctx, cli, printqname), + "failed to resume print queue"); } return true; -- cgit