Bug 83176 - gtk_unittest.GtkPortTest.test_get_crash_log failing on windows
Summary: gtk_unittest.GtkPortTest.test_get_crash_log failing on windows
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: Philippe Normand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-04 10:08 PDT by Tony Chang
Modified: 2012-04-05 11:16 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.43 KB, patch)
2012-04-04 10:16 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (3.38 KB, patch)
2012-04-05 00:48 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2012-04-04 10:08:30 PDT
http://build.webkit.org/builders/Chromium%20Win%20Release%20%28Tests%29/builds/25106/steps/webkitpy-test/logs/stdio

Looks like it's been failing since it was added in http://trac.webkit.org/changeset/113037 .

Should we skip this test on Windows?
Comment 1 Philippe Normand 2012-04-04 10:13:33 PDT
Oh sorry about that!

Yeah I guess it's safe to not run this test on non-linux platforms.
Comment 2 Philippe Normand 2012-04-04 10:16:38 PDT
Created attachment 135618 [details]
Patch
Comment 3 Tony Chang 2012-04-04 10:24:08 PDT
Comment on attachment 135618 [details]
Patch

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

> Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py:72
> +        if sys.platform != "linux2":

What about linux3 (I think newer kernels show up as linux3)?  I normally just do sys.platform.startswith("linux").
Comment 4 Philippe Normand 2012-04-04 10:29:47 PDT
Committed r113210: <http://trac.webkit.org/changeset/113210>
Comment 5 Philippe Normand 2012-04-04 10:30:38 PDT
(In reply to comment #3)
> (From update of attachment 135618 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=135618&action=review
> 
> > Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py:72
> > +        if sys.platform != "linux2":
> 
> What about linux3 (I think newer kernels show up as linux3)?  I normally just do sys.platform.startswith("linux").

Oh I didn't know about that linux3 :) I landed the modified patch. Thanks!
Comment 6 Dirk Pranke 2012-04-04 12:04:07 PDT
I'm generally not a fan of skipping unit tests on different platforms; if this test is failing on windows, it suggests that it's either not correctly written or it depends on something in the environment or operating system. If it's the latter, we should probably rename this to integration_test_get_crash_log() to be clearer ...
Comment 7 Philippe Normand 2012-04-05 00:38:08 PDT
(In reply to comment #6)
> I'm generally not a fan of skipping unit tests on different platforms; if this test is failing on windows, it suggests that it's either not correctly written or it depends on something in the environment or operating system. If it's the latter, we should probably rename this to integration_test_get_crash_log() to be clearer ...

Indeed I was too quick skipping this on non-linux, the mock crash log used in the test is using  %(core_directory)s/core-pid_%%p-_-process_%%e instead of building the path with os.path.join().

I'll send a new patch.
Comment 8 Philippe Normand 2012-04-05 00:48:45 PDT
Created attachment 135771 [details]
Patch
Comment 9 Tony Chang 2012-04-05 10:26:06 PDT
Comment on attachment 135771 [details]
Patch

If GtkPort._get_crash_log used FileSystem.join and you used MockFileSystem in the test, you would always get / when running the test since MockFileSystem always uses / as the separator.

This seems fine too.
Comment 10 Dirk Pranke 2012-04-05 10:38:07 PDT
Comment on attachment 135771 [details]
Patch

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

> Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py:60
> +        core_pattern = os.path.join(core_directory, "core-pid_%p-_-process_%e")

This should probably be port._filesystem.join() (and moved below the self.make_port() call), else you'll get diffs on windows from backslashes in the path, I expect.
Comment 11 WebKit Review Bot 2012-04-05 11:16:16 PDT
Comment on attachment 135771 [details]
Patch

Clearing flags on attachment: 135771

Committed r113339: <http://trac.webkit.org/changeset/113339>
Comment 12 WebKit Review Bot 2012-04-05 11:16:21 PDT
All reviewed patches have been landed.  Closing bug.