Bug 141000 - Make run-jsc-stress-tests --remote work on Linux too
Summary: Make run-jsc-stress-tests --remote work on Linux too
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: Csaba Osztrogonác
URL:
Keywords:
Depends on:
Blocks: 141165
  Show dependency treegraph
 
Reported: 2015-01-28 09:54 PST by Csaba Osztrogonác
Modified: 2015-02-02 11:15 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.64 KB, patch)
2015-01-28 10:01 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2015-01-28 09:54:20 PST
Now the --remote option of run-jsc-stress-tests works only 
on Mac, it would be great to be able use it on Linux too.
Comment 1 Csaba Osztrogonác 2015-01-28 10:01:05 PST
Created attachment 245549 [details]
Patch

I have no idea if it will work on iOS, so it would be good if an iOS expert can review it.
Comment 2 Csaba Osztrogonác 2015-01-28 10:07:45 PST
Some additional info why we need this changes:

- The runner script is run with "sh runner" command and sh is dash on
Debian/Ubuntu distros, so we have to remove the function bashisms.

- find doesn't have "-depth N" option on Linux, but "-maxdepth N"
is available on Linux and Mac too and do the same in this case.

- find warns if we put an option after a non-option argument, so
we should put is before the -name.
("find: warning: you have specified the -maxdepth option after a non-option argument -name, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.")

- trap of dash doesn't know SIGINT SIGHUP SIGTERM signals, but bash and dash
know INT HUP TERM signals, so let's replace them.
Comment 3 Darin Adler 2015-01-28 16:32:59 PST
Comment on attachment 245549 [details]
Patch

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

> Tools/Scripts/jsc-stress-test-helpers/shell-runner.sh:24
> +numProcs=`sysctl -n hw.activecpu 2>/dev/null`

A lot of times this pattern is dangerous; if there is some failure it is silently sent to the bit bucket. Do we really need to do this?
Comment 4 Csaba Osztrogonác 2015-01-29 04:48:46 PST
Comment on attachment 245549 [details]
Patch

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

>> Tools/Scripts/jsc-stress-test-helpers/shell-runner.sh:24
>> +numProcs=`sysctl -n hw.activecpu 2>/dev/null`
> 
> A lot of times this pattern is dangerous; if there is some failure it is silently sent to the bit bucket. Do we really need to do this?

It always dumps error on Linux:
"sysctl: cannot stat /proc/sys/hw/activecpu: No such file or directory"

We don't need useless error/warning messages always on Linux, 
and we already use the same pattern for nproc in line27 and in
jsc-stress-tests too. I think it's safe, because we handle
the return code/value properly everywhere.
Comment 5 WebKit Commit Bot 2015-01-29 05:33:50 PST
Comment on attachment 245549 [details]
Patch

Clearing flags on attachment: 245549

Committed r179343: <http://trac.webkit.org/changeset/179343>
Comment 6 WebKit Commit Bot 2015-01-29 05:33:54 PST
All reviewed patches have been landed.  Closing bug.