summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog6
-rw-r--r--tests/scripts/features/parallelism27
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index ee3bab5..a205074 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-07 Paul D. Smith <psmith@gnu.org>
+
+ * scripts/features/parallelism: Add a test for a bug reported by
+ Michael Matz (matz@suse.de) in which make exits without waiting
+ for all its children in some situations during parallel builds.
+
2005-07-08 Paul D. Smith <psmith@gnu.org>
* test_driver.pl: Reset the environment to a clean value every
diff --git a/tests/scripts/features/parallelism b/tests/scripts/features/parallelism
index 4768539..c75f436 100644
--- a/tests/scripts/features/parallelism
+++ b/tests/scripts/features/parallelism
@@ -83,4 +83,31 @@ all: first second
first second: ; \@echo \$\@; $sleep_command 1; echo \$\@",
'-j2', "first\nfirst\nsecond\nsecond");
+# Michael Matz <matz@suse.de> reported a bug where if make is running in
+# parallel without -k and two jobs die in a row, but not too close to each
+# other, then make will quit without waiting for the rest of the jobs to die.
+
+run_make_test("
+.PHONY: all fail.1 fail.2 fail.3 ok
+all: fail.1 ok fail.2 fail.3
+
+fail.1 fail.2 fail.3:
+ \@sleep \$(patsubst fail.%,%,\$\@)
+ \@echo Fail
+ \@exit 1
+
+ok:
+ \@sleep 4
+ \@echo Ok done",
+ '-rR -j5', 'Fail
+#MAKE#: *** [fail.1] Error 1
+#MAKE#: *** Waiting for unfinished jobs....
+Fail
+#MAKE#: *** [fail.2] Error 1
+Fail
+#MAKE#: *** [fail.3] Error 1
+Ok done',
+ 512);
+
+
1;