svn commit: samba r9008 - in branches/SAMBA_4_0/source/torture/raw:
.
tridge at samba.org
tridge at samba.org
Wed Aug 3 17:50:00 GMT 2005
Author: tridge
Date: 2005-08-03 17:50:00 +0000 (Wed, 03 Aug 2005)
New Revision: 9008
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9008
Log:
check the return status for the directory handle creations
Modified:
branches/SAMBA_4_0/source/torture/raw/setfileinfo.c
branches/SAMBA_4_0/source/torture/raw/unlink.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/setfileinfo.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/setfileinfo.c 2005-08-03 17:22:33 UTC (rev 9007)
+++ branches/SAMBA_4_0/source/torture/raw/setfileinfo.c 2005-08-03 17:50:00 UTC (rev 9008)
@@ -484,7 +484,7 @@
CHECK_STR(NAME_INFO, name_info, fname.s, path_fname);
printf("Trying rename with a root fid\n");
- d_fnum = create_directory_handle(cli->tree, BASEDIR);
+ status = create_directory_handle(cli->tree, BASEDIR, &d_fnum);
sfinfo.rename_information.in.new_name = fnum_fname_new+strlen(BASEDIR)+1;
sfinfo.rename_information.in.root_fid = d_fnum;
CHECK_CALL_FNUM(RENAME_INFORMATION, NT_STATUS_INVALID_PARAMETER);
Modified: branches/SAMBA_4_0/source/torture/raw/unlink.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/unlink.c 2005-08-03 17:22:33 UTC (rev 9007)
+++ branches/SAMBA_4_0/source/torture/raw/unlink.c 2005-08-03 17:50:00 UTC (rev 9008)
@@ -220,7 +220,8 @@
printf("Testing with directory and delete_on_close 0\n");
- fnum = create_directory_handle(cli->tree, dname);
+ status = create_directory_handle(cli->tree, dname, &fnum);
+ CHECK_STATUS(status, NT_STATUS_OK);
sfinfo.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFORMATION;
sfinfo.disposition_info.file.fnum = fnum;
@@ -234,7 +235,9 @@
CHECK_STATUS(status, NT_STATUS_OK);
printf("Testing with directory delete_on_close 1\n");
- fnum = create_directory_handle(cli->tree, dname);
+ status = create_directory_handle(cli->tree, dname, &fnum);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
sfinfo.disposition_info.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 1;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
@@ -247,7 +250,9 @@
printf("Testing with non-empty directory delete_on_close\n");
- fnum = create_directory_handle(cli->tree, dname);
+ status = create_directory_handle(cli->tree, dname, &fnum);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
fnum2 = create_complex_file(cli, mem_ctx, inside);
sfinfo.disposition_info.file.fnum = fnum;
@@ -274,7 +279,9 @@
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
printf("Testing open dir with delete_on_close\n");
- fnum = create_directory_handle(cli->tree, dname);
+ status = create_directory_handle(cli->tree, dname, &fnum);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
smbcli_close(cli->tree, fnum);
fnum2 = create_complex_file(cli, mem_ctx, inside);
smbcli_close(cli->tree, fnum2);
@@ -301,9 +308,13 @@
status = smb_raw_rmdir(cli->tree, &dio);
CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
+ smbcli_deltree(cli->tree, dname);
printf("Testing double open dir with second delete_on_close\n");
- fnum = create_directory_handle(cli->tree, dname);
+ status = create_directory_handle(cli->tree, dname, &fnum);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ smbcli_close(cli->tree, fnum);
+
fnum2 = create_complex_file(cli, mem_ctx, inside);
smbcli_close(cli->tree, fnum2);
@@ -325,14 +336,16 @@
fnum2 = op.ntcreatex.out.fnum;
smbcli_close(cli->tree, fnum2);
- smbcli_close(cli->tree, fnum);
status = smb_raw_rmdir(cli->tree, &dio);
CHECK_STATUS(status, NT_STATUS_DIRECTORY_NOT_EMPTY);
+ smbcli_deltree(cli->tree, dname);
printf("Testing pre-existing open dir with second delete_on_close\n");
- fnum = create_directory_handle(cli->tree, dname);
+ status = create_directory_handle(cli->tree, dname, &fnum);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
smbcli_close(cli->tree, fnum);
fnum = create_complex_file(cli, mem_ctx, inside);
More information about the samba-cvs
mailing list