Bug 32778

Summary: Fix Perl equality warning in run-webkit-tests
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, bweinstein, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
eric: review-
Patch eric: review+

Daniel Bates
Reported 2009-12-19 16:07:27 PST
Notice the variable $diffPercentage is initialized to be an empty string on line 711 <http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/run-webkit-tests?rev=52296#L711>. But on line 770 <http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/run-webkit-tests?rev=52296#L770> we perform a numerical equality test (==). Instead, we should be performing a string equality test (eq). Otherwise, Perl may throw the following warning: Argument "" isn't numeric in numeric eq (==) at WebKitTools/Scripts/run-webkit-tests line 770.
Attachments
Patch (1.15 KB, patch)
2009-12-19 16:09 PST, Daniel Bates
no flags
Patch (1.58 KB, patch)
2009-12-19 16:40 PST, Daniel Bates
no flags
Patch (1.55 KB, patch)
2009-12-19 16:48 PST, Daniel Bates
eric: review-
Patch (1.55 KB, patch)
2009-12-19 17:09 PST, Daniel Bates
eric: review+
Daniel Bates
Comment 1 2009-12-19 16:09:23 PST
WebKit Review Bot
Comment 2 2009-12-19 16:11:35 PST
style-queue ran check-webkit-style on attachment 45251 [details] without any errors.
Eric Seidel (no email)
Comment 3 2009-12-19 16:31:32 PST
Comment on attachment 45251 [details] Patch Why not converting the string to a number? or using !?
Daniel Bates
Comment 4 2009-12-19 16:40:28 PST
Created attachment 45252 [details] Patch Changed $diffPercentage to be a number.
WebKit Review Bot
Comment 5 2009-12-19 16:42:09 PST
style-queue ran check-webkit-style on attachment 45252 [details] without any errors.
Daniel Bates
Comment 6 2009-12-19 16:48:23 PST
WebKit Review Bot
Comment 7 2009-12-19 16:52:29 PST
style-queue ran check-webkit-style on attachment 45253 [details] without any errors.
Eric Seidel (no email)
Comment 8 2009-12-19 17:01:09 PST
Comment on attachment 45253 [details] Patch LGTM.
Eric Seidel (no email)
Comment 9 2009-12-19 17:03:46 PST
Comment on attachment 45253 [details] Patch As you pointed out on IRC... decimal percentages.
Daniel Bates
Comment 10 2009-12-19 17:09:54 PST
Created attachment 45254 [details] Patch Reverted to $1 + 0 as in a previous attached version of the patch so that we can handle decimal percentages.
WebKit Review Bot
Comment 11 2009-12-19 17:12:55 PST
style-queue ran check-webkit-style on attachment 45254 [details] without any errors.
Eric Seidel (no email)
Comment 12 2009-12-20 23:00:00 PST
Comment on attachment 45254 [details] Patch Looks OK.
Eric Seidel (no email)
Comment 13 2009-12-28 22:41:03 PST
Attachment 45254 [details] was posted by a committer and has review+, assigning to Daniel Bates for commit.
Daniel Bates
Comment 14 2009-12-29 00:31:44 PST
Note You need to log in before you can comment on or make changes to this bug.