Summary: | [webkitpy] Executive.running_pids() sometimes doesn't correctly process "ps" output | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Philippe Normand <pnormand> | ||||
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | abarth, ossy | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Created attachment 99085 [details]
proposed patch
BTW this issue showed up in GTK bots but I think it's not specific to them. The test-webkipy failure: ====================================================================== FAIL: test_running_pids (webkitpy.common.system.executive_unittest.ExecutiveTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/build/gtk-linux-32-release/build/Tools/Scripts/webkitpy/common/system/executive_unittest.py", line 209, in test_running_pids self.assertTrue(os.getpid() in pids) AssertionError ---------------------------------------------------------------------- Comment on attachment 99085 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=99085&action=review > Tools/Scripts/webkitpy/common/system/executive.py:306 > + # in some cases the line can contain one or more in -> In Committed r90016: <http://trac.webkit.org/changeset/90016> Comment on attachment 99085 [details]
proposed patch
Thanks! You guys are awesome.
|
$ ps -eo pid,comm PID COMMAND 1 init 1985 dbus-daemon 2128 dbus-daemon 2733 rsyslogd 19049 dbus-daemon 19128 dbus-daemon ^ See the leading white space? For those lines the pid won't be added to the list because: >>> " 1985 dbus-daemon".split(' ', 1) ['', '1985 dbus-daemon'] So line 308 of executive.py will raise a ValueError because pid="". I'll work on a patch for this issue.