After adding support for running TestWebKitAPI with guardmalloc in Bug 132954, I found that WebKit2.CookieManager fails with a Debug build of r168683 (test may be flaky, but it fails most of the time): $ ./Tools/Scripts/run-api-tests --debug -g -v WebKit2.CookieManager [...] Note: Google Test filter = WebKit2.CookieManager [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from WebKit2 [ RUN ] WebKit2.CookieManager Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp:43: Failure Value of: policy Actual: 2 Expected: testPolicy Which is: 0 [ FAILED ] WebKit2.CookieManager (455 ms) [----------] 1 test from WebKit2 (455 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (455 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] WebKit2.CookieManager 1 FAILED TEST YOU HAVE 5 DISABLED TESTS LEAK: 1 WebContext Tests that failed: WebKit2.CookieManager
When this happens, there is a sandbox violation in console. Seems like a timing issue with NSUserDefaults access, although I'm not sure if the violation is a root cause of this problem. 15.05.14 9:34:46,979 sandboxd[389]: ([81271]) com.apple.WebKit(81271) deny file-write-data /Users/ap/Library/Preferences/com.apple.WebFoundation.plist See also: <rdar://problem/13402947>, <rdar://problem/15354351>.