Hi, While trying to figure out why the zgrep-f test was passing on some platforms and failing on others (when it looked like it should fail on all but linux-like systems) we discovered that the tests were not getting run.
On AIX, IRIX and Tru64 /bin/sh the: trap remove_tmp_ 0 was being run when the setup_ shell function exits, rather than when the script exits, since remove_tmp_ ends with exit $__st this makes all the tests pass on those systems. This patch causes the zgrep-f test to fail for us with gzip-1.4 on solaris, HP-UX, AIX, Tru64 and IRIX (only passing on Linux systems), which seems reasonable as zgrep -f - requires /proc/$$/fd/<num>, /dev/fd/<num> and GNU grep. Peter Index: tests/init.sh =================================================================== --- tests/init.sh.orig 2010-01-08 18:12:20.000000000 +0000 +++ tests/init.sh 2010-07-29 19:59:10.569184683 +0000 @@ -125,9 +125,9 @@ || fail_ "failed to create temporary directory in $initial_cwd_" cd "$test_dir_" - # This pair of trap statements ensures that the temporary directory, - # $test_dir_, is removed upon exit as well as upon catchable signal. - trap remove_tmp_ 0 + # This trap statement with the later trap remove_tmp_ 0 ensures + # that the temporary directory, $test_dir_, is removed upon exit as + # well as upon catchable signal. trap 'Exit $?' 1 2 13 15 } @@ -253,3 +253,7 @@ && . "$srcdir/init.cfg" setup_ "$@" +# This trap is here, rather than in the setup_ function because some +# shells run the trap at shell function exit, rather than at script +# exit. +trap remove_tmp_ 0