perror: avoid spurious test failure on HP-UX
authorEric Blake <eblake@redhat.com>
Tue, 24 May 2011 16:14:52 +0000 (10:14 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 24 May 2011 17:05:45 +0000 (11:05 -0600)
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 <eblake@redhat.com>
ChangeLog
tests/test-perror.sh

index ee6c667..f606d69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-05-24  Eric Blake  <eblake@redhat.com>
 
+       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.
index 28027ea..7274d32 100755 (executable)
@@ -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