Title: [290218] trunk/Tools
Revision
290218
Author
[email protected]
Date
2022-02-19 17:34:27 -0800 (Sat, 19 Feb 2022)

Log Message

Set custom general storage directory for custom WebsiteDataStore in TestController
https://bugs.webkit.org/show_bug.cgi?id=236893

Reviewed by Chris Dumez.

If we don't set custom generalStorageDirectory for a custom WebsiteDataStore, it will use the same path as the
default WebsiteDataStore. That means when WebKitTestRunner creates multiple WebsiteDataStores (it may create
mutliple TestControllers to run tests in parallel), the directory will be accessed concurrently and data can be
corrupted.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::configureWebsiteDataStoreTemporaryDirectories):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (290217 => 290218)


--- trunk/Tools/ChangeLog	2022-02-19 23:05:53 UTC (rev 290217)
+++ trunk/Tools/ChangeLog	2022-02-20 01:34:27 UTC (rev 290218)
@@ -1,3 +1,18 @@
+2022-02-19  Sihui Liu  <[email protected]>
+
+        Set custom general storage directory for custom WebsiteDataStore in TestController
+        https://bugs.webkit.org/show_bug.cgi?id=236893
+
+        Reviewed by Chris Dumez.
+
+        If we don't set custom generalStorageDirectory for a custom WebsiteDataStore, it will use the same path as the
+        default WebsiteDataStore. That means when WebKitTestRunner creates multiple WebsiteDataStores (it may create 
+        mutliple TestControllers to run tests in parallel), the directory will be accessed concurrently and data can be 
+        corrupted.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::configureWebsiteDataStoreTemporaryDirectories):
+
 2022-02-19  Chris Dumez  <[email protected]>
 
         Unreviewed, reverting r290196.

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (290217 => 290218)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2022-02-19 23:05:53 UTC (rev 290217)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2022-02-20 01:34:27 UTC (rev 290218)
@@ -614,6 +614,7 @@
         WKWebsiteDataStoreConfigurationSetMediaKeysStorageDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "MediaKeys", pathSeparator, randomNumber)).get());
         WKWebsiteDataStoreConfigurationSetResourceLoadStatisticsDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "ResourceLoadStatistics", pathSeparator, randomNumber)).get());
         WKWebsiteDataStoreConfigurationSetServiceWorkerRegistrationDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "ServiceWorkers", pathSeparator, randomNumber)).get());
+        WKWebsiteDataStoreConfigurationSetGeneralStorageDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "Default", pathSeparator, randomNumber)).get());
 #if PLATFORM(WIN)
         WKWebsiteDataStoreConfigurationSetCookieStorageFile(configuration, toWK(makeString(temporaryFolder, pathSeparator, "cookies", pathSeparator, randomNumber, pathSeparator, "cookiejar.db")).get());
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to