Bug 132955 - WebKit2.CookieManager test fails when run under guardmalloc
Summary: WebKit2.CookieManager test fails when run under guardmalloc
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 132954
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-15 08:14 PDT by David Kilzer (:ddkilzer)
Modified: 2014-05-15 09:40 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2014-05-15 08:14:26 PDT
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
Comment 1 Alexey Proskuryakov 2014-05-15 09:40:31 PDT
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>.