Skip to content

make test targets are killed (exit 137) on macOS when given the full file list #1461

Closed

Description

@Chemaclass

On macOS, make test, make test/parallel and make test/strict die with Killed: 9 (exit 137) within 0 to 4 seconds, before any test runs. CI runs make test and passes, so this may be specific to macOS or to this machine.

Seen on main at a838222, macOS 27.2, /bin/bash 3.2.57.

Reproduce

bash -c 'F=($(find tests -name "*[tT]est.sh" -not -path "*/fixtures/*" | sort)); ./bashunit --list "${F[@]}"; echo "rc=$?"'

The run prints Killed: 9 and rc=137. One run named src/config/env.sh line 995 (read -r parsed_path) as the line running when the kill landed.

What I narrowed down

It happens with --list too, so no test body or hook is involved. It also happens with --parallel --simple without --suite, so suites are not the cause.

The trigger is the explicit file list. ./bashunit --suite parallel tests and ./bashunit --suite strict tests pass on the same machine.

It depends on the list, not on one file. Of the 241 sorted test files, the first 125 pass and the first 126 are killed; file 126 is tests/acceptance/install_test.sh. Files 121 to 180 on their own pass, even though they include install_test.sh. So install_test.sh triggers it only after the files before it are loaded.

Nothing in src/ sends SIGKILL to the main process at that point. The only kill -KILL is the timeout watchdog in src/runner/exec.sh, which needs a running test.

Workaround

Run the suites against the directory:

BASHUNIT_PARALLEL_JOBS=4 ./bashunit --suite parallel tests
BASHUNIT_PARALLEL_JOBS=4 ./bashunit --suite strict tests

Done when

  • The cause of the kill is known.
  • make test, make test/parallel and make test/strict pass on macOS, or the Makefile no longer passes a file list that triggers it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:runnerCode under src or scripts for runnerbugSomething isn't working

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions