r3259: expanded the RAW-SEARCH test some more
authorAndrew Tridgell <tridge@samba.org>
Tue, 26 Oct 2004 11:10:02 +0000 (11:10 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:04:47 +0000 (13:04 -0500)
(This used to be commit cc58d249f973397bf800c9b56a5d4ab30fcda2b4)

source4/torture/raw/search.c

index 39dd721a769fa4fe68954d138a2afe08b46fda60..56e3d4dc1595f7a17a0edcedd37625ce5db66c7a 100644 (file)
@@ -662,7 +662,7 @@ static BOOL test_many_files(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                              QSORT_CAST search_old_compare);
                }
 
-               for (i=0;i<num_files;i++) {
+               for (i=0;i<result.count;i++) {
                        const char *s;
                        if (search_types[t].level == RAW_SEARCH_BOTH_DIRECTORY_INFO) {
                                s = result.list[i].both_directory_info.name.s;
@@ -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 2 files\n");
+       printf("pulling the first file\n");
        ZERO_STRUCT(result);
        result.mem_ctx = talloc(mem_ctx, 0);
 
@@ -777,6 +777,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VALUE(result.count, 1);
        
+       printf("pulling the second file\n");
        io2.generic.level = RAW_SEARCH_BOTH_DIRECTORY_INFO;
        io2.t2fnext.in.handle = io.t2ffirst.out.handle;
        io2.t2fnext.in.max_count = 1;
@@ -801,6 +802,7 @@ static BOOL test_modify_search(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        torture_set_file_attribute(cli->tree, BASEDIR "\\T015-15.txt", FILE_ATTRIBUTE_HIDDEN);
        torture_set_file_attribute(cli->tree, BASEDIR "\\T016-16.txt", FILE_ATTRIBUTE_NORMAL);
        torture_set_file_attribute(cli->tree, BASEDIR "\\T017-17.txt", FILE_ATTRIBUTE_SYSTEM);  
+       torture_set_file_attribute(cli->tree, BASEDIR "\\T018-18.txt", 0);      
        sfinfo.generic.level = RAW_SFILEINFO_DISPOSITION_INFORMATION;
        sfinfo.generic.file.fnum = fnum;
        sfinfo.disposition_info.in.delete_on_close = 1;