runCommand doesn't work in Windows Perl https://build.webkit.org/builders/WinCairo%2064-bit%20WKL%20Release%20%28Tests%29/builds/4540 > Tools/Scripts/webkitperl/VCSUtils_unittest/removeEOL.pl ............................................ ok > '-' is not recognized as an internal or external command, > operable program or batch file. > > # Failed test 'runCommand(): Simple: comparing return value.' > # at Tools/Scripts/webkitperl/VCSUtils_unittest/runCommand.pl line 74. > # Structures begin differing at: > # $got->{stdout} = Does not exist > # $expected->{stdout} = 'hello > # ' > '-' is not recognized as an internal or external command, > operable program or batch file. > > # Failed test 'runCommand(): Multiple commands: comparing return value.' > # at Tools/Scripts/webkitperl/VCSUtils_unittest/runCommand.pl line 74. > # Structures begin differing at: > # $got->{stdout} = Does not exist > # $expected->{stdout} = 'first-command;echo second-command > # ' > '-' is not recognized as an internal or external command, > operable program or batch file. > > # Failed test 'runCommand(): Non-existent command: comparing return value.' > # at Tools/Scripts/webkitperl/VCSUtils_unittest/runCommand.pl line 74. > # Structures begin differing at: > # $got->{exitStatus} = '1' > # $expected->{exitStatus} = '2' > # Looks like you failed 3 tests of 3. > Tools/Scripts/webkitperl/VCSUtils_unittest/runCommand.pl ...........................................
Created attachment 374369 [details] Patch
Comment on attachment 374369 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374369&action=review > Tools/Scripts/VCSUtils.pm:-2419 > - # FIXME: Consider further hardening of this function, including sanitizing the environment. Isn't this FIXME still relevant?
Comment on attachment 374369 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374369&action=review >> Tools/Scripts/VCSUtils.pm:-2419 >> - # FIXME: Consider further hardening of this function, including sanitizing the environment. > > Isn't this FIXME still relevant? Hmm, I don't know. OK, I will keep it.
Created attachment 374374 [details] Patch
Comment on attachment 374374 [details] Patch Attachment 374374 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/12765515 New failing tests: storage/indexeddb/dont-wedge.html
Created attachment 374379 [details] Archive of layout-test-results from ews116 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-highsierra Platform: Mac OS X 10.13.6
Created attachment 374589 [details] Patch
https://perldoc.perl.org/functions/open.html In Windows, 'echo' is a internal command of 'cmd.exe'. So, there is no 'echo.exe'. As the result, 'open' fails as 'No such file or directory' in "list form" of 'open'. There are two ways to use 'echo' in Win32 Perl. One is using three-argument form to execute the string in shell. Another is explicitly using 'cmd' in "list form". test.pl: > use Data::Dumper; > > my $ret = open(my $fh, "-|", "echo", "a", "b"); > my @out = <$fh>; > print Dumper($ret, \@out, $!); > > my $ret = open(my $fh, "-|", "echo a b"); > my @out = <$fh>; > print Dumper($ret, \@out, $!); > > my $ret = open(my $fh, "-|", "cmd", "/C", "echo", "a", "b"); > my @out = <$fh>; > print Dumper($ret, \@out, $!); Win32 Perl Output: > $VAR1 = undef; > $VAR2 = []; > $VAR3 = 'No such file or directory'; > $VAR1 = 14764; > $VAR2 = [ > 'a b > ' > ]; > $VAR3 = ''; > $VAR1 = 5668; > $VAR2 = [ > 'a b > ' > ]; > $VAR3 = '';
Comment on attachment 374589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374589&action=review > Tools/Scripts/webkitperl/VCSUtils_unittest/runCommand.pl:38 > + inputArgs => ["perl", "-e", "print \@ARGV", "hello"], Should we potentially use $^X here and below rather than always trying to search for perl in the path?
Comment on attachment 374589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374589&action=review >> Tools/Scripts/webkitperl/VCSUtils_unittest/runCommand.pl:38 >> + inputArgs => ["perl", "-e", "print \@ARGV", "hello"], > > Should we potentially use $^X here and below rather than always trying to search for perl in the path? Good idea. Will do so.
Created attachment 374750 [details] Patch
Comment on attachment 374750 [details] Patch Clearing flags on attachment: 374750 Committed r247808: <https://trac.webkit.org/changeset/247808>
All reviewed patches have been landed. Closing bug.
<rdar://problem/53523914>