Bug 107881 - webkit-patch rebaseline-expectations deletes TestExpectations file
Summary: webkit-patch rebaseline-expectations deletes TestExpectations file
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-24 16:52 PST by Emil A Eklund
Modified: 2013-03-04 16:43 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emil A Eklund 2013-01-24 16:52:05 PST
Calling webkit-patch rebaseline-expectations to rebaseline expectations marked with [ Rebaseline] ends up deleting the entire file. It prints a long list of tests to rebaseline (which, correctly, is the list of test marked as Rebaseline) and then pretends to rebaseline those. In the end the only change it makes though is to _delete_ the TestExpectaitons file.
Comment 1 Eric Seidel (no email) 2013-01-24 16:52:53 PST
That sounds bad. :)
Comment 2 Dirk Pranke 2013-01-25 08:27:51 PST
wow. does it leave a zero-length/empty file, or actually delete it?
Comment 3 Dirk Pranke 2013-01-25 09:29:23 PST
I should also note that when I've seen the "pretends to rebaseline" phenomenon before, it seems to be that the the baselines in your checkout actually match what the bots are producing (and so there's nothing to actually update). In this situation we silently delete the rebaseline line and move on, rather than logging something like "bots match your checkout, nothing to rebaseline". Perhaps the latter would be more useful?

Is it possible you were seeing something like this?
Comment 4 Emil A Eklund 2013-01-25 10:01:40 PST
(In reply to comment #2)
> wow. does it leave a zero-length/empty file, or actually delete it?

Zero-length file.


> I should also note that when I've seen the "pretends to rebaseline" phenomenon before, it seems to be that the the baselines in your checkout actually match what the bots are producing (and so there's nothing to actually update). In this situation we silently delete the rebaseline line and move on, rather than logging something like "bots match your checkout, nothing to rebaseline". Perhaps the latter would be more useful?

Not sure. Executing "webkit-patch rebaseline <single test>" did rebaseline that test (but got the results mixed up between bots) so there certainly was work for it todo.
Comment 5 Dirk Pranke 2013-01-25 11:33:00 PST
(In reply to comment #4)
> (In reply to comment #2)
> > wow. does it leave a zero-length/empty file, or actually delete it?
> 
> Zero-length file.
> 

Okay, well, if the file consisted entire of lines marked with [ Rebaseline ], and the tool thought it rebaselined everything, then this is what I would've expected to happen.

Which at least reduces to the problem of "why did it only pretend to rebaseline"?

> 
> Not sure. Executing "webkit-patch rebaseline <single test>" did rebaseline that test (but got the results mixed up between bots) so there certainly was work for it todo.

Interesting. Offhand I can't guess why 'rebaseline' would do something but 'rebaseline-expectations' wouldn't, except that the bots were probably in different states. Not sure if that would've mattered.

I'll see if I can reproduce something like this. You don't by chance have a copy of the file marked up for rebaselining?
Comment 6 Emil A Eklund 2013-01-25 11:38:01 PST
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #2)
> > > wow. does it leave a zero-length/empty file, or actually delete it?
> > 
> > Zero-length file.
> > 
> 
> Okay, well, if the file consisted entire of lines marked with [ Rebaseline ], and the tool thought it rebaselined everything, then this is what I would've expected to happen.

I would have expected it to remove lines marked as [ Rebaseline ] and leave all other lines intact. While it _did_ remove the ones marked [ Rebaseline ] it also removed all other lines.

> 
> Which at least reduces to the problem of "why did it only pretend to rebaseline"?
> 
> > 
> > Not sure. Executing "webkit-patch rebaseline <single test>" did rebaseline that test (but got the results mixed up between bots) so there certainly was work for it todo.
> 
> Interesting. Offhand I can't guess why 'rebaseline' would do something but 'rebaseline-expectations' wouldn't, except that the bots were probably in different states. Not sure if that would've mattered.
> 
> I'll see if I can reproduce something like this. You don't by chance have a copy of the file marked up for rebaselining?

All TestExpectations lines marked 107771 when synced to r140728.
Comment 7 Dirk Pranke 2013-01-25 11:41:29 PST
Oh, sorry, I misread the first comment. I thought you were saying the file *only* contained lines marked with [ Rebaseline ]. It certainly shouldn't delete the other lines.

My first thought as to how that could've happened is some failure in serializing the in-memory expectations out that was caught and suppressed incorrectly (causing us to discard all the other expectations). I'll take a look at that.