Skip to content

Bound static-bin smoke tests with per-test timeout#6

Merged
jserv merged 1 commit intomainfrom
test-static-bins
May 5, 2026
Merged

Bound static-bin smoke tests with per-test timeout#6
jserv merged 1 commit intomainfrom
test-static-bins

Conversation

@jserv
Copy link
Copy Markdown
Contributor

@jserv jserv commented May 5, 2026

Wrap every guest-binary invocation in timeout TEST_TIMEOUT (default 10s, override via env) so a regression that hangs a guest binary (futex deadlock, EPOLLET busy-loop, blocking syscall miswire) cannot stall "make check" indefinitely. Surface the GNU-timeout rc=124 as a distinct " (timeout)" failure instead of letting it fall through to the generic "pattern not found, rc=124" path; the two have different root causes (livelock vs. semantic regression) and deserve different signal in CI logs.

Fail upfront with a clear message when 'timeout' is missing from PATH, so an absent Homebrew coreutils install produces one error rather than every test reporting "command not found, rc=127".

Use integer compare on the rc check, and apply the wrapper uniformly across srun_check, srun_pipe, srun_script, and the two inlined diff cases.


Summary by cubic

Add a per-test timeout to static-bin smoke tests to prevent hangs and make CI failures clearer. Default is 10s via TEST_TIMEOUT; timeouts are labeled explicitly and we fail fast if timeout is missing.

  • Bug Fixes
    • Wrap all guest-binary runs with timeout using TEST_TIMEOUT (default 10s, override via env).
    • Treat exit code 124 as a distinct "(timeout)" failure.
    • Exit early with a clear error if timeout is not on PATH (e.g., missing Homebrew coreutils on macOS).
    • Apply uniformly to srun_check, srun_pipe, srun_script, and inline diff checks.
    • Use integer exit code comparisons.
    • Replace recursive factorial test with a simple sum; expected output now result=15.

Written for commit f0e021e. Summary will update on new commits.

Wrap every guest-binary invocation in timeout TEST_TIMEOUT (default 10s,
override via env) so a regression that hangs a guest binary (futex
deadlock, EPOLLET busy-loop, blocking syscall miswire) cannot stall
"make check" indefinitely. Surface the GNU-timeout rc=124 as a distinct
" (timeout)" failure instead of letting it fall through to the generic
"pattern not found, rc=124" path; the two have different root causes
(livelock vs. semantic regression) and deserve different signal in CI
logs.

Fail upfront with a clear message when 'timeout' is missing from PATH,
so an absent Homebrew coreutils install produces one error rather than
every test reporting "command not found, rc=127".

Use integer compare on the rc check, and apply the wrapper uniformly
across srun_check, srun_pipe, srun_script, and the two inlined diff
cases.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@jserv jserv merged commit d3eca90 into main May 5, 2026
5 checks passed
@jserv jserv deleted the test-static-bins branch May 5, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant