s4:torture:vfs_fruit: fix test_aapl() to work with OS X
authorRalph Boehme <slow@samba.org>
Fri, 18 Dec 2015 16:23:40 +0000 (17:23 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 21 Dec 2015 22:21:17 +0000 (23:21 +0100)
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 5eb5c1bef2b38ce7eabcb3dd01a8cbfb3998c2a9..e2627d4887350239f13b1fbc1fa997195640db3a 100644 (file)
@@ -1874,8 +1874,9 @@ static bool test_aapl(struct torture_context *tctx,
                 * uint32_t ModelStringLen = 10;
                 * ucs2_t ModelString[5] = "Samba";
                 */
-               ret = false;
-               goto done;
+               torture_warning(tctx,
+                               "(%s) unexpected AAPL context length: %zd, expected 50",
+                               __location__, aapl->data.length);
        }
 
        aapl_cmd = IVAL(aapl->data.data, 0);
@@ -1913,11 +1914,9 @@ static bool test_aapl(struct torture_context *tctx,
        aapl_vol_caps = BVAL(aapl->data.data, 24);
        if (aapl_vol_caps != SMB2_CRTCTX_AAPL_CASE_SENSITIVE) {
                /* this will fail on a case insensitive fs ... */
-               torture_result(tctx, TORTURE_FAIL,
-                              "(%s) unexpected vol_caps: %d",
-                              __location__, (int)aapl_vol_caps);
-               ret = false;
-               goto done;
+               torture_warning(tctx,
+                               "(%s) unexpected vol_caps: %d",
+                               __location__, (int)aapl_vol_caps);
        }
 
        ret = convert_string_talloc(mem_ctx,
@@ -1977,7 +1976,7 @@ static bool test_aapl(struct torture_context *tctx,
         */
 
        ZERO_STRUCT(io);
-       io.in.desired_access = SEC_RIGHTS_DIR_ALL;
+       io.in.desired_access = SEC_RIGHTS_DIR_READ;
        io.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
        io.in.file_attributes = FILE_ATTRIBUTE_DIRECTORY;
        io.in.share_access = (NTCREATEX_SHARE_ACCESS_READ |