summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-02 13:48:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:35:56 -0500
commit04b9446b2a06362a85fde456fbb2fdc0ef3fd69e (patch)
treecc69253fb9bf12c322a9222b909f6d367a34ebb2 /source4/torture
parent391d97168fdd2ef920b4084e5d1e8fbd4c43f178 (diff)
downloadsamba-04b9446b2a06362a85fde456fbb2fdc0ef3fd69e.tar.gz
samba-04b9446b2a06362a85fde456fbb2fdc0ef3fd69e.tar.bz2
samba-04b9446b2a06362a85fde456fbb2fdc0ef3fd69e.zip
r20474: Skip the delete-on-close test on a non-empty directory in raw-unlink for
Samba3. This is a known deficiency also taken care of in the base-delete test. Volker (This used to be commit 6b91bb93fad84e054c19f8c9bc4145234f171a3c)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/unlink.c49
1 files changed, 28 insertions, 21 deletions
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index d73b7abacf..c4f08beb7f 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -252,34 +252,41 @@ static BOOL test_delete_on_close(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
- printf("Testing with non-empty directory delete_on_close\n");
- status = create_directory_handle(cli->tree, dname, &fnum);
- CHECK_STATUS(status, NT_STATUS_OK);
-
- fnum2 = create_complex_file(cli, mem_ctx, inside);
+ if (!lp_parm_bool(-1, "torture", "samba3", False)) {
- sfinfo.disposition_info.in.file.fnum = fnum;
- sfinfo.disposition_info.in.delete_on_close = 1;
- status = smb_raw_setfileinfo(cli->tree, &sfinfo);
- CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
+ /*
+ * Known deficiency, also skipped in base-delete.
+ */
- sfinfo.disposition_info.in.file.fnum = fnum2;
- status = smb_raw_setfileinfo(cli->tree, &sfinfo);
- CHECK_STATUS(status, NT_STATUS_OK);
+ printf("Testing with non-empty directory delete_on_close\n");
+ status = create_directory_handle(cli->tree, dname, &fnum);
+ CHECK_STATUS(status, NT_STATUS_OK);
- sfinfo.disposition_info.in.file.fnum = fnum;
- status = smb_raw_setfileinfo(cli->tree, &sfinfo);
- CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
+ fnum2 = create_complex_file(cli, mem_ctx, inside);
- smbcli_close(cli->tree, fnum2);
+ sfinfo.disposition_info.in.file.fnum = fnum;
+ sfinfo.disposition_info.in.delete_on_close = 1;
+ status = smb_raw_setfileinfo(cli->tree, &sfinfo);
+ CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
- status = smb_raw_setfileinfo(cli->tree, &sfinfo);
- CHECK_STATUS(status, NT_STATUS_OK);
+ sfinfo.disposition_info.in.file.fnum = fnum2;
+ status = smb_raw_setfileinfo(cli->tree, &sfinfo);
+ CHECK_STATUS(status, NT_STATUS_OK);
- smbcli_close(cli->tree, fnum);
+ sfinfo.disposition_info.in.file.fnum = fnum;
+ status = smb_raw_setfileinfo(cli->tree, &sfinfo);
+ CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
- status = smb_raw_rmdir(cli->tree, &dio);
- CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ smbcli_close(cli->tree, fnum2);
+
+ status = smb_raw_setfileinfo(cli->tree, &sfinfo);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ smbcli_close(cli->tree, fnum);
+
+ status = smb_raw_rmdir(cli->tree, &dio);
+ CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ }
printf("Testing open dir with delete_on_close\n");
status = create_directory_handle(cli->tree, dname, &fnum);