error rather than a make hang or a fork bomb.
* tests/Makefile.am (TESTS): Update.
+2011-08-09 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ coverage: possible infinite recursion in the test harness
+ Motivated by a regression in the 'test-protocols' branch.
+ * tests/parallel-tests-fork-bomb.test: New test, checking that
+ if $(TEST_SUITE_LOG) is in $(TEST_LOGS), we obtain a diagnosed
+ error rather than a make hang or a fork bomb.
+ * tests/Makefile.am (TESTS): Update.
+
2011-08-09 Stefano Lattarini <stefano.lattarini@gmail.com>
test defs: yet more environment cleanup
cat output
$FGREP '::OOPS::' output && Exit 1 # Possible infinite recursion.
# Check that at least we don't create a botched global log file.
-# FIXME: GNU make currently creates it!
-# test ! -f "$log"
+ test ! -f "$log"
+ if using_gmake; then
+ grep "[Cc]ircular.*dependency" output | $FGREP "$log"
+ test $st -gt 0
+ else
# Look for possible error messages about circular dependencies from
# either make or our own recipes. At least one such a message must
- # be present.
+ # be present. OTOH, some make implementations (e.g., NetBSD's), while
+ # smartly detecting the circular dependency early and diagnosing it,
+ # still exit with a successful exit status (yikes!). So don't check
+ # the exit status of non-GNU make, to avoid spurious failures.
+ # this case.
err_seen=no
for err_rx in \
'circular.* depend' \
break
done
test $err_seen = yes || Exit 1
- # Some make implementations (e.g., NetBSD's), while smartly detecting
- # the circular dependency early and diagnosing it, still exit with a
- # successful exit status (yikes!). Relax our checks not to fail in
- # this case.
- using_gmake && { test $st -gt 0 || Exit 1; }
- :
+ fi
}
: > test-suite.test