torture: don't check the NOINDEXED bit in attribute comparison
authorAndrew Tridgell <tridge@samba.org>
Thu, 9 Feb 2012 04:14:10 +0000 (15:14 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 27 Feb 2012 06:36:05 +0000 (07:36 +0100)
this bit is dependent on user settings on the filesystem

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/torture/smb2/create.c
source4/torture/smb2/util.c

index 47d6115..4668e12 100644 (file)
@@ -275,6 +275,7 @@ static bool test_create_gentest(struct torture_context *tctx, struct smb2_tree *
                                ok_mask |= 1<<i;
 
                                expected = (io.in.file_attributes | FILE_ATTRIBUTE_ARCHIVE) & 0x00005127;
+                               io.out.file_attr &= ~FILE_ATTRIBUTE_NONINDEXED;
                                CHECK_EQUAL(io.out.file_attr, expected);
                                file_attributes_set |= io.out.file_attr;
 
index 5dca5c3..5da4c19 100644 (file)
@@ -557,7 +557,7 @@ bool smb2_util_verify_attrib(TALLOC_CTX *tctx, struct smb2_tree *tree,
        status = smb2_getinfo_file(tree, tctx, &q);
        CHECK_STATUS(status, NT_STATUS_OK);
 
-       q.all_info2.out.attrib &= ~FILE_ATTRIBUTE_ARCHIVE;
+       q.all_info2.out.attrib &= ~(FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_NONINDEXED);
 
        if (q.all_info2.out.attrib != attrib) {
                torture_warning(tctx, "%s: attributes don't match! "