Skip to content

tests: run_all_tests.sh invokes test_terminal.eigs unguarded — wedges forever when stdin is a held-open pipe #656

Description

@InauguralPhysicist

Found by @Nitjsefnie while working on #653 (see their report) — they hit it live as an 11+ minute hang.

tests/run_all_tests.sh:2073 is the last unguarded interpreter invocation in the runner:

TM_OUTPUT=$(./eigenscript ../tests/test_terminal.eigs 2>&1); TM_OUTPUT_RC=$?

Compare the guarded shape at :93:

out=$($EIGS_TMO ./eigenscript "../tests/$file" </dev/null 2>&1); rc=$?

Two things missing: $EIGS_TMO (the runaway backstop from #616) and </dev/null. test_terminal.eigs reads stdin, so in any environment where stdin is a held-open pipe — a captured or backgrounded CI-ish shell — it blocks forever. No timeout wrapper means the whole suite wedges rather than failing.

We have been treating this as folklore instead of fixing it. CLAUDE.md carries the workaround as a standing rule:

make test must run with stdin available or redirected from /dev/null — test_terminal.eigs blocks forever reading a pipe that never EOFs.

That is a bug documented as a constraint. The runner should be robust on its own rather than requiring every caller to remember an invocation discipline.

Fix

Give :2073 the same treatment as :93$EIGS_TMO and </dev/null. Then delete the CLAUDE.md rule, since it stops being true.

Done when

  • :2073 uses $EIGS_TMO and </dev/null
  • [60] Terminal Builtins still reports 10/10 in a normal run
  • The suite completes (does not hang) when run with stdin held open — e.g. bash -c "sleep 300 | bash run_all_tests.sh", which wedges before the fix
  • The CLAUDE.md stdin rule is removed in the same PR

Notes

Scoped to one line plus a doc deletion; the verification above is the interesting part. @Nitjsefnie has first refusal since they found it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions