From: Stefano Lattarini Date: Wed, 1 Jun 2011 10:09:23 +0000 (+0200) Subject: tests: prefer ulimit over timeout in test on a memory-hogging bug X-Git-Tag: ng-0.5a~89^2~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=908d335c0e02191c46f955fa6c7d6b6497de85e8;p=thirdparty%2Fautomake.git tests: prefer ulimit over timeout in test on a memory-hogging bug * tests/cond29.test: Use 'ulimit' instead of 'timeout' to ensure that automake does not uses up too much resources. This is really and improvement because the bug tested by this script wasn't just a "it hangs" or "it runs too slow" bug, but rather a memory-hogging bug (due to combinatorial explosion when many Automake conditionals had to be handled) which could easily crash the whole system, which is unacceptable. The requirement of a proper and working 'ulimit' builtin might cause the test to be skipped on more systems, but that shouldn't be a problem since the bug isn't about a portability issue, but is rather an automake internal implementation problem. I've verified that the test as updated by this patch still passes with automake 1.8.5, automake 1.10.2, and obviously the development version of automake, and that it fails with automake 1.7.9. --- diff --git a/ChangeLog b/ChangeLog index bf7fb8bb3..64c8892fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2011-06-01 Stefano Lattarini + + tests: prefer ulimit over timeout in test on a memory-hogging bug + * tests/cond29.test: Use 'ulimit' instead of 'timeout' to ensure + that automake does not uses up too much resources. This is really + and improvement because the bug tested by this script wasn't just + a "it hangs" or "it runs too slow" bug, but rather a memory-hogging + bug (due to combinatorial explosion when many Automake conditionals + had to be handled) which could easily crash the whole system, which + is unacceptable. The requirement of a proper and working 'ulimit' + builtin might cause the test to be skipped on more systems, but + that shouldn't be a problem since the bug isn't about a portability + issue, but is rather an automake internal implementation problem. + I've verified that the test as updated by this patch still passes + with automake 1.8.5, automake 1.10.2, and obviously the development + version of automake, and that it fails with automake 1.7.9. + 2011-06-01 Stefano Lattarini testsuite: avoid generating `*-p.test' tests, use a wrapper script diff --git a/tests/cond29.test b/tests/cond29.test index 222743c98..b07a7a9ca 100755 --- a/tests/cond29.test +++ b/tests/cond29.test @@ -16,17 +16,9 @@ # Check that many conditions do not lead to combinatorial explosion. # (This is related to PR/352.) -# -# On this test, Automake 1.7.x would compute all 2**22 = 4194304 -# possible combinations of conditionals (it would do this five times, -# to define a01_DEPENDENCIES, a02_DEPENDENCIES, a03_OBJECTS, -# a04_OBJECTS, and to rewrite bin_PROGRAM), eating all memory, swap, -# or cpu time it can found. . ./defs || Exit 1 -timeout 10s true || skip_ "timeout command not found" - echo AC_PROG_CC >>configure.in cat >Makefile.am <>Makefile.am <