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 Tridgell <tridge@samba.org>
Thu, 9 Feb 2012 04:41:50 +0000 (15:41 +1100)
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 47d61158c8b11c799f680c4b67ffefe29905dc5d..4668e125ae58aba3d099841aa88c6cf64baedd1f 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 5dca5c318462aa9bd19b1397e17f05bcf80db3c5..5da4c198dc2d3b61505422db36df08730a4fe35a 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! "