Bug 121715 - Delete TestWebKitAPI domain or some keys before running TestWebKitAPI
Summary: Delete TestWebKitAPI domain or some keys before running TestWebKitAPI
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
: 121722 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-20 14:08 PDT by David Farler
Modified: 2013-09-23 15:07 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.42 KB, patch)
2013-09-20 15:37 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (4.51 KB, patch)
2013-09-22 21:23 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (4.20 KB, patch)
2013-09-22 23:15 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff
Patch (4.04 KB, patch)
2013-09-23 14:46 PDT, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Farler 2013-09-20 14:08:42 PDT
Some tests may leave values behind for keys that can affect certain tests. There is a current bug in TestWebKitAPI WebKit1.SetAndUpdateCache* tests that is getting masked on some machines due to TestWebKitAPI WebKitCacheModelPreferenceKey == 1 on disk.

In particular, at least these tests should be failing but they have been hiding recently on some machines:

  WebKit1.SetAndUpdateCacheModelInitialModel
  WebKit1.SetAndUpdateCacheModelPreferencesChangeMix
  WebKit1.SetAndUpdateCacheModelStandardPreferenceChange
Comment 1 David Farler 2013-09-20 14:23:32 PDT
<rdar://problem/14269434>
Comment 2 Benjamin Poulain 2013-09-20 15:37:09 PDT
Created attachment 212230 [details]
Patch
Comment 3 Benjamin Poulain 2013-09-20 15:37:25 PDT
*** Bug 121722 has been marked as a duplicate of this bug. ***
Comment 4 Alexey Proskuryakov 2013-09-20 16:50:50 PDT
Comment on attachment 212230 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm:41
> +    [NSUserDefaults resetStandardUserDefaults];

I think that we should do this in mainMac.mm and manIOS.mm instead.
Comment 5 Alexey Proskuryakov 2013-09-20 17:37:38 PDT
Also, I suspect that WebKit1.DidCreateJavaScriptContextBackForwardCacheTest has the same issue exactly.
Comment 6 Benjamin Poulain 2013-09-22 21:23:07 PDT
Created attachment 212322 [details]
Patch
Comment 7 Alexey Proskuryakov 2013-09-22 22:18:57 PDT
Comment on attachment 212322 [details]
Patch

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

> Tools/ChangeLog:12
> +        This patch fixes the tests by resetting the default, and using the proper

I don't see this code in the patch.

> Tools/ChangeLog:18
> +        * WebKitTestRunner/mac/main.mm:
> +        (main):

These changes don't look related to the fix.
Comment 8 Benjamin Poulain 2013-09-22 22:24:24 PDT
ahahaha, fuck, I went over this too fast.
Comment 9 Benjamin Poulain 2013-09-22 23:15:04 PDT
Created attachment 212324 [details]
Patch
Comment 10 Alexey Proskuryakov 2013-09-22 23:41:01 PDT
Comment on attachment 212324 [details]
Patch

r=me, however I think that this question still stands:

> Also, I suspect that WebKit1.DidCreateJavaScriptContextBackForwardCacheTest has the same issue exactly.

Please be careful landing this patch - if I'm right, then resetting preferences will make this test fail everywhere, and will make bots red.
Comment 11 Benjamin Poulain 2013-09-23 14:46:29 PDT
Created attachment 212395 [details]
Patch
Comment 12 Alexey Proskuryakov 2013-09-23 15:07:25 PDT
Yes, this test needed the cache model to be a non-default one. Updated it and landed in <http://trac.webkit.org/r156299>.