Changeset 121394 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Jun 27, 2012, 6:14:20 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r121393 r121394 1 2012-06-27 Michael Saboff <[email protected]> 2 3 [Win] jscore-tests flakey 4 https://bugs.webkit.org/show_bug.cgi?id=88118 5 6 Reviewed by Jessie Berlin. 7 8 jsDriver.pl on windows intermittently doesn't get the returned value from jsc, 9 instead it gets 126. Added a new option to jsc (-x) which prints the exit 10 code before exiting. jsDriver.pl uses this option on Windows and parses the 11 exit code output for the exit code, removing it before comparing the actual 12 and expected outputs. Filed a follow on "FIXME" defect: 13 [WIN] Intermittent failure for jsc return value to propagate through jsDriver.pl 14 https://bugs.webkit.org/show_bug.cgi?id=90119 15 16 * jsc.cpp: 17 (CommandLine::CommandLine): 18 (CommandLine): 19 (printUsageStatement): 20 (parseArguments): 21 (jscmain): 22 * tests/mozilla/jsDriver.pl: 23 (execute_tests): 24 1 25 2012-06-27 Sheriff Bot <[email protected]> 2 26 -
trunk/Source/JavaScriptCore/jsc.cpp
r121381 r121394 118 118 : interactive(false) 119 119 , dump(false) 120 , exitCode(false) 120 121 { 121 122 } … … 123 124 bool interactive; 124 125 bool dump; 126 bool exitCode; 125 127 Vector<Script> scripts; 126 128 Vector<UString> arguments; … … 612 614 fprintf(stderr, " -s Installs signal handlers that exit on a crash (Unix platforms only)\n"); 613 615 #endif 616 fprintf(stderr, " -x Output exit code before terminating\n"); 614 617 615 618 exit(help ? EXIT_SUCCESS : EXIT_FAILURE); … … 650 653 continue; 651 654 } 655 if (!strcmp(arg, "-x")) { 656 options.exitCode = true; 657 continue; 658 } 652 659 if (!strcmp(arg, "--")) { 653 660 ++i; … … 668 675 int jscmain(int argc, char** argv) 669 676 { 670 671 677 RefPtr<JSGlobalData> globalData = JSGlobalData::create(ThreadStackTypeLarge, LargeHeap); 672 678 JSLockHolder lock(globalData.get()); 679 int result; 673 680 674 681 CommandLine options; … … 680 687 runInteractive(globalObject); 681 688 682 return success ? 0 : 3; 689 result = success ? 0 : 3; 690 691 if (options.exitCode) 692 printf("jsc exiting %d\n", result); 693 694 return result; 683 695 } 684 696 -
trunk/Source/JavaScriptCore/tests/mozilla/jsDriver.pl
r36607 r121394 165 165 my $bug_number; 166 166 my $status_lines; 167 my @jsc_exit_code; 167 168 168 169 # user selected [Q]uit from ^C handler. … … 178 179 179 180 $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 181 195 $path = &xp_path($opt_suite_path . $suite . "/shell.js"); 182 196 if (-f $path) { … … 203 217 @output = <OUTPUT>; 204 218 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) { 209 232 # signal information in the lower 8 bits, exit code above that 210 233 $got_exit = ($? >> 8);
Note:
See TracChangeset
for help on using the changeset viewer.