Author: Kerin Millar Date: Sun Jan 3 07:08:10 2021 +0000 Fix test for presence of BASH_LINENO[0] eval is not some sort of magical sandbox for executing code that might cause the shell's parser to take exception. Render the test resilient by carrying it out within a subshell. While at it, position the redirection so that STDERR is, in fact, muted. Signed-off-by: Kerin Millar Reported-by: Paolo Pedroni Closes: https://bugs.gentoo.org/738810 diff -ur a/tests/test-lib.sh b/tests/test-lib.sh --- a/tests/test-lib.sh 2021-01-03 07:03:32.343122695 +0000 +++ b/tests/test-lib.sh 2021-01-03 07:05:11.232560313 +0000 @@ -113,7 +113,7 @@ exit $status } -if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then +if ( eval 'test -n "${BASH_LINENO[0]}"' 2>/dev/null ); then eval ' _start_test() { printf "[${BASH_LINENO[2]}] %s -- " "$*"