Changeset 121394 in webkit for trunk/Source/JavaScriptCore/tests


Ignore:
Timestamp:
Jun 27, 2012, 6:14:20 PM (13 years ago)
Author:
[email protected]
Message:

[Win] jscore-tests flakey
https://bugs.webkit.org/show_bug.cgi?id=88118

Reviewed by Jessie Berlin.

jsDriver.pl on windows intermittently doesn't get the returned value from jsc,
instead it gets 126. Added a new option to jsc (-x) which prints the exit
code before exiting. jsDriver.pl uses this option on Windows and parses the
exit code output for the exit code, removing it before comparing the actual
and expected outputs. Filed a follow on "FIXME" defect:
[WIN] Intermittent failure for jsc return value to propagate through jsDriver.pl
https://bugs.webkit.org/show_bug.cgi?id=90119

  • jsc.cpp:

(CommandLine::CommandLine):
(CommandLine):
(printUsageStatement):
(parseArguments):
(jscmain):

  • tests/mozilla/jsDriver.pl:

(execute_tests):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/tests/mozilla/jsDriver.pl

    r36607 r121394  
    165165        my $bug_number;
    166166        my $status_lines;
     167        my @jsc_exit_code;
    167168       
    168169# user selected [Q]uit from ^C handler.
     
    178179           
    179180            $shell_command .= &xp_path($engine_command)  . " -s ";
    180            
     181
     182# FIXME: <https://bugs.webkit.org/show_bug.cgi?id=90119>
     183# Sporadically on Windows, the exit code returned after close() in $?
     184# is 126 (after the appropraite shifting, even though jsc exits with
     185# 0 or 3). To work around this, a -x option was added to jsc that will
     186# output the exit value right before exiting.  We parse that value and
     187# remove it from the output stream before comparing the actual and expected
     188# outputs. When that bug is found and fixed, the code for processing of
     189# "jsc exiting [\d]" and use of @jsc_exit_code can be removed along with
     190# the -x option in jsc.cpp
     191            if ($os_type eq "WIN") {
     192                $shell_command .= " -x ";
     193            }
     194
    181195            $path = &xp_path($opt_suite_path . $suite . "/shell.js");
    182196            if (-f $path) {
     
    203217        @output = <OUTPUT>;
    204218        close (OUTPUT);
    205        
    206         @output = grep (!/js\>/, @output);
    207        
    208         if ($opt_exit_munge == 1) {
     219
     220        @jsc_exit_code = grep (/jsc exiting [\d]/, @output);
     221        @output = grep (!/js\>|jsc exiting [\d]/, @output);
     222
     223        if (($#jsc_exit_code == 0) && ($jsc_exit_code[0] =~ /jsc exiting ([\d])\W*/)) {
     224# return value from jsc output to work around windows bug
     225            $got_exit = $1;
     226            if ($opt_exit_munge == 1) {
     227                $exit_signal = ($? & 255);
     228            } else {
     229                $exit_signal = 0;
     230            }
     231        } elsif ($opt_exit_munge == 1) {
    209232# signal information in the lower 8 bits, exit code above that
    210233            $got_exit = ($? >> 8);
Note: See TracChangeset for help on using the changeset viewer.