From fd8841b55e23ca3a59616886fbd9f3bce64ab745 Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Tue, 9 Jun 2026 20:05:46 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=80=92=E5=BD=92=E6=A0=88=E4=B8=8A=E9=99=90=E4=B8=8E=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_test262/src/main.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/crates/oxide_test262/src/main.rs b/crates/oxide_test262/src/main.rs index ff74ea6c..5234319f 100644 --- a/crates/oxide_test262/src/main.rs +++ b/crates/oxide_test262/src/main.rs @@ -571,6 +571,9 @@ fn build_runner_kernel() -> Arc { // runner's local config; KernelConfig::minimal() stays unbounded for other crates. let mut kernel_config = KernelConfig::minimal(); kernel_config.max_steps = Some(50_000_000); + // Keep test262 recursion tests from reaching Rust's native stack before the + // VM converts deep JS calls into a catchable RangeError. + kernel_config.max_call_depth = 256; let kernel = Arc::new(OxideKernel::new(kernel_config)); init_kernel_builtins(&kernel); kernel @@ -691,10 +694,13 @@ fn run_tests() -> bool { // own kernel + harness-source registry + prefix cache. Only `PathBuf` and // `TestResult` (both `Send`) cross thread boundaries. Workers pull test // indices from a shared atomic cursor for dynamic load balancing. - let workers = std::thread::available_parallelism() - .map(|n| n.get()) - .unwrap_or(1) + let workers = std::env::var("OXIDE_TEST262_WORKERS") + .ok() + .and_then(|s| s.parse::().ok()) + .filter(|&n| n > 0) + .unwrap_or_else(|| std::thread::available_parallelism().map(|n| n.get()).unwrap_or(1)) .min(total.max(1)); + let trace_paths = std::env::var_os("OXIDE_TEST262_TRACE").is_some(); eprintln!("running on {workers} worker thread(s)"); @@ -727,6 +733,9 @@ fn run_tests() -> bool { if i >= total { break; } + if trace_paths { + eprintln!(" running: {}", paths_ref[i].display()); + } let result = process_path( &paths_ref[i],