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
Duplicate test functions go undetected under --parallel #1147
$ bashunit --no-parallel dup_test.sh
Duplicate test functions found
Duplicate functions: test_same # exit 1
$ bashunit --parallel dup_test.sh
✓ Passed: Same
All tests passed # exit 0
This matters because bash silently discards the first definition: one of the two
tests never runs. The check exists precisely to catch that, and it is off in the
mode most projects use in CI.
Cause
check_duplicate_functions runs inside call_test_functions, which load_test_files backgrounds per file under --parallel. The state it sets
dies with the subshell, exactly like the counter in #1145 — only .result
files cross that boundary.
Fix
Run the duplicate check in the parent, before the per-file dispatch, so it is
independent of the run mode.
Also
The report names no line numbers:
Duplicate functions: test_same
In a long test file that means hunting for the second definition by hand. The
awk pass already walks every line, so recording them costs nothing.
Activity
Chemaclass commentedon Aug 13, 2026
Done in #1148 (merged).
docs(rules): warn that the duplicate check counts fixtures inside str…