Skip to content

scripts: own every built binary, check mktemp, clean up on a signal - #976

Merged
tannevaled merged 1 commit into
mainfrom
scripts-temp-hygiene
Nov 22, 2026
Merged

tannevaled merged 1 commit into
mainfrom
scripts-temp-hygiene

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Refs #974: this does its four script items. The VM items stay open there.
Refs #975: fixes one of those VM items, pwrite swallowing ENOSPC/EIO.
Refs #968: finishes the class of problem that PR fixed for rbgo.

What changes

  • scripts/conformance/rspec/run.sh built parsesweep at a fixed /tmp/parsesweep, which every checkout on the machine shared. Both binaries now go into one mktemp -d directory that the run deletes. PARSESWEEP still overrides it, and the variable is now documented.
  • A failed mktemp -d now stops the run in all three scripts. rubyspec/run.sh runs without set -e, so RBGO used to fall back to /rbgo.
  • scripts/oracle.sh runs under /bin/sh, which may be dash, and dash runs no EXIT trap on a signal. INT and TERM now exit explicitly (130, 143), so the EXIT trap also removes the directory when a run is interrupted.
  • scripts/oracle.sh checks its arguments before building, so a usage error answers at once (exit 2) instead of after a compile.

The audit also named apps/run.sh. No such file exists in this repository.

Checked

  • oracle.sh with no arguments, and with a bare -e: exit 2, nothing built.
  • oracle.sh -e 'p [1, 2, 3].sum': all four implementations agree.
  • rspec/run.sh end to end: parse sweep run, DSL pass=10 fail=0. The build directory it printed no longer exists afterwards.
  • bash -n / sh -n on all three scripts.

🤖 Generated with Claude Code

The script items of #974, left after #968:

- rspec/run.sh built parsesweep at /tmp/parsesweep, shared by every checkout
  on the machine, the same class #968 fixed for rbgo. Both binaries now go
  into one mktemp directory the run deletes; PARSESWEEP still overrides.
- A failed mktemp -d now stops the run in all three scripts. rubyspec/run.sh
  has no `set -e`, so RBGO used to become /rbgo.
- oracle.sh runs under /bin/sh, which may be dash, and dash runs no EXIT trap
  on a signal. INT and TERM now exit explicitly (130, 143), so the EXIT trap
  removes the directory on an interrupt as well.
- oracle.sh checks its arguments before building, so a usage error answers at
  once (exit 2) instead of after a compile.

Checked: oracle.sh with no arguments and with a bare -e exits 2 without
building; `oracle.sh -e 'p [1, 2, 3].sum'` agrees with all four
implementations; rspec/run.sh runs end to end (DSL pass=10 fail=0) and its
build directory is gone afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 6a7510d into main Nov 22, 2026
26 checks passed
@tannevaled
tannevaled deleted the scripts-temp-hygiene branch November 22, 2026 09:16
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