diff options
author | Jeremy Allison <jra@samba.org> | 2003-02-11 02:29:04 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-02-11 02:29:04 +0000 |
commit | 4689a33497e21757c38773698d003d19c1103edc (patch) | |
tree | 2b5c83d69ece5466d96521fb1f6982b3b4e5a757 | |
parent | cc99ea0ef00a42b0bfc96b2d1e3faeae5871c582 (diff) | |
download | samba-4689a33497e21757c38773698d003d19c1103edc.tar.gz samba-4689a33497e21757c38773698d003d19c1103edc.tar.bz2 samba-4689a33497e21757c38773698d003d19c1103edc.zip |
Fixup delete on close torture.
Jeremy.
(This used to be commit b031e81f4f4d5dc10e792c216d269b49569f5af9)
-rw-r--r-- | source3/torture/torture.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 0368d01dc7..56b8da768e 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -2380,14 +2380,14 @@ static BOOL run_deletetest(int dummy) cli_sockopt(&cli1, sockops); - /* Test 1 - this should *NOT* delete the file on close. */ + /* Test 1 - this should 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_DELETE_ON_CLOSE); if (fnum1 == -1) { printf("[1] open of %s failed (%s)\n", fname, cli_errstr(&cli1)); @@ -2402,14 +2402,8 @@ static BOOL run_deletetest(int dummy) } fnum1 = cli_open(&cli1, fname, O_RDWR, DENY_NONE); - if (fnum1 == -1) { - printf("[1] open of %s failed (%s)\n", fname, cli_errstr(&cli1)); - correct = False; - goto fail; - } - - if (!cli_close(&cli1, fnum1)) { - printf("[1] close failed (%s)\n", cli_errstr(&cli1)); + if (fnum1 != -1) { + printf("[1] open of %s succeeded (should fail)\n", fname); correct = False; goto fail; } |