Skip to content

with test: a fixed 120 s per-file limit fails a passing test on a slower host (exit 124 reported as a run failure) #2362

Closed

Description

@ehartford

What happens

with test kills any test file after a fixed 120 s of wall-clock time
(run_test_process, src/main.w: with_exec_argv_capture(argv, out_path, err_path, 120000)).
A test that passes therefore fails on a slower host:

error: exit code 124
 = file: test/targets.w
 = stage: run
error: 1 of 1 tests failed in test/targets.w

Why it matters

The verdict depends on the host's speed, not the program. The limit has no
per-test or per-project setting and no command-line flag. Its exit, 124, is
reported as a run failure, not as a timeout. A build.w target has its own
timeout_ms, and the with test path doesn't have one.

Expected

One of these, for a ruling:

  • a per-file override (a //! timeout: header beside //! expect-stdout:),
    plus a project default in with.toml;
  • or a limit scaled from a measured baseline rather than a constant.

In either case, a timeout should be reported as a timeout, and should name
the limit it exceeded.

Workaround used

None. The kept binary (out/test/targets.test.*) was run by hand to confirm
that the test passes.

Activity

  1. ehartford commented on Oct 12, 2026

    @ehartford
    ContributorAuthor

    A second instance, in the compiler's own battery: issue61-regression runs with check src/main.w under a fixed 180 s limit (build.w, issue61_regression_action, run_capture_cwd(..., 180000, ...)). On eric-5090 it takes 109 s alone and passes. In the battery (tools/battery.w, PR #2361), with the other targets running in parallel, it exceeded 180 s and failed: issue61-regression: check timed out. The verdict depends on the load, not on the change.

  2. ehartford commented on Oct 12, 2026

    @ehartford
    ContributorAuthor

    issue61-regression: with check src/main.w was 109 s alone on eric-5090. About 37% of that was an uncached type_owns_user_drop walk at every scope exit; #2361 (2b4a12e) removes it. A further ~35% is SipHash on i32 keys (#2372). Timeouts as correctness verdicts: #2371.

  3. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): reproduced in source: run_test_process still runs each test binary with a fixed limit (src/main.w:4904: with_exec_argv_capture(argv, out_path, err_path, 120000)), with no per-file or per-project override.

    pre-release: a passing user test fails on a slower machine and is reported as a run failure; a configurable limit is small.

  4. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Fixed on main by 2396bc9 (PR #2653, stack #2658; battery green on the stack top 48c1c72). The commit message names the root-cause line and the regression test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions