Problem
Before Bash 4 the DEBUG trap does not reach a subshell even under set -T,
so lines executed inside ( ), $( ) or <( ) are never recorded. The same
project therefore reports a lower percentage on Bash 3.x than on Bash 4+, and
nothing in the output hints at it — you just see a smaller number, typically on
the machine where trap is the only engine available (macOS system Bash).
This came out of #1101: the counts on the Bash 3.0 job stayed at the old values
after the buffering fix, because there was never anything to buffer there.
Fix
Say it where the engine is already reported, under --verbose:
Coverage engine: trap
Note: Bash 3.2 does not report lines run inside a subshell; coverage may read
lower than on Bash 4+.
--verbose only, so a normal run gains no noise, and only on Bash 3.x.
Problem
Before Bash 4 the
DEBUGtrap does not reach a subshell even underset -T,so lines executed inside
( ),$( )or<( )are never recorded. The sameproject therefore reports a lower percentage on Bash 3.x than on Bash 4+, and
nothing in the output hints at it — you just see a smaller number, typically on
the machine where
trapis the only engine available (macOS system Bash).This came out of #1101: the counts on the Bash 3.0 job stayed at the old values
after the buffering fix, because there was never anything to buffer there.
Fix
Say it where the engine is already reported, under
--verbose:--verboseonly, so a normal run gains no noise, and only on Bash 3.x.