Bug 32778 - Fix Perl equality warning in run-webkit-tests
Summary: Fix Perl equality warning in run-webkit-tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-19 16:07 PST by Daniel Bates
Modified: 2009-12-29 00:31 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.15 KB, patch)
2009-12-19 16:09 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (1.58 KB, patch)
2009-12-19 16:40 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (1.55 KB, patch)
2009-12-19 16:48 PST, Daniel Bates
eric: review-
Details | Formatted Diff | Diff
Patch (1.55 KB, patch)
2009-12-19 17:09 PST, Daniel Bates
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 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.
Comment 1 Daniel Bates 2009-12-19 16:09:23 PST
Created attachment 45251 [details]
Patch
Comment 2 WebKit Review Bot 2009-12-19 16:11:35 PST
style-queue ran check-webkit-style on attachment 45251 [details] without any errors.
Comment 3 Eric Seidel (no email) 2009-12-19 16:31:32 PST
Comment on attachment 45251 [details]
Patch

Why not converting the string to a number?  or using !?
Comment 4 Daniel Bates 2009-12-19 16:40:28 PST
Created attachment 45252 [details]
Patch

Changed $diffPercentage to be a number.
Comment 5 WebKit Review Bot 2009-12-19 16:42:09 PST
style-queue ran check-webkit-style on attachment 45252 [details] without any errors.
Comment 6 Daniel Bates 2009-12-19 16:48:23 PST
Created attachment 45253 [details]
Patch
Comment 7 WebKit Review Bot 2009-12-19 16:52:29 PST
style-queue ran check-webkit-style on attachment 45253 [details] without any errors.
Comment 8 Eric Seidel (no email) 2009-12-19 17:01:09 PST
Comment on attachment 45253 [details]
Patch

LGTM.
Comment 9 Eric Seidel (no email) 2009-12-19 17:03:46 PST
Comment on attachment 45253 [details]
Patch

As you pointed out on IRC... decimal percentages.
Comment 10 Daniel Bates 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.
Comment 11 WebKit Review Bot 2009-12-19 17:12:55 PST
style-queue ran check-webkit-style on attachment 45254 [details] without any errors.
Comment 12 Eric Seidel (no email) 2009-12-20 23:00:00 PST
Comment on attachment 45254 [details]
Patch

Looks OK.
Comment 13 Eric Seidel (no email) 2009-12-28 22:41:03 PST
Attachment 45254 [details] was posted by a committer and has review+, assigning to Daniel Bates for commit.
Comment 14 Daniel Bates 2009-12-29 00:31:44 PST
Committed in <http://trac.webkit.org/changeset/52613>.