Bug 237353 - Add test coverage for deleting FileSystem data when file is being written
Summary: Add test coverage for deleting FileSystem data when file is being written
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-01 22:53 PST by Sihui Liu
Modified: 2022-03-02 10:51 PST (History)
2 users (show)

See Also:


Attachments
Patch (3.91 KB, patch)
2022-03-01 22:58 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (3.82 KB, patch)
2022-03-02 09:55 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch for landing (3.83 KB, patch)
2022-03-02 09:55 PST, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2022-03-01 22:53:44 PST
...
Comment 1 Sihui Liu 2022-03-01 22:58:53 PST
Created attachment 453572 [details]
Patch
Comment 2 Chris Dumez 2022-03-02 09:34:43 PST
Comment on attachment 453572 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453572&action=review

> Tools/ChangeLog:8
> +        Verify that file can be removed from disk, and active FileSystemSyncAccessHandle is invalidated in ths case.

Typo: "ths"

> Tools/TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:208
> +        RetainPtr<NSData> data;

Why declare the variable here?

> Tools/TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:212
> +        data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];

RetainPtr data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];
Comment 3 Sihui Liu 2022-03-02 09:52:53 PST
Comment on attachment 453572 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453572&action=review

>> Tools/ChangeLog:8
>> +        Verify that file can be removed from disk, and active FileSystemSyncAccessHandle is invalidated in ths case.
> 
> Typo: "ths"

Will change.

>> Tools/TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:212
>> +        data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];
> 
> RetainPtr data = [NSData dataWithBytes:workerBytes length:strlen(workerBytes)];

Sure, will change.
Comment 4 Sihui Liu 2022-03-02 09:55:20 PST
Created attachment 453628 [details]
Patch for landing
Comment 5 Sihui Liu 2022-03-02 09:55:53 PST
Created attachment 453629 [details]
Patch for landing
Comment 6 EWS 2022-03-02 10:50:01 PST
Committed r290736 (247983@main): <https://commits.webkit.org/247983@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453629 [details].
Comment 7 Radar WebKit Bug Importer 2022-03-02 10:51:18 PST
<rdar://problem/89698883>