summaryrefslogtreecommitdiff
path: root/source4/torture/torture.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-06 09:12:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:33 -0500
commita9158e0d47636e25ce374391cd9b02df3d27b390 (patch)
tree3724958af5445d10da788f83459b8a3f18b51a81 /source4/torture/torture.c
parent439c1524fba3b58abe9e353f9ff2bd7f103f3d12 (diff)
downloadsamba-a9158e0d47636e25ce374391cd9b02df3d27b390.tar.gz
samba-a9158e0d47636e25ce374391cd9b02df3d27b390.tar.bz2
samba-a9158e0d47636e25ce374391cd9b02df3d27b390.zip
r3574: the RAW-OPEN test changes broke a couple of the other tests. This
fixes most of them, although RAW-SEARCH still fails (due to an interaction with the new xattr code) (This used to be commit 09b4652b40c4cfca027765178bd5a0adbaa666c2)
Diffstat (limited to 'source4/torture/torture.c')
-rw-r--r--source4/torture/torture.c55
1 files changed, 1 insertions, 54 deletions
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 86796c67d7..e7472ffa46 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -864,59 +864,6 @@ static BOOL run_fdpasstest(void)
/*
- This test checks that
-
- 1) the server does not allow an unlink on a file that is open
-*/
-static BOOL run_unlinktest(void)
-{
- struct smbcli_state *cli;
- const char *fname = "\\unlink.tst";
- int fnum;
- BOOL correct = True;
-
- if (!torture_open_connection(&cli)) {
- return False;
- }
-
- printf("starting unlink test\n");
-
- smbcli_unlink(cli->tree, fname);
-
- cli->session->pid = 1;
-
- printf("Opening a file\n");
-
- fnum = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT|O_EXCL, DENY_NONE);
- if (fnum == -1) {
- printf("open of %s failed (%s)\n", fname, smbcli_errstr(cli->tree));
- return False;
- }
-
- printf("Unlinking a open file\n");
-
- if (NT_STATUS_IS_OK(smbcli_unlink(cli->tree, fname))) {
- printf("error: server allowed unlink on an open file\n");
- correct = False;
- } else {
- correct = check_error(__location__, cli, ERRDOS, ERRbadshare,
- NT_STATUS_SHARING_VIOLATION);
- }
-
- smbcli_close(cli->tree, fnum);
- smbcli_unlink(cli->tree, fname);
-
- if (!torture_close_connection(cli)) {
- correct = False;
- }
-
- printf("unlink test finished\n");
-
- return correct;
-}
-
-
-/*
test the timing of deferred open requests
*/
static BOOL run_deferopen(struct smbcli_state *cli, int dummy)
@@ -2415,7 +2362,7 @@ static struct {
{"BASE-LOCK5", torture_locktest5, 0},
{"BASE-LOCK6", torture_locktest6, 0},
{"BASE-LOCK7", torture_locktest7, 0},
- {"BASE-UNLINK", run_unlinktest, 0},
+ {"BASE-UNLINK", torture_unlinktest, 0},
{"BASE-ATTR", run_attrtest, 0},
{"BASE-TRANS2", run_trans2test, 0},
{"BASE-NEGNOWAIT", run_negprot_nowait, 0},