summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-09-08 17:55:12 +0200
committerStefan Metzmacher <metze@samba.org>2010-09-10 17:21:33 +0200
commita489fb3ee252a052ed6bc6033bf021b249dbecca (patch)
tree85949b0111ee8edf5cbcb4576bb9b37a74b345ff /source3/torture
parentcd8e2fd9fa2d2b0ef8c3c7189697577d46c2f848 (diff)
downloadsamba-a489fb3ee252a052ed6bc6033bf021b249dbecca.tar.gz
samba-a489fb3ee252a052ed6bc6033bf021b249dbecca.tar.bz2
samba-a489fb3ee252a052ed6bc6033bf021b249dbecca.zip
s3:torture: fix run_uid_regression_test
metze
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 8a2aec67d5..906f507126 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -6124,11 +6124,18 @@ static bool run_uid_regression_test(int dummy)
cli->vuid = old_vuid;
/* Try an operation. */
- if (!NT_STATUS_IS_OK(cli_mkdir(cli, "\\uid_reg_test"))) {
- /* We expect bad uid. */
+ status = cli_mkdir(cli, "\\uid_reg_test");
+ if (NT_STATUS_IS_OK(status)) {
+ d_printf("(%s) cli_mkdir succeeded\n",
+ __location__);
+ correct = false;
+ goto out;
+ } else {
+ /* Should be bad uid. */
if (!check_error(__LINE__, cli, ERRSRV, ERRbaduid,
- NT_STATUS_NO_SUCH_USER)) {
- return False;
+ NT_STATUS_USER_SESSION_DELETED)) {
+ correct = false;
+ goto out;
}
}
@@ -6141,9 +6148,11 @@ static bool run_uid_regression_test(int dummy)
status = cli_tdis(cli);
if (NT_STATUS_IS_OK(status)) {
- printf("First tdis with invalid vuid should succeed.\n");
+ d_printf("First tdis with invalid vuid should succeed.\n");
} else {
- printf("First tdis failed (%s)\n", nt_errstr(status));
+ d_printf("First tdis failed (%s)\n", nt_errstr(status));
+ correct = false;
+ goto out;
}
cli->vuid = old_vuid;
@@ -6152,12 +6161,15 @@ static bool run_uid_regression_test(int dummy)
/* This should fail. */
status = cli_tdis(cli);
if (NT_STATUS_IS_OK(status)) {
- printf("Second tdis with invalid vuid should fail - succeeded instead !.\n");
+ d_printf("Second tdis with invalid vuid should fail - succeeded instead !.\n");
+ correct = false;
+ goto out;
} else {
/* Should be bad tid. */
if (!check_error(__LINE__, cli, ERRSRV, ERRinvnid,
NT_STATUS_NETWORK_NAME_DELETED)) {
- return False;
+ correct = false;
+ goto out;
}
}