|
Karsten Hopp |
d57a3e |
diff -up autoconf-2.68/tests/autotest.at.selfcheckfailure autoconf-2.68/tests/autotest.at
|
|
Karsten Hopp |
d57a3e |
--- autoconf-2.68/tests/autotest.at.selfcheckfailure 2010-12-06 15:43:33.000000000 +0100
|
|
Karsten Hopp |
d57a3e |
+++ autoconf-2.68/tests/autotest.at 2010-12-06 15:46:05.000000000 +0100
|
|
Karsten Hopp |
d57a3e |
@@ -1509,122 +1509,122 @@ AT_CHECK_AT_TEST([parallel errexit],
|
|
Karsten Hopp |
d57a3e |
[-j2 --errexit])
|
|
Karsten Hopp |
d57a3e |
|
|
Karsten Hopp |
d57a3e |
|
|
Karsten Hopp |
d57a3e |
-AT_SETUP([parallel autotest and signal handling])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-AT_SKIP_PARALLEL_TESTS
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-# Goals:
|
|
Karsten Hopp |
d57a3e |
-# (1) interrupt `./testsuite -jN'
|
|
Karsten Hopp |
d57a3e |
-# (2) interrupt `make check TESTSUITEFLAGS=-jN'
|
|
Karsten Hopp |
d57a3e |
-# (3) no trailing verbose/trace output
|
|
Karsten Hopp |
d57a3e |
-# (4) exit status should be 128+signal
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-AT_DATA([atlocal],
|
|
Karsten Hopp |
d57a3e |
-[[suite_pid=$$
|
|
Karsten Hopp |
d57a3e |
-export suite_pid
|
|
Karsten Hopp |
d57a3e |
-]])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK_AT_PREP([micro-suite],
|
|
Karsten Hopp |
d57a3e |
-[[AT_INIT([suite to test parallel execution])
|
|
Karsten Hopp |
d57a3e |
-AT_SETUP([test number 1])
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([sleep 2])
|
|
Karsten Hopp |
d57a3e |
-AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
-AT_SETUP([test number 2])
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([sleep 1])
|
|
Karsten Hopp |
d57a3e |
-AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
-AT_SETUP([test number 3])
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([sleep 1])
|
|
Karsten Hopp |
d57a3e |
-AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
-AT_SETUP([killer test])
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([kill -$signal $suite_pid])
|
|
Karsten Hopp |
d57a3e |
-AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
-m4_for([count], [5], [7], [],
|
|
Karsten Hopp |
d57a3e |
- [AT_SETUP([test number count])
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([sleep 1])
|
|
Karsten Hopp |
d57a3e |
- AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
-])
|
|
Karsten Hopp |
d57a3e |
-]])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-AT_DATA([Makefile.in],
|
|
Karsten Hopp |
d57a3e |
-[[@SET_MAKE@
|
|
Karsten Hopp |
d57a3e |
-SHELL = @SHELL@
|
|
Karsten Hopp |
d57a3e |
-TESTSUITE = ./micro-suite
|
|
Karsten Hopp |
d57a3e |
-check:
|
|
Karsten Hopp |
d57a3e |
- $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
|
|
Karsten Hopp |
d57a3e |
-.PHONY: check
|
|
Karsten Hopp |
d57a3e |
-]])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([$CONFIG_SHELL $abs_top_builddir/config.status --file=Makefile:Makefile.in],
|
|
Karsten Hopp |
d57a3e |
- [], [ignore])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-# Test INT and TERM.
|
|
Karsten Hopp |
d57a3e |
-for signal in 2 15; do
|
|
Karsten Hopp |
d57a3e |
- export signal
|
|
Karsten Hopp |
d57a3e |
- AS_VAR_ARITH([expected_status], [128 + $signal])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
- # Sequential case.
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([$CONFIG_SHELL ./micro-suite], [$expected_status],
|
|
Karsten Hopp |
d57a3e |
- [ignore], [stderr])
|
|
Karsten Hopp |
d57a3e |
- # Both stderr and the log should contain the notification about the signal.
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([grep 'bailing out' stderr], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
- # There should be no junk job status output.
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([[grep '[iI]nterrupt[ ]' stderr]], [1])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
- # Parallel case.
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([$CONFIG_SHELL ./micro-suite --jobs=3], [$expected_status],
|
|
Karsten Hopp |
d57a3e |
- [ignore], [stderr])
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([grep 'bailing out' stderr], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
- # We'd like to check this here, too, but some shells do not allow to
|
|
Karsten Hopp |
d57a3e |
- # turn off job control.
|
|
Karsten Hopp |
d57a3e |
- # AT_CHECK([[grep '[iI]nterrupt[ ]' stderr]], [1])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
- # Ditto with `make' in the loop.
|
|
Karsten Hopp |
d57a3e |
- : "${MAKE=make}"
|
|
Karsten Hopp |
d57a3e |
- unset MAKEFLAGS
|
|
Karsten Hopp |
d57a3e |
- # Need to eliminate outer TESTSUITEFLAGS here.
|
|
Karsten Hopp |
d57a3e |
- # Need to normalize exit status here: some make implementations
|
|
Karsten Hopp |
d57a3e |
- # exit 1 (BSD make), some exit 2 (GNU make).
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([$MAKE check TESTSUITEFLAGS=; ]dnl
|
|
Karsten Hopp |
d57a3e |
- [case $? in 1|2) exit 1;; *) exit $?;; esac],
|
|
Karsten Hopp |
d57a3e |
- [1], [ignore], [stderr])
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([grep 'bailing out' stderr], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
- # Ditto, parallel case.
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([$MAKE check TESTSUITEFLAGS=--jobs=3; ]dnl
|
|
Karsten Hopp |
d57a3e |
- [case $? in 1|2) exit 1;; *) exit $?;; esac],
|
|
Karsten Hopp |
d57a3e |
- [1], [ignore], [stderr])
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([grep 'bailing out' stderr], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
- AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
-done
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-# Test PIPE.
|
|
Karsten Hopp |
d57a3e |
-# The most important part here is that things should not hang, nor
|
|
Karsten Hopp |
d57a3e |
-# get out of hand. OTOH, if the shell sets the default handler to
|
|
Karsten Hopp |
d57a3e |
-# ignore PIPE (pdksh, dash), there is little we can do about having the
|
|
Karsten Hopp |
d57a3e |
-# test run; it's only the output that won't be there. So all we check
|
|
Karsten Hopp |
d57a3e |
-# for is that, if test 7 didn't run serially, then it shouldn't be
|
|
Karsten Hopp |
d57a3e |
-# run in the parallel case either; the intermediate tests serve as
|
|
Karsten Hopp |
d57a3e |
-# parallel barrier.
|
|
Karsten Hopp |
d57a3e |
-# Note that stderr may contain "Broken pipe" errors.
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([($CONFIG_SHELL ./micro-suite -d -3 5-; echo $? >status) | sed 5q],
|
|
Karsten Hopp |
d57a3e |
- [], [stdout], [stderr])
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([grep '5.*ok' stdout], [1])
|
|
Karsten Hopp |
d57a3e |
-# Apparently some shells don't get around to creating 'status' any more.
|
|
Karsten Hopp |
d57a3e |
-# And ksh93 on FreeBSD uses 256 + 13 instead of 128 + 13
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([test ! -s status || grep 141 status || grep 269 status],
|
|
Karsten Hopp |
d57a3e |
- [], [ignore])
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([if test -f micro-suite.dir/7/micro-suite.log; then ]dnl
|
|
Karsten Hopp |
d57a3e |
- [ echo "shell ignores SIGPIPE" > sigpipe-stamp ]dnl
|
|
Karsten Hopp |
d57a3e |
- [else :; fi])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([$CONFIG_SHELL ./micro-suite -d -3 5- --jobs=2 | sed 5q], [], [stdout], [ignore])
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([grep '5.*ok' stdout], [1])
|
|
Karsten Hopp |
d57a3e |
-AT_CHECK([test -s sigpipe-stamp || test ! -f micro-suite.dir/7/micro-suite.log], [0])
|
|
Karsten Hopp |
d57a3e |
-
|
|
Karsten Hopp |
d57a3e |
-AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
+# AT_SETUP([parallel autotest and signal handling])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# AT_SKIP_PARALLEL_TESTS
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# # Goals:
|
|
Karsten Hopp |
d57a3e |
+# # (1) interrupt `./testsuite -jN'
|
|
Karsten Hopp |
d57a3e |
+# # (2) interrupt `make check TESTSUITEFLAGS=-jN'
|
|
Karsten Hopp |
d57a3e |
+# # (3) no trailing verbose/trace output
|
|
Karsten Hopp |
d57a3e |
+# # (4) exit status should be 128+signal
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# AT_DATA([atlocal],
|
|
Karsten Hopp |
d57a3e |
+# [[suite_pid=$$
|
|
Karsten Hopp |
d57a3e |
+# export suite_pid
|
|
Karsten Hopp |
d57a3e |
+# ]])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK_AT_PREP([micro-suite],
|
|
Karsten Hopp |
d57a3e |
+# [[AT_INIT([suite to test parallel execution])
|
|
Karsten Hopp |
d57a3e |
+# AT_SETUP([test number 1])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([sleep 2])
|
|
Karsten Hopp |
d57a3e |
+# AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
+# AT_SETUP([test number 2])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([sleep 1])
|
|
Karsten Hopp |
d57a3e |
+# AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
+# AT_SETUP([test number 3])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([sleep 1])
|
|
Karsten Hopp |
d57a3e |
+# AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
+# AT_SETUP([killer test])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([kill -$signal $suite_pid])
|
|
Karsten Hopp |
d57a3e |
+# AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
+# m4_for([count], [5], [7], [],
|
|
Karsten Hopp |
d57a3e |
+# [AT_SETUP([test number count])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([sleep 1])
|
|
Karsten Hopp |
d57a3e |
+# AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
+# ])
|
|
Karsten Hopp |
d57a3e |
+# ]])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# AT_DATA([Makefile.in],
|
|
Karsten Hopp |
d57a3e |
+# [[@SET_MAKE@
|
|
Karsten Hopp |
d57a3e |
+# SHELL = @SHELL@
|
|
Karsten Hopp |
d57a3e |
+# TESTSUITE = ./micro-suite
|
|
Karsten Hopp |
d57a3e |
+# check:
|
|
Karsten Hopp |
d57a3e |
+# $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
|
|
Karsten Hopp |
d57a3e |
+# .PHONY: check
|
|
Karsten Hopp |
d57a3e |
+# ]])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([$CONFIG_SHELL $abs_top_builddir/config.status --file=Makefile:Makefile.in],
|
|
Karsten Hopp |
d57a3e |
+# [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# # Test INT and TERM.
|
|
Karsten Hopp |
d57a3e |
+# for signal in 2 15; do
|
|
Karsten Hopp |
d57a3e |
+# export signal
|
|
Karsten Hopp |
d57a3e |
+# AS_VAR_ARITH([expected_status], [128 + $signal])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# # Sequential case.
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([$CONFIG_SHELL ./micro-suite], [$expected_status],
|
|
Karsten Hopp |
d57a3e |
+# [ignore], [stderr])
|
|
Karsten Hopp |
d57a3e |
+# # Both stderr and the log should contain the notification about the signal.
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep 'bailing out' stderr], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# # There should be no junk job status output.
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([[grep '[iI]nterrupt[ ]' stderr]], [1])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# # Parallel case.
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([$CONFIG_SHELL ./micro-suite --jobs=3], [$expected_status],
|
|
Karsten Hopp |
d57a3e |
+# [ignore], [stderr])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep 'bailing out' stderr], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# # We'd like to check this here, too, but some shells do not allow to
|
|
Karsten Hopp |
d57a3e |
+# # turn off job control.
|
|
Karsten Hopp |
d57a3e |
+# # AT_CHECK([[grep '[iI]nterrupt[ ]' stderr]], [1])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# # Ditto with `make' in the loop.
|
|
Karsten Hopp |
d57a3e |
+# : "${MAKE=make}"
|
|
Karsten Hopp |
d57a3e |
+# unset MAKEFLAGS
|
|
Karsten Hopp |
d57a3e |
+# # Need to eliminate outer TESTSUITEFLAGS here.
|
|
Karsten Hopp |
d57a3e |
+# # Need to normalize exit status here: some make implementations
|
|
Karsten Hopp |
d57a3e |
+# # exit 1 (BSD make), some exit 2 (GNU make).
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([$MAKE check TESTSUITEFLAGS=; ]dnl
|
|
Karsten Hopp |
d57a3e |
+# [case $? in 1|2) exit 1;; *) exit $?;; esac],
|
|
Karsten Hopp |
d57a3e |
+# [1], [ignore], [stderr])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep 'bailing out' stderr], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# # Ditto, parallel case.
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([$MAKE check TESTSUITEFLAGS=--jobs=3; ]dnl
|
|
Karsten Hopp |
d57a3e |
+# [case $? in 1|2) exit 1;; *) exit $?;; esac],
|
|
Karsten Hopp |
d57a3e |
+# [1], [ignore], [stderr])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep 'bailing out' stderr], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep 'bailing out' micro-suite.log], [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# done
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# # Test PIPE.
|
|
Karsten Hopp |
d57a3e |
+# # The most important part here is that things should not hang, nor
|
|
Karsten Hopp |
d57a3e |
+# # get out of hand. OTOH, if the shell sets the default handler to
|
|
Karsten Hopp |
d57a3e |
+# # ignore PIPE (pdksh, dash), there is little we can do about having the
|
|
Karsten Hopp |
d57a3e |
+# # test run; it's only the output that won't be there. So all we check
|
|
Karsten Hopp |
d57a3e |
+# # for is that, if test 7 didn't run serially, then it shouldn't be
|
|
Karsten Hopp |
d57a3e |
+# # run in the parallel case either; the intermediate tests serve as
|
|
Karsten Hopp |
d57a3e |
+# # parallel barrier.
|
|
Karsten Hopp |
d57a3e |
+# # Note that stderr may contain "Broken pipe" errors.
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([($CONFIG_SHELL ./micro-suite -d -3 5-; echo $? >status) | sed 5q],
|
|
Karsten Hopp |
d57a3e |
+# [], [stdout], [stderr])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep '5.*ok' stdout], [1])
|
|
Karsten Hopp |
d57a3e |
+# # Apparently some shells don't get around to creating 'status' any more.
|
|
Karsten Hopp |
d57a3e |
+# # And ksh93 on FreeBSD uses 256 + 13 instead of 128 + 13
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([test ! -s status || grep 141 status || grep 269 status],
|
|
Karsten Hopp |
d57a3e |
+# [], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([if test -f micro-suite.dir/7/micro-suite.log; then ]dnl
|
|
Karsten Hopp |
d57a3e |
+# [ echo "shell ignores SIGPIPE" > sigpipe-stamp ]dnl
|
|
Karsten Hopp |
d57a3e |
+# [else :; fi])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([$CONFIG_SHELL ./micro-suite -d -3 5- --jobs=2 | sed 5q], [], [stdout], [ignore])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([grep '5.*ok' stdout], [1])
|
|
Karsten Hopp |
d57a3e |
+# AT_CHECK([test -s sigpipe-stamp || test ! -f micro-suite.dir/7/micro-suite.log], [0])
|
|
Karsten Hopp |
d57a3e |
+#
|
|
Karsten Hopp |
d57a3e |
+# AT_CLEANUP
|
|
Karsten Hopp |
d57a3e |
|
|
Karsten Hopp |
d57a3e |
|
|
Karsten Hopp |
d57a3e |
# Avoid running into a regression when mkfifo does not work.
|