You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bring the Shell Scripts Under Exit Status 64 and the Shell Interrupt Rule #1301
The resync's local review (#1294) found that this repo's shell scripts break the refreshed CODESTYLE.md "Command-Line Arguments" rule. A shell script that gives a refused argument an exit status of its own uses 64 (EX_USAGE) and reserves it. That rule has no next-edited exemption.
Scripts and what each owes
Docker/build.sh, Docker/install-debug-tools.sh, Docker/test.sh, Docker/version.sh: refuse with exit 2.
RegressionTests/integration-test.sh: refuses with exit 2, and also uses 2 for a work directory that already exists.
RegressionTests/regression-test.sh: refuses with exit 2, and also uses 2 for environment, mountpoint and dataset failures.
Each owes:
every refusal exits through one function that exits 64;
an EXIT trap that turns any other exit carrying 64 into 1;
--help naming the status;
a separate non-zero status for a run that started and failed.
What the edit pulls in
Under CODESTYLE.md "Interrupts", a script takes the interrupt rule when it is next edited. So each of these scripts also takes "Interrupts in Shell": INT and TERM traps that stop the script's children and re-raise the signal, the EXIT trap set before them, background children waited on with wait "$pid", and a mid-run signal test for each script holding a child or temporary state. regression-test.sh and integration-test.sh trap today with exit 130/143 or not at all, so their existing tests in RegressionTests/tests/test_regression_harness.py change from asserting 130/143 to asserting death by the signal.
Done in #1307, merged into develop as 568a6e3. The sudo/ZFS run of regression-test.sh and the Docker image build remain the maintainer's verification on develop. Pre-existing follow-ups are #1305 and #1306.
Activity
ptr727 commentedon Nov 26, 2026
Done in #1307, merged into develop as 568a6e3. The sudo/ZFS run of regression-test.sh and the Docker image build remain the maintainer's verification on develop. Pre-existing follow-ups are #1305 and #1306.