Skip to content
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ agent.
For contributors: the `ORACLE_GAPS_TEST_` environment variables are test-only
hooks for the CLI's own oracle, not settings for users. Each is inert unless
set; a hook may pause at one named point and never changes an outcome.
`ORACLE_GAPS_TEST_ABORT_AT=check` aborts the check's process after its session
has begun, where a V8 out-of-memory abort would strike: with `process.abort()`
on win32, and with a SIGABRT to itself on POSIX, which ends the process the
same way without the native backtrace `process.abort()` prints there (a line
of the stream it would break).
`ORACLE_GAPS_TEST_STARTED` names a file that the CLI writes as its first project statement, before any project module loads, so a test can tell a stop that came before the CLI started from one that came during its loads.
`ORACLE_GAPS_TEST_PAUSE_AFTER_STARTED` (milliseconds) blocks the CLI for that long right after the started file is written, so a stop sent on seeing the file lands inside the pause.
`ORACLE_GAPS_TEST_PAUSE_AT` names one point at which `ORACLE_GAPS_TEST_PAUSE_MS` (milliseconds) blocks the CLI: `takeover` (inside a stale-claim takeover, after the stale pid is read) and `mutex-create` (inside the takeover mutex's creation).
Expand Down
15 changes: 3 additions & 12 deletions packages/oracles/oracle-gaps/gap-report-model-oracle.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4257,8 +4257,7 @@ function baselineOf(plan) {
// baseline too.
const own =
plan.tests.filter((t) => t.file === file).length +
(file === `a` && plan.consoleOutput ? 1 : 0) +
(file === `a` && plan.aborts ? 1 : 0)
(file === `a` && plan.consoleOutput ? 1 : 0)
const broken = failing.find((f) => f.file === file)
// The failing owner's suite holds two tests and a third of its name.
const extra = broken?.test === undefined ? 0 : 3
Expand Down Expand Up @@ -4892,16 +4891,8 @@ function oracleTestFile(plan, file) {
`})`,
`test('fixed seed 999', () => {})`,
)
// A test that ends the run's process by SIGABRT when the driver asks
// (`GAP_ABORT`), as a V8 out-of-memory abort does: in worker threads its
// process is the run's, and `process.abort()` is unavailable there. It
// runs and passes in every other run.
if (file === `a` && plan.aborts)
out.push(
`test('aborts the process when asked', () => {`,
` if (process.env.GAP_ABORT === '1') process.kill(process.pid, 'SIGABRT')`,
`})`,
)
// The abort of an "aborts" run comes from the CLI's own check process
// (ORACLE_GAPS_TEST_ABORT_AT), so no test of file a is needed for it.
// A file with no tests still loads, so the CLI can read what it owns.
if (
!plan.tests.some((t) => t.file === file) &&
Expand Down
Loading
Loading