From 22e3751d194bdd90bb1949398519a296c9f30cf9 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Fri, 3 Oct 2008 07:14:24 +0200 Subject: [PATCH] Fix more testsuite hang corner cases. * lib/autotest/general.m4: Use the serial code path if no test is to be run. * tests/autotest.at (parallel test execution): Test -j and -jN with `-k notmatched'. Signed-off-by: Ralf Wildenhues --- ChangeLog | 8 ++++++++ lib/autotest/general.m4 | 3 +++ tests/autotest.at | 3 +++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index fd51e8097..4ccc626a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-03 Ralf Wildenhues + + Fix more testsuite hang corner cases. + * lib/autotest/general.m4: Use the serial code path if no test + is to be run. + * tests/autotest.at (parallel test execution): Test -j and -jN + with `-k notmatched'. + 2008-10-02 Ralf Wildenhues Fix hang with `testsuite -k notmatched'. diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index be135c18e..f1966cec8 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -1018,6 +1018,9 @@ rm -f "$at_suite_dir/at-source-lines" # Set number of jobs for `-j'; avoid more jobs than test groups. set X $at_groups; shift; at_max_jobs=$[@%:@] +if test $at_max_jobs -eq 0; then + at_jobs=1 +fi if test $at_jobs -ne 1 && { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then at_jobs=$at_max_jobs diff --git a/tests/autotest.at b/tests/autotest.at index a20c4acf5..3547ee41c 100644 --- a/tests/autotest.at +++ b/tests/autotest.at @@ -846,6 +846,9 @@ AT_CHECK([grep -c '^.\{53\}ok' stdout], [], [1 AT_CHECK([$CONFIG_SHELL ./micro-suite -j3 3], [], [stdout]) AT_CHECK([grep -c '^.\{53\}ok' stdout], [], [1 ]) +# Not even with zero tests: +AT_CHECK([$CONFIG_SHELL ./micro-suite -j -k nomatch], [], [ignore]) +AT_CHECK([$CONFIG_SHELL ./micro-suite -j3 -k nomatch], [], [ignore]) # The parallel scheduler requires mkfifo to work. AT_CHECK([mkfifo fifo || exit 77]) -- 2.47.3