raz / commit 2056ec68

commit
2056ec680ed9fedc6046ff9b3eb79b6efde19b08
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
fab3f109
check.sh: what dash says of a signal kept out of X.err

dash prints "Floating point exception" etc. while a simple command's
2> is still in place, so 7 signal tests failed on CI (ubuntu, sh=dash).
The program now runs in ( exec ... ), whose redirections are its own.

patch · log

1 file changed, +3 -2

test/check.sh (history) modified +3 -2

@@ -35,8 +35,9 @@
3535 if [ -f $dir/$name.args ]; then
3636 while IFS= read -r a; do set -- "$@" "$a"; done < $dir/$name.args
3737 fi
38- # in $(...), so that what the shell says of a signal goes nowhere
39- status=$( { $out/$name "$@" > $out/$name.out 2>$out/$name.err; echo $?; } 2>/dev/null )
38+ # in $(...), so that what the shell says of a signal goes nowhere;
39+ # in ( ), since dash says it with the command's 2> still in place
40+ status=$( { ( exec $out/$name "$@" ) > $out/$name.out 2>$out/$name.err; echo $?; } 2>/dev/null )
4041 want=0
4142 [ -f $dir/$name.status ] && want=$(cat $dir/$name.status)
4243 if ! cmp -s $out/$name.out $dir/$name.expect; then