From: Eric Blake Date: Tue, 24 May 2011 16:14:52 +0000 (-0600) Subject: perror: avoid spurious test failure on HP-UX X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d3a2863a14f0d0ea5ef48c42684921e30e9fac6;p=pspp perror: avoid spurious test failure on HP-UX The previous command has non-zero status. Even though 'exit 0' is supposed to ignore prior status, HP-UX /bin/sh favors the prior status if an exit trap is installed. * tests/test-perror.sh: Use Exit to avoid wrong exit status. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index ee6c667d21..f606d69c5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-05-24 Eric Blake + perror: avoid spurious test failure on HP-UX + * tests/test-perror.sh: Use Exit to avoid wrong exit status. + tests: fix logic bug in init.sh * tests/init.sh: (gl_set_x_corrupts_stderr_): Clear for successful shell. diff --git a/tests/test-perror.sh b/tests/test-perror.sh index 28027ea58e..7274d3223f 100755 --- a/tests/test-perror.sh +++ b/tests/test-perror.sh @@ -21,4 +21,4 @@ diff t-perror2.tmp t-perror3.tmp || fail_ "prefix applied incorrectly" test-perror >out 2>/dev/null || fail_ "unexpected exit status" test -s out && fail_ "unexpected output" -exit 0 +Exit 0