Bug 71059 - run-leaks does not work on Lion?
Summary: run-leaks does not work on Lion?
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on:
Blocks: 66227 72356
  Show dependency treegraph
 
Reported: 2011-10-27 13:52 PDT by Eric Seidel (no email)
Modified: 2011-11-15 06:57 PST (History)
9 users (show)

See Also:


Attachments
Patch v1 (41.58 KB, patch)
2011-11-14 11:53 PST, David Kilzer (:ddkilzer)
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2011-10-27 13:52:11 PDT
? checking for leaks in DumpRenderTree
run-leaks: Could not parse leak count reported by leaks tool.
 - no leaks found

Makes it very difficult to fully test my changes for bug 66227.
Comment 1 David Kilzer (:ddkilzer) 2011-11-14 09:41:48 PST
<rdar://problem/10428527>
Comment 2 David Kilzer (:ddkilzer) 2011-11-14 09:43:00 PST
I have a fix, and a way to unit-test parseLeaksOutput() without modifying the run-leaks script.
Comment 3 David Kilzer (:ddkilzer) 2011-11-14 11:20:17 PST
(In reply to comment #2)
> I have a fix, and a way to unit-test parseLeaksOutput() without modifying the run-leaks script.

http://stackoverflow.com/questions/232475/is-it-possible-use-or-require-a-perl-script-without-executing-its-statements
Comment 4 David Kilzer (:ddkilzer) 2011-11-14 11:53:27 PST
Created attachment 114997 [details]
Patch v1
Comment 5 WebKit Review Bot 2011-11-14 11:56:17 PST
Attachment 114997 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/Scripts/run-leak..." exit_code: 1

Last 3072 characters of output:
/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:55:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:57:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:58:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:60:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:62:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:70:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:71:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:81:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:82:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:93:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:94:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:105:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:106:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:117:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:118:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:129:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:130:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:141:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:152:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:56:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:57:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:64:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:65:  Line contains tab character.  [whitespace/tab] [5]
Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:68:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 75 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Adam Roben (:aroben) 2011-11-14 12:01:45 PST
Comment on attachment 114997 [details]
Patch v1

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

> Tools/Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:36
> +eval "package RunLeaks; sub {" . read_file(File::Spec->catfile($FindBin::Bin, "../..", "run-leaks")) . "}";

It would be a little better to use "..", ".." instead of "../..". Ditto for your other test scripts.
Comment 7 David Kilzer (:ddkilzer) 2011-11-14 12:06:23 PST
(In reply to comment #5)
> Attachment 114997 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/Scripts/run-leak..." exit_code: 1
> [...]
> Total errors found: 75 in 5 files
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

Leaks output includes tabs, so I'll be adding the allow-tabs svn property when landing these tests.
Comment 8 David Kilzer (:ddkilzer) 2011-11-14 12:18:00 PST
Committed r100174: <http://trac.webkit.org/changeset/100174>
Comment 9 Tony Chang 2011-11-14 15:24:14 PST
The Windows and Linux (GTK/QT/Chromium) bots are complaining about File/Slurp.pm not being installed.  Can we write this without using Slurp or do we need to add this as a build dependency?
Comment 10 David Kilzer (:ddkilzer) 2011-11-14 19:21:34 PST
(In reply to comment #9)
> The Windows and Linux (GTK/QT/Chromium) bots are complaining about File/Slurp.pm not being installed.  Can we write this without using Slurp or do we need to add this as a build dependency?

It can probably be rewritten to not use File::Slurp.
Comment 11 David Kilzer (:ddkilzer) 2011-11-14 22:05:16 PST
(In reply to comment #10)
> (In reply to comment #9)
> > The Windows and Linux (GTK/QT/Chromium) bots are complaining about File/Slurp.pm not being installed.  Can we write this without using Slurp or do we need to add this as a build dependency?
> 
> It can probably be rewritten to not use File::Slurp.

http://stackoverflow.com/questions/953707/in-perl-how-can-i-read-an-entire-file-into-a-string
http://www.perlmonks.org/?node_id=1952
Comment 12 David Kilzer (:ddkilzer) 2011-11-14 23:21:16 PST
(In reply to comment #9)
> The Windows and Linux (GTK/QT/Chromium) bots are complaining about File/Slurp.pm not being installed.  Can we write this without using Slurp or do we need to add this as a build dependency?

Filed Bug 72356: Don't use File::Slurp for run-leaks unit tests
Comment 13 Csaba Osztrogonác 2011-11-15 06:57:09 PST
(In reply to comment #9)
> The Windows and Linux (GTK/QT/Chromium) bots are complaining about File/Slurp.pm not being installed.  Can we write this without using Slurp or do we need to add this as a build dependency?

I installed libfile-slurp-perl to the Qt bots, so it won't be problem anymore.