]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: remove redundant workaround for Solaris /bin/sh
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 28 Sep 2011 11:04:14 +0000 (13:04 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 28 Sep 2011 11:04:45 +0000 (13:04 +0200)
After previous commit `v1.11-1424-g27a399a', some workarounds for
Solaris 10 /bin/sh are no more required, and in fact they have
started causing XPASS results on Solaris.

* tests/tap-signal.tap: Remove unneeded workarounds for Solaris 10
/bin/sh.  Some related minor code reorganizations.

ChangeLog
tests/tap-signal.tap

index 607c5c5739aa20b59cbacb75a09f14c42d1afe27..c576a45f266cd3ae2668ea82d4bbb64b2c45669b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-09-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove redundant workaround for Solaris /bin/sh
+       After previous commit `v1.11-1424-g27a399a', some workarounds for
+       Solaris 10 /bin/sh are no more required, and in fact they have
+       started causing XPASS results on Solaris.
+       * tests/tap-signal.tap: Remove unneeded workarounds for Solaris 10
+       /bin/sh.  Some related minor code reorganizations.
+
 2011-09-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: fix spurious failures in tests on TAP + signals
index 9a1858646906ab73ef736c3374a33fec4288bd11..0ed7194cbb11b9d7fa478f4c2f07cfec30121ad2 100755 (executable)
@@ -60,24 +60,6 @@ chmod a+x *.test
 
 . "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
 
-# Solaris /bin/sh, when killed with a SIGTERM, SIGQUIT or SIGINT signal,
-# can end up exiting with exit status 208, instead of leaving the correct
-# wide exit status to the parent.  See:
-#   <http://dbaspot.com/shell/396118-bourne-shell-exit-code-term.html>
-# We need to detect and work around this incompatibility.
-
-have_solaris_bug=no
-for sig in 2 3 15; do
-  if /bin/sh -c "kill -$sig \$\$"; then
-    warn_ "/bin/sh cannot kill itself with signal $sig"
-  elif test $? -eq 208; then
-    warn_ "/bin/sh exits with status 208 upon some signals (Solaris?)"
-    warn_ "we will try to work around this bug"
-    have_solaris_bug=yes
-    break
-  fi
-done
-
 signal_caught ()
 {
   numeric=$1
@@ -98,18 +80,11 @@ signal_caught ()
     shell) rx="$pfx_re .*terminated by signal $sig_re$wbound_re";;
     *) fatal_ "invalid \$am_tap_implementation '$am_tap_implementation'";;
   esac
-  directive='' reason=''
-  case $have_solaris_bug,$symbolic in
-    yes,INT|yes,TERM|yes,QUIT) directive=TODO reason="Solaris /bin/sh bug";;
-  esac
+  desc="TAP driver catch test termination by signal SIG$symbolic"
   case " $blocked_signals " in
-    *" $numeric "*)
-      reason="SIG$symbolic is blocked" directive=SKIP result=ok;;
-    *)
-      LC_ALL=C $EGREP "$rx" stdout && result='ok' || result='not ok';;
+    *" $numeric "*) skip_ -r "SIG$symbolic is blocked" "$desc" ;;
+    *) command_ok_ "$desc" env LC_ALL=C $EGREP "$rx" stdout ;;
   esac
-  result_ "$result" -D "$directive" -r "$reason" \
-          "TAP driver catch test termination by signal SIG$symbolic"
 }
 
 command_ok_ '"make check" fails' eval 'not $MAKE check >stdout'