Bug 232453

Summary: Make run-javascript-core-test and run-jsc-stress-tests support a customized identity file
Product: WebKit Reporter: Zhifei Fang <zhifei_fang>
Component: Tools / TestsAssignee: Zhifei Fang <zhifei_fang>
Status: RESOLVED FIXED    
Severity: Normal CC: angelos, ap, davidlwpablo, dewei_zhu, ews-watchlist, jbedard, keith_miller, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing none

Description Zhifei Fang 2021-10-28 13:25:40 PDT
Make run-javascript-core-test and run-jsc-stress-tests support a customized identity file
Comment 1 Zhifei Fang 2021-10-28 15:51:59 PDT
Created attachment 442758 [details]
Patch
Comment 2 Zhifei Fang 2021-10-28 18:23:52 PDT
Created attachment 442772 [details]
Patch
Comment 4 Zhifei Fang 2021-11-01 11:23:05 PDT
Created attachment 442999 [details]
Patch
Comment 5 Zhifei Fang 2021-11-01 13:48:53 PDT
Hi, Angelos,

Are those known failure? 


wasm.yaml/wasm/wast-tests/harness.js.(br-if-at-end-of-block.wasm)-wasm-no-tls-context: Exception: ReferenceError: Can't find variable: WebAssembly
wasm.yaml/wasm/wast-tests/harness.js.(br-if-at-end-of-block.wasm)-wasm-no-tls-context: global code@harness.js:6:45
wasm.yaml/wasm/wast-tests/harness.js.(br-if-at-end-of-block.wasm)-wasm-no-tls-context: ERROR: Unexpected exit code: 3
FAIL: wasm.yaml/wasm/wast-tests/harness.js.(br-if-at-end-of-block.wasm)-wasm-no-tls-context
Running wasm.yaml/wasm/wast-tests/harness.js.(osr-entry-inner-loop-branch-above-no-consts.wasm)-wasm-no-tls-context
Comment 6 Angelos Oikonomopoulos 2021-11-01 14:56:35 PDT
(In reply to Zhifei Fang from comment #5)
> Hi, Angelos,
> 
> Are those known failure? 
> 
> 
> wasm.yaml/wasm/wast-tests/harness.js.(br-if-at-end-of-block.wasm)-wasm-no-
> tls-context: Exception: ReferenceError: Can't find variable: WebAssembly
> wasm.yaml/wasm/wast-tests/harness.js.(br-if-at-end-of-block.wasm)-wasm-no-
> tls-context: global code@harness.js:6:45
> wasm.yaml/wasm/wast-tests/harness.js.(br-if-at-end-of-block.wasm)-wasm-no-
> tls-context: ERROR: Unexpected exit code: 3
> FAIL:
> wasm.yaml/wasm/wast-tests/harness.js.(br-if-at-end-of-block.wasm)-wasm-no-
> tls-context
> Running
> wasm.yaml/wasm/wast-tests/harness.js.(osr-entry-inner-loop-branch-above-no-
> consts.wasm)-wasm-no-tls-context

No. This has exactly the same symptoms as the bug fixed in https://bugs.webkit.org/show_bug.cgi?id=226009. And indeed, if you check the logs you can see that run-jsc-stress-tests is getting run with --arch 0 which is obviously an invalid architecture name. Though I have no idea where that zero is coming from. AFAICT this is not happening to concurrent EWS runs for mips, so perhaps it's a side effect of the patch?
Comment 7 Angelos Oikonomopoulos 2021-11-01 15:02:04 PDT
Oh now that I skimmed the patch, I'd take a close look at the change in webkitdirs.pm.
Comment 8 Angelos Oikonomopoulos 2021-11-03 09:01:25 PDT
(In reply to Angelos Oikonomopoulos from comment #7)
> Oh now that I skimmed the patch, I'd take a close look at the change in
> webkitdirs.pm.

Hi, in case it helps, the issue with the change in webkitdirs.pm

-            $output = `ssh -o NoHostAuthenticationForLocalhost=yes -p $port $target 'uname  -m'`;
+            my $cmd = 'ssh -o NoHostAuthenticationForLocalhost=yes '. (exists $remote->{'idFilePath'} ? ('-i '.$remote->{'idFilePath'}) : '') ." -p $port $target 'uname  -m'";
+            $output = system($cmd);

seems to be that the new code calls system(), so it doesn't actually capture the command output (it just runs it) and it appears reading from the uninitialized `my $output` variable gives back a zero.
Comment 9 Angelos Oikonomopoulos 2021-11-03 09:03:29 PDT
@@ -276,6 +276,7 @@ GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT],
         $remote = true
         uri = URI("ssh://" + arg)
         $remoteHosts << RemoteHost.new("default-#{$remoteHosts.length}", uri.user, uri.host, uri.port)
+        $remoteHosts[0].identity_file_path = '~/.ssh/id_rsa'
     when '--remote-config-file'
         $remoteConfigFile = arg

Apropos, is it a good idea to set a file path here? Isn't it simpler to not pass in `-i` if identity_file_path is nil. This way, we don't hardcode ssh's current default.
Comment 10 Radar WebKit Bug Importer 2021-11-04 13:26:17 PDT
<rdar://problem/85031252>
Comment 11 Zhifei Fang 2021-11-08 11:14:54 PST
Created attachment 443575 [details]
Patch
Comment 12 Zhifei Fang 2021-11-08 17:58:11 PST
Created attachment 443643 [details]
Patch
Comment 13 Ryan Haddad 2021-11-09 13:14:39 PST
Comment on attachment 443643 [details]
Patch

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

> Tools/Scripts/run-jsc-stress-tests:352
> +    print $remoteHosts[0].identity_file_path

Is this print intentional?
Comment 14 Zhifei Fang 2021-11-12 16:07:19 PST
Created attachment 444118 [details]
Patch
Comment 15 Zhifei Fang 2021-11-12 16:08:20 PST
(In reply to Ryan Haddad from comment #13)
> Comment on attachment 443643 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=443643&action=review
> 
> > Tools/Scripts/run-jsc-stress-tests:352
> > +    print $remoteHosts[0].identity_file_path
> 
> Is this print intentional?

Yes, I have made it print only there is an identity file path.
Comment 16 Zhifei Fang 2021-11-15 18:13:28 PST
Created attachment 444325 [details]
Patch
Comment 17 Zhifei Fang 2021-11-16 11:00:12 PST
Created attachment 444412 [details]
Patch for landing
Comment 18 EWS 2021-11-16 11:31:50 PST
Committed r285875 (244301@main): <https://commits.webkit.org/244301@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444412 [details].