Bug 199951 - Need to skip test cache directory data vault for non internal build
Summary: Need to skip test cache directory data vault for non internal build
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-19 11:00 PDT by Zhifei Fang
Modified: 2019-07-22 11:17 PDT (History)
11 users (show)

See Also:


Attachments
Patch (1.74 KB, patch)
2019-07-19 11:21 PDT, Zhifei Fang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zhifei Fang 2019-07-19 11:00:43 PDT
JSScript.mm:97

#if USE(APPLE_INTERNAL_SDK)
    if (rootless_check_datavault_flag(FileSystem::fileSystemRepresentation(directory).data(), nullptr)) {
        createError([NSString stringWithFormat:@"Cache directory `%@` is not a data vault", static_cast<NSString *>(directory)], error);
        return false;
    }
#endif



testapi.mm:2408

testInvalidCacheURL([NSURL URLWithString:@""], @"Cache path `` is not a local file");
testInvalidCacheURL([NSURL URLWithString:@"file:///"], @"Cache path `/` already exists and is not a file");
testInvalidCacheURL([NSURL URLWithString:@"file:///a/b/c/d/e"], @"Cache directory `/a/b/c/d` is not a directory or does not exist");
testInvalidCacheURL([NSURL URLWithString:@"file:///private/tmp/file.cache"], @"Cache directory `/private/tmp` is not a data vault");
^ this test run without checking if USE(APPLE_INTERNAL_SDK), we don't check this for non internal build (see JSScript.mm:97), therefore no error message will be created, this test will be failed.
Comment 1 Zhifei Fang 2019-07-19 11:21:44 PDT
Created attachment 374478 [details]
Patch
Comment 2 Keith Miller 2019-07-22 10:38:35 PDT
LGTM too.
Comment 3 WebKit Commit Bot 2019-07-22 11:16:08 PDT
Comment on attachment 374478 [details]
Patch

Clearing flags on attachment: 374478

Committed r247690: <https://trac.webkit.org/changeset/247690>
Comment 4 WebKit Commit Bot 2019-07-22 11:16:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-07-22 11:17:19 PDT
<rdar://problem/53406975>