s4:torture:vfs_fruit: use AFPINFO_STREAM_NAME
authorRalph Boehme <slow@samba.org>
Thu, 17 Dec 2015 15:51:10 +0000 (16:51 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 21 Dec 2015 22:21:16 +0000 (23:21 +0100)
I got erratic results from OS X SMB server with AFPINFO_STREAM
(":AFP_AfpInfo:$DATA") in some tests. Using AFPINFO_STREAM_NAME
(just the ":AFP_AfpInfo" part) instead fixed this.

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

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

index 7ecd1d6ccf7034cb4969547680565e1c01d279e7..2d47f1796f5f39488215a404ef6635bb8d65f0ef 100644 (file)
@@ -849,7 +849,7 @@ static bool torture_write_afpinfo(struct smb2_tree *tree,
        char *infobuf;
        bool ret = true;
 
-       full_name = talloc_asprintf(mem_ctx, "%s%s", fname, AFPINFO_STREAM);
+       full_name = talloc_asprintf(mem_ctx, "%s%s", fname, AFPINFO_STREAM_NAME);
        if (full_name == NULL) {
            torture_comment(tctx, "talloc_asprintf error\n");
            return false;
@@ -1362,7 +1362,7 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx,
 {
        TALLOC_CTX *mem_ctx = talloc_new(tctx);
        const char *fname = BASEDIR "\\torture_write_rfork_io";
-       const char *rfork = BASEDIR "\\torture_write_rfork_io" AFPRESOURCE_STREAM;
+       const char *rfork = BASEDIR "\\torture_write_rfork_io" AFPRESOURCE_STREAM_NAME;
        const char *rfork_content = "1234567890";
        NTSTATUS status;
        struct smb2_handle testdirh;
@@ -1388,11 +1388,11 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx,
            __location__);
 
        ret &= write_stream(tree, __location__, tctx, mem_ctx,
-                           fname, AFPRESOURCE_STREAM,
+                           fname, AFPRESOURCE_STREAM_NAME,
                            10, 10, rfork_content);
 
        ret &= check_stream(tree, __location__, tctx, mem_ctx,
-                           fname, AFPRESOURCE_STREAM,
+                           fname, AFPRESOURCE_STREAM_NAME,
                            0, 20, 10, 10, rfork_content);
 
        /* Check size after write */
@@ -1430,11 +1430,11 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx,
                        __location__);
 
        ret &= write_stream(tree, __location__, tctx, mem_ctx,
-                           fname, AFPRESOURCE_STREAM,
+                           fname, AFPRESOURCE_STREAM_NAME,
                            (off_t)1<<32, 10, rfork_content);
 
        ret &= check_stream(tree, __location__, tctx, mem_ctx,
-                           fname, AFPRESOURCE_STREAM,
+                           fname, AFPRESOURCE_STREAM_NAME,
                            (off_t)1<<32, 10, 0, 10, rfork_content);
 
        /* Truncate back to size of 1 byte */
@@ -1938,7 +1938,7 @@ static bool test_aapl(struct torture_context *tctx,
        }
 
        ret = write_stream(tree, __location__, tctx, mem_ctx,
-                          fname, AFPRESOURCE_STREAM,
+                          fname, AFPRESOURCE_STREAM_NAME,
                           0, 3, "foo");
        if (ret == false) {
                torture_result(tctx, TORTURE_FAIL,