1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s4-smbtorture: getting serious about checking rap status return codes.

Guenther
This commit is contained in:
Günther Deschner 2010-05-09 01:08:11 +02:00
parent 19d99a6426
commit 84ab762fd5

View File

@ -89,6 +89,8 @@ static bool test_netprintqenum(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
"smbcli_rap_netprintqenum failed");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
for (q=0; q<r.out.count; q++) {
switch (r.in.level) {
@ -116,6 +118,8 @@ static bool test_netprintqgetinfo(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r_enum),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r_enum.out.status),
"failed to enum printq");
for (p=0; p < r_enum.out.count; p++) {
@ -225,6 +229,8 @@ static bool test_netprintq_pause(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqueuepause(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
"smbcli_rap_netprintqueuepause failed");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"smbcli_rap_netprintqueuepause failed");
return true;
}
@ -242,6 +248,8 @@ static bool test_netprintq_resume(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqueueresume(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
"smbcli_rap_netprintqueueresume failed");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"smbcli_rap_netprintqueueresume failed");
return true;
}
@ -258,6 +266,8 @@ static bool test_netprintq(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
for (i=0; i < r.out.count; i++) {
@ -447,6 +457,8 @@ static bool test_netprintjobenum(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
for (i=0; i < r.out.count; i++) {
@ -472,6 +484,8 @@ static bool test_netprintjobgetinfo(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
for (i=0; i < r.out.count; i++) {
@ -497,6 +511,8 @@ static bool test_netprintjobsetinfo(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
for (i=0; i < r.out.count; i++) {
@ -598,6 +614,8 @@ static bool test_rap_print(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
"failed to enum printq");
torture_assert_werr_ok(tctx, W_ERROR(r.out.status),
"failed to enum printq");
for (i=0; i < r.out.count; i++) {