Bug 21531 - svg/carto.net/window.svg has race condition
Summary: svg/carto.net/window.svg has race condition
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-10 14:01 PDT by Pam Greene (IRC:pamg)
Modified: 2008-10-13 11:53 PDT (History)
1 user (show)

See Also:


Attachments
Fixes race + new results (139.30 KB, patch)
2008-10-10 14:44 PDT, Pam Greene (IRC:pamg)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pam Greene (IRC:pamg) 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.
Comment 1 Pam Greene (IRC:pamg) 2008-10-10 14:44:01 PDT
Created attachment 24275 [details]
Fixes race + new results
Comment 2 Darin Adler 2008-10-10 16:22:10 PDT
Comment on attachment 24275 [details]
Fixes race + new results

rs=me
Comment 3 Sam Weinig 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.
Comment 4 Adam Barth 2008-10-12 13:45:01 PDT
I'll land this.
Comment 5 Adam Barth 2008-10-12 18:57:31 PDT
Fixed r37544.
Comment 6 Pam Greene (IRC:pamg) 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.
Comment 7 Sam Weinig 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.