Bug 21531

Summary: svg/carto.net/window.svg has race condition
Product: WebKit Reporter: Pam Greene (IRC:pamg) <pam>
Component: SVGAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Fixes race + new results darin: review+

Pam Greene (IRC:pamg)
Reported 2008-10-10 14:01:21 PDT
The svg/carto.net/window.svg test has a race. It adds a window decoration to one of the windows when its create function is called via setTimeout. If the app is fast, the create function is not called before the tree is dumped, and the decoration is not added. However, when the app is slow enough, enough time may pass that the create function is called and the decoration is added. This nondeterminism should be fixed by modifying the test to wait until all create functions have been called before terminating.
Attachments
Fixes race + new results (139.30 KB, patch)
2008-10-10 14:44 PDT, Pam Greene (IRC:pamg)
darin: review+
Pam Greene (IRC:pamg)
Comment 1 2008-10-10 14:44:01 PDT
Created attachment 24275 [details] Fixes race + new results
Darin Adler
Comment 2 2008-10-10 16:22:10 PDT
Comment on attachment 24275 [details] Fixes race + new results rs=me
Sam Weinig
Comment 3 2008-10-10 17:11:29 PDT
+ // WebKit modification: do not terminate before all create functions I don't think it makes sense to include "WebKit modification: " part.
Adam Barth
Comment 4 2008-10-12 13:45:01 PDT
I'll land this.
Adam Barth
Comment 5 2008-10-12 18:57:31 PDT
Fixed r37544.
Pam Greene (IRC:pamg)
Comment 6 2008-10-13 10:44:42 PDT
(In reply to comment #3) > + // WebKit modification: do not terminate before all create functions > I don't think it makes sense to include "WebKit modification: " part. Are these tests not pulled in from somewhere else? The directory structure led me to think so, but I don't know the history.
Sam Weinig
Comment 7 2008-10-13 11:53:52 PDT
(In reply to comment #6) > (In reply to comment #3) > > + // WebKit modification: do not terminate before all create functions > > I don't think it makes sense to include "WebKit modification: " part. > > Are these tests not pulled in from somewhere else? The directory structure led > me to think so, but I don't know the history. I believe these tests are just based on examples from the carto.net site and are not meant to be merged back in the future. The only time we need to worry about making too many changes to tests is if they are from an external test suite.
Note You need to log in before you can comment on or make changes to this bug.