Bug 110144

Summary: clear databases before running read-transactions-running-concurrently test
Product: WebKit Reporter: jochen
Component: New BugsAssignee: jochen
Status: RESOLVED FIXED    
Severity: Normal CC: thakis, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description jochen 2013-02-18 11:50:37 PST
clear databases before running read-transactions-running-concurrently test
Comment 1 jochen 2013-02-18 11:51:19 PST
Created attachment 188926 [details]
Patch
Comment 2 Nico Weber 2013-02-18 12:59:38 PST
Comment on attachment 188926 [details]
Patch

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

> LayoutTests/ChangeLog:9
> +        of databases from previous tests are hanging around.

Shouldn't the test runner do this before running a test?
Comment 3 jochen 2013-02-18 13:01:54 PST
(In reply to comment #2)
> (From update of attachment 188926 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=188926&action=review
> 
> > LayoutTests/ChangeLog:9
> > +        of databases from previous tests are hanging around.
> 
> Shouldn't the test runner do this before running a test?

it's a rather expensive operation, as it hits the filesystem.
Comment 4 Nico Weber 2013-02-18 13:05:10 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 188926 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=188926&action=review
> > 
> > > LayoutTests/ChangeLog:9
> > > +        of databases from previous tests are hanging around.
> > 
> > Shouldn't the test runner do this before running a test?
> 
> it's a rather expensive operation, as it hits the filesystem.

How often? A single stat is relatively cheap since every test stats at least the html file and often a js and a css file. And I'd guess in most cases there's nothing to clean up.

(stating a .d file in ninja takes ~6µs on a medium-warm cache.)
Comment 5 jochen 2013-02-18 13:27:42 PST
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (From update of attachment 188926 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=188926&action=review
> > > 
> > > > LayoutTests/ChangeLog:9
> > > > +        of databases from previous tests are hanging around.
> > > 
> > > Shouldn't the test runner do this before running a test?
> > 
> > it's a rather expensive operation, as it hits the filesystem.
> 
> How often? A single stat is relatively cheap since every test stats at least the html file and often a js and a css file. And I'd guess in most cases there's nothing to clean up.
> 
> (stating a .d file in ninja takes ~6µs on a medium-warm cache.)

dunno, is that also true on e.g. android (or content shell, where we have to do this in another process)?

Anyway, this seems to be the common pattern, e.g. cookies tests also clean up after themselves, instead of DRT resetting the cookie store after every test (although you could argue that this would make sense as well)
Comment 6 Nico Weber 2013-02-18 13:28:59 PST
Comment on attachment 188926 [details]
Patch

ok ok
Comment 7 WebKit Review Bot 2013-02-18 13:53:42 PST
Comment on attachment 188926 [details]
Patch

Clearing flags on attachment: 188926

Committed r143261: <http://trac.webkit.org/changeset/143261>
Comment 8 WebKit Review Bot 2013-02-18 13:53:45 PST
All reviewed patches have been landed.  Closing bug.