From: Stefano Lattarini Date: Wed, 28 Sep 2011 11:04:14 +0000 (+0200) Subject: tests: remove redundant workaround for Solaris /bin/sh X-Git-Tag: ng-0.5a~89^2~34^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d47115ec4eeefc243abc3d6abf2b68e17765cb60;p=thirdparty%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index 607c5c573..c576a45f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-09-28 Stefano Lattarini + + 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 tests: fix spurious failures in tests on TAP + signals diff --git a/tests/tap-signal.tap b/tests/tap-signal.tap index 9a1858646..0ed7194cb 100755 --- a/tests/tap-signal.tap +++ b/tests/tap-signal.tap @@ -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: -# -# 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'