svn commit: samba r2462 - in branches/SAMBA_4_0/source/torture/raw:
.
tridge at samba.org
tridge at samba.org
Tue Sep 21 04:11:48 GMT 2004
Author: tridge
Date: 2004-09-21 04:11:48 +0000 (Tue, 21 Sep 2004)
New Revision: 2462
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/torture/raw&rev=2462&nolog=1
Log:
added a test for the error code for no matching filename
Modified:
branches/SAMBA_4_0/source/torture/raw/search.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/search.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/search.c 2004-09-21 04:11:41 UTC (rev 2461)
+++ branches/SAMBA_4_0/source/torture/raw/search.c 2004-09-21 04:11:48 UTC (rev 2462)
@@ -107,6 +107,7 @@
BOOL ret = True;
int fnum;
const char *fname = "\\torture_search.txt";
+ const char *fname2 = "\\torture_search-NOTEXIST.txt";
NTSTATUS status;
int i;
union smb_fileinfo all_info, alt_info, name_info, internal_info;
@@ -123,6 +124,7 @@
/* call all the levels */
for (i=0;i<ARRAY_SIZE(levels);i++) {
+ NTSTATUS expected_status;
uint32_t cap = cli->transport->negotiate.capabilities;
printf("testing %s\n", levels[i].name);
@@ -142,7 +144,23 @@
levels[i].name, (int)levels[i].level,
nt_errstr(levels[i].status));
ret = False;
+ continue;
}
+
+ status = single_search(cli, mem_ctx, fname2,
+ levels[i].level, &levels[i].data);
+
+ expected_status = NT_STATUS_NO_SUCH_FILE;
+ if (levels[i].level == RAW_SEARCH_SEARCH) {
+ expected_status = STATUS_NO_MORE_FILES;
+ }
+ if (!NT_STATUS_EQUAL(status, expected_status)) {
+ printf("search level %s(%d) should fail with %s - %s\n",
+ levels[i].name, (int)levels[i].level,
+ nt_errstr(expected_status),
+ nt_errstr(status));
+ ret = False;
+ }
}
/* get the all_info file into to check against */
More information about the samba-cvs
mailing list