diff options
author | Günther Deschner <gd@samba.org> | 2010-04-30 13:38:49 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-04-30 13:44:42 +0200 |
commit | 52b669b68e7de2ffa2b55ebfde90f9419f3b068b (patch) | |
tree | 2309511847eb6a6edb33c0bb3d43082252660e3a /source4 | |
parent | af2482989b3a55e7d0836a12b4464de98d541d0f (diff) | |
download | samba-52b669b68e7de2ffa2b55ebfde90f9419f3b068b.tar.gz samba-52b669b68e7de2ffa2b55ebfde90f9419f3b068b.tar.bz2 samba-52b669b68e7de2ffa2b55ebfde90f9419f3b068b.zip |
s4-smbtorture: pause and resume printq in RAP-PRINTING test.
Guenther
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rap/printing.c | 25 |
1 files changed, 24 insertions, 1 deletions
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; |