s4:torture/vfs/fruit: update test "creating rsrc with read-only access" for newer...
authorRalph Boehme <slow@samba.org>
Mon, 15 Oct 2018 13:17:08 +0000 (15:17 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 31 Oct 2018 20:27:19 +0000 (21:27 +0100)
While this operation failed against older macOS versions, it passes
against versions 10.12 and newer. Update the test accordingly, a
subsequent commit will then update our implementation.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13646

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
selftest/knownfail.d/samba3.vfs.fruit
source4/torture/vfs/fruit.c

index 6307e2b34043b5f960a67ad7861eeb004b5bed3e..a2758ffeded7e5c8c31aa8ceed74dfca613753cf 100644 (file)
@@ -1,2 +1,5 @@
 ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\)
 ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion without embedded xattr\(nt4_dc\)
+^samba3.vfs.fruit metadata_netatalk.creating rsrc with read-only access\(nt4_dc\)
+^samba3.vfs.fruit metadata_stream.creating rsrc with read-only access\(nt4_dc\)
+^samba3.vfs.fruit streams_depot.creating rsrc with read-only access\(nt4_dc\)
index 272a2a987829be4eadc7d411cba7cf455f45d748..8dd34e39294b47fd462e03b5b00fafc89d3a4174 100644 (file)
@@ -2045,35 +2045,9 @@ static bool test_rfork_create_ro(struct torture_context *tctx,
        }
 
        torture_comment(tctx, "(%s) Try opening read-only with "
-                       "open_if create disposition, should return ENOENT\n",
+                       "open_if create disposition, should work\n",
                        __location__);
 
-       ZERO_STRUCT(create);
-       create.in.fname = rfork;
-       create.in.create_disposition = NTCREATEX_DISP_OPEN_IF;
-       create.in.desired_access = SEC_FILE_READ_DATA | SEC_STD_READ_CONTROL;
-       create.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
-       create.in.share_access = FILE_SHARE_READ | FILE_SHARE_DELETE;
-       status = smb2_create(tree, mem_ctx, &(create));
-       torture_assert_ntstatus_equal_goto(tctx, status,
-                                       NT_STATUS_OBJECT_NAME_NOT_FOUND,
-                                       ret, done, "smb2_create failed\n");
-
-       torture_comment(tctx, "(%s) Now write something to the "
-                       "rsrc stream, then the same open should succeed\n",
-                       __location__);
-
-       ret = write_stream(tree, __location__, tctx, mem_ctx,
-                          fname, AFPRESOURCE_STREAM_NAME,
-                          0, 3, "foo");
-       torture_assert_goto(tctx, ret == true, ret, done,
-                       "write_stream failed\n");
-
-       ret = check_stream(tree, __location__, tctx, mem_ctx,
-                          fname, AFPRESOURCE_STREAM,
-                          0, 3, 0, 3, "foo");
-       torture_assert_goto(tctx, ret == true, ret, done, "check_stream");
-
        ZERO_STRUCT(create);
        create.in.fname = rfork;
        create.in.create_disposition = NTCREATEX_DISP_OPEN_IF;