summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-26 09:50:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:47 -0500
commitb3ada7f4f51392efd7292be023c11e9574b58458 (patch)
treefe16737db5667ed33d5c7b6c6743cff2036b849c /source4/torture
parent79c9d6db55a72d630caa296691ea5ad54b30fc4c (diff)
downloadsamba-b3ada7f4f51392efd7292be023c11e9574b58458.tar.gz
samba-b3ada7f4f51392efd7292be023c11e9574b58458.tar.bz2
samba-b3ada7f4f51392efd7292be023c11e9574b58458.zip
r3257: make the RAW-SEARCH test less sensitive to the servers directory ordering
(This used to be commit 097823bbde94da2a9d9d2afef3a4ed2715bb1f04)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/search.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 465eaeabf8..39dd721a76 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -749,7 +749,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Creating %d files\n", num_files);
- for (i=0;i<num_files;i++) {
+ for (i=num_files-1;i>=0;i--) {
asprintf(&fname, BASEDIR "\\t%03d-%d.txt", i, i);
fnum = smbcli_open(cli->tree, fname, O_CREAT|O_RDWR, DENY_NONE);
if (fnum == -1) {
@@ -761,7 +761,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
smbcli_close(cli->tree, fnum);
}
- printf("pulling the first 10 files\n");
+ printf("pulling the first 2 files\n");
ZERO_STRUCT(result);
result.mem_ctx = talloc(mem_ctx, 0);
@@ -779,7 +779,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io2.generic.level = RAW_SEARCH_BOTH_DIRECTORY_INFO;
io2.t2fnext.in.handle = io.t2ffirst.out.handle;
- io2.t2fnext.in.max_count = num_files/2 - 1;
+ io2.t2fnext.in.max_count = 1;
io2.t2fnext.in.resume_key = 0;
io2.t2fnext.in.flags = 0;
if (result.count == 0) {
@@ -791,7 +791,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_search_next(cli->tree, mem_ctx,
&io2, &result, multiple_search_callback);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(result.count, num_files/2);
+ CHECK_VALUE(result.count, 2);
printf("Changing attributes and deleting\n");
smbcli_open(cli->tree, BASEDIR "\\T003-03.txt.2", O_CREAT|O_RDWR, DENY_NONE);
@@ -809,7 +809,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io2.generic.level = RAW_SEARCH_BOTH_DIRECTORY_INFO;
io2.t2fnext.in.handle = io.t2ffirst.out.handle;
- io2.t2fnext.in.max_count = num_files/2;
+ io2.t2fnext.in.max_count = num_files - 2;
io2.t2fnext.in.resume_key = 0;
io2.t2fnext.in.flags = 0;
io2.t2fnext.in.last_name = result.list[result.count-1].both_directory_info.name.s;
@@ -817,7 +817,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_search_next(cli->tree, mem_ctx,
&io2, &result, multiple_search_callback);
CHECK_STATUS(status, NT_STATUS_OK);
- CHECK_VALUE(result.count, 19);
+ CHECK_VALUE(result.count, 20);
ret &= check_result(&result, "t009-9.txt", True, FILE_ATTRIBUTE_ARCHIVE);
ret &= check_result(&result, "t014-14.txt", False, 0);
@@ -838,6 +838,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
result.list[i].both_directory_info.attrib);
}
}
+ exit(1);
done:
smb_raw_exit(cli->session);