Skip to content

Commit

Permalink
Make JSC stress tests CLoop aware.
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=266336
rdar://119612009

Reviewed by Justin Michaud.

Add a --cloop option to run-javascriptcore-tests and run-jsc-stress-tests.  This should be used when running
the JSC tests on a CLoop build.  --cloop automatically implies --no-jit.

Skip JIT tests and Wasm tests when running cloop.

Also skip JSTests/stress/codeblock-destructor-access-unlinkedcodeblock.js when running CLoop.  It is too slow
for CLoop builds.

* JSTests/stress/codeblock-destructor-access-unlinkedcodeblock.js:
* Tools/Scripts/run-javascriptcore-tests:
(runJSCStressTests):
* Tools/Scripts/run-jsc-stress-tests:

Canonical link: https://commits.webkit.org/271983@main
  • Loading branch information
Mark Lam committed Dec 13, 2023
1 parent 4c56da2 commit 4d6f500
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ skip if $memoryLimited || $buildType == "debug"
//@ skip if $memoryLimited || $buildType == "debug" || $cloop
//@ runDefault("--returnEarlyFromInfiniteLoopsForFuzzing=1")
//@ slow!

Expand Down
8 changes: 7 additions & 1 deletion Tools/Scripts/run-javascriptcore-tests
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env perl

# Copyright (C) 2005-2017 Apple Inc. All rights reserved.
# Copyright (C) 2005-2023 Apple Inc. All rights reserved.
# Copyright (C) 2007 Eric Seidel <eric@webkit.org>
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -103,6 +103,7 @@ my $runMozillaTests = RUN_IF_NO_TESTS_SPECIFIED;
# on the JSC stress test or mozilla tests.
my $runJITStressTests = 1;

my $runCLoopMode = 0;
my $runQuickMode = 0;

my $forceCollectContinuously = 0;
Expand Down Expand Up @@ -340,6 +341,7 @@ GetOptions(
'jsc-stress!' => \$runJSCStress,
'mozilla-tests!' => \$runMozillaTests,
'jit-stress-tests!' => \$runJITStressTests,
'cloop' => \$runCLoopMode,
'quick!' => \$runQuickMode,
'fail-fast!' => \$failFast,
'force-collectContinuously!' => \$forceCollectContinuously,
Expand Down Expand Up @@ -852,6 +854,10 @@ sub runJSCStressTests
push(@jscStressDriverCmd, $envVars);
}

if ($runCLoopMode) {
push(@jscStressDriverCmd, "--cloop");
}

if ($runQuickMode) {
push(@jscStressDriverCmd, "--quick");
}
Expand Down
9 changes: 7 additions & 2 deletions Tools/Scripts/run-jsc-stress-tests
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ end

$jscPath = nil
$doNotMessWithVMPath = false
$cloop = false
$jitTests = true
$memoryLimited = false
$outputDir = Pathname.new("results")
Expand Down Expand Up @@ -231,6 +232,7 @@ jscArg = nil
GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT],
['--jsc', '-j', GetoptLong::REQUIRED_ARGUMENT],
['--no-copy', GetoptLong::NO_ARGUMENT],
['--cloop', GetoptLong::NO_ARGUMENT],
['--memory-limited', GetoptLong::NO_ARGUMENT],
['--no-jit', GetoptLong::NO_ARGUMENT],
['--force-collectContinuously', GetoptLong::NO_ARGUMENT],
Expand Down Expand Up @@ -273,6 +275,9 @@ GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT],
$doNotMessWithVMPath = true
when '--output-dir'
$outputDir = Pathname.new(arg)
when '--cloop'
$cloop = true
$jitTests = false
when '--memory-limited'
$memoryLimited = true
when '--no-jit'
Expand Down Expand Up @@ -591,8 +596,8 @@ $hostOS = determineOS unless $hostOS
$architecture = determineArchitecture unless $architecture
$isFTLPlatform = !($architecture == "x86" || $architecture == "arm" || $architecture == "mips" || $architecture == "riscv64" || $hostOS == "windows" || $hostOS == "playstation")
# Special case armv7 and windows, we want to run the wasm tests temporarily without B3/Air support
$isWasmPlatform = $isFTLPlatform || $architecture == "arm" || ($hostOS == "windows" && $architecture == "x86_64")
$isSIMDPlatform = $isFTLPlatform && ($architecture == "arm64" || $architecture == "x86_64")
$isWasmPlatform = (not $cloop) && ($isFTLPlatform || $architecture == "arm" || ($hostOS == "windows" && $architecture == "x86_64"))
$isSIMDPlatform = $isWasmPlatform && ($architecture == "arm64" || $architecture == "x86_64")

# This is meant for skipping execution of tests than require a lot of address
# space. Cf. $memoryLimited, which is meant for tests that actually make use of
Expand Down

0 comments on commit 4d6f500

Please sign in to comment.