summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-09-06 01:21:09 +0000
committerAndrew Tridgell <tridge@samba.org>2001-09-06 01:21:09 +0000
commitdd9b2f3b2f86c05f433073de1b2b64c736a36f9c (patch)
tree736d31541a89a26f306ede6a236fc63bed5f5eb3 /source3/torture
parent9ef7a6c7865c14480139188c30744914c5b7af43 (diff)
downloadsamba-dd9b2f3b2f86c05f433073de1b2b64c736a36f9c.tar.gz
samba-dd9b2f3b2f86c05f433073de1b2b64c736a36f9c.tar.bz2
samba-dd9b2f3b2f86c05f433073de1b2b64c736a36f9c.zip
it turns out that XP agrees with the samba head branch over the right
error codes for locking, so fix the test rather than fixing samba (This used to be commit a583af3c2f5d1962495a0f18b671e34d6ff43511)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 2e19ec042a..c325549004 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -814,7 +814,7 @@ static BOOL run_locktest1(int dummy)
return False;
} else {
if (!check_error(__LINE__, &cli2, ERRDOS, ERRlock,
- NT_STATUS_FILE_LOCK_CONFLICT)) return False;
+ NT_STATUS_LOCK_NOT_GRANTED)) return False;
}
t2 = time(NULL);
@@ -832,7 +832,7 @@ static BOOL run_locktest1(int dummy)
return False;
} else {
if (!check_error(__LINE__, &cli2, ERRDOS, ERRlock,
- NT_STATUS_FILE_LOCK_CONFLICT)) return False;
+ NT_STATUS_LOCK_NOT_GRANTED)) return False;
}
if (!cli_close(&cli1, fnum1)) {
@@ -1016,7 +1016,7 @@ static BOOL run_locktest2(int dummy)
correct = False;
} else {
if (!check_error(__LINE__, &cli, ERRDOS, ERRlock,
- NT_STATUS_FILE_LOCK_CONFLICT)) return False;
+ NT_STATUS_LOCK_NOT_GRANTED)) return False;
}
if (!cli_lock(&cli, fnum1, 100, 4, 0, WRITE_LOCK)) {
@@ -1033,8 +1033,8 @@ static BOOL run_locktest2(int dummy)
correct = False;
} else {
if (!check_error(__LINE__, &cli,
- ERRDOS, ERRnotlocked,
- NT_STATUS_RANGE_NOT_LOCKED)) return False;
+ ERRDOS, ERRlock,
+ NT_STATUS_LOCK_NOT_GRANTED)) return False;
}
if (cli_unlock(&cli, fnum1, 0, 8)) {
@@ -1042,8 +1042,8 @@ static BOOL run_locktest2(int dummy)
correct = False;
} else {
if (!check_error(__LINE__, &cli,
- ERRDOS, ERRnotlocked,
- NT_STATUS_RANGE_NOT_LOCKED)) return False;
+ ERRDOS, ERRlock,
+ NT_STATUS_LOCK_NOT_GRANTED)) return False;
}
if (cli_lock(&cli, fnum3, 0, 4, 0, WRITE_LOCK)) {
@@ -2482,14 +2482,15 @@ static BOOL run_deletetest(int dummy)
}
cli_sockopt(&cli1, sockops);
-
+
/* Test 1 - this should *NOT* delete the file on close. */
cli_setatr(&cli1, fname, 0, 0);
cli_unlink(&cli1, fname);
fnum1 = cli_nt_create_full(&cli1, fname, GENERIC_ALL_ACCESS, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_DELETE, FILE_OVERWRITE_IF, DELETE_ON_CLOSE_FLAG);
+ FILE_SHARE_DELETE, FILE_OVERWRITE_IF,
+ DELETE_ON_CLOSE_FLAG);
if (fnum1 == -1) {
printf("[1] open of %s failed (%s)\n", fname, cli_errstr(&cli1));
@@ -2520,7 +2521,8 @@ static BOOL run_deletetest(int dummy)
cli_unlink(&cli1, fname);
fnum1 = cli_nt_create_full(&cli1, fname, GENERIC_ALL_ACCESS,
- FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE, FILE_OVERWRITE_IF, 0);
+ FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE,
+ FILE_OVERWRITE_IF, 0);
if (fnum1 == -1) {
printf("[2] open of %s failed (%s)\n", fname, cli_errstr(&cli1));
@@ -2548,13 +2550,12 @@ static BOOL run_deletetest(int dummy)
} else
printf("second delete on close test succeeded.\n");
-
/* Test 3 - ... */
cli_setatr(&cli1, fname, 0, 0);
cli_unlink(&cli1, fname);
fnum1 = cli_nt_create_full(&cli1, fname, GENERIC_ALL_ACCESS, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OVERWRITE_IF, 0);
+ FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OVERWRITE_IF, 0);
if (fnum1 == -1) {
printf("[3] open - 1 of %s failed (%s)\n", fname, cli_errstr(&cli1));