Skip to content

Commit a417b23

Browse files
committed
Fix test-conformance freeze at batch 130 caused by MersennePrimeExponent
MersennePrimeExponent[51] hangs wolframscript because it tries to verify that 2^82589933 - 1 is prime, while Woxi returns instantly from a lookup table. Skip MersennePrimeExponent in conformance tests and use SIGKILL instead of SIGTERM for batch timeouts as a safeguard against future hangs.
1 parent 91e2c2e commit a417b23

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/wolframscript/verify_unit_tests.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ function runWolframBatch(
430430
encoding: "utf-8",
431431
timeout: timeoutMs,
432432
maxBuffer: 10 * 1024 * 1024,
433+
killSignal: "SIGKILL", // SIGTERM is ignored by wolframscript during computation
433434
});
434435
} catch (err: any) {
435436
throw new Error(err.stderr || err.message || "wolframscript batch failed");
@@ -529,6 +530,7 @@ function main() {
529530
/\bIndexGraph\[/, // Returns Graph object (edge list vs SparseArray representation)
530531
/\bConnectedGraphComponents\[/, // Returns Graph objects (edge list vs SparseArray representation)
531532
/\bFindSpanningTree\[/, // Wolfram uses SparseArray internal Graph representation
533+
/\bMersennePrimeExponent\[/, // Woxi uses a lookup table; Wolfram computes primality of 2^p-1 which hangs for large indices
532534
/\bStationaryDistribution\[/, // Complex computation, Woxi keeps as inert wrapper
533535
/\bDatedUnit\[/, // Version-specific evaluation behavior
534536
/\bVoronoiMesh\[/, // Different bounding box and vertex coordinates

0 commit comments

Comments
 (0)