From 9e95dfadb1d5fc2df5ba09b3692f743f8a6315fb Mon Sep 17 00:00:00 2001 From: jmmv Date: Tue, 16 Nov 2010 17:55:56 +0000 Subject: [PATCH] Pull up 702fa99a25c1b27e4c501e4a504f36b74106ea97 from upstream This reverts the default timeout for test cases back to 300 seconds. The change in the release was quite blind because it did not anticipate many existing tests to be slow enough to overflow the modified timeout (30 seconds), specially in anita. My plan to really fix this is to let test cases specify their sizes in a declarative way instead of specifying timeouts in seconds (the timeout being defined by atf-run on a size basis), so I'm not going to bother to go over all existing tests trying to figure out which ones need a higher timeout for now. It is just easier to revert. --- external/bsd/atf/dist/atf-run/test-program.cpp | 2 +- .../bsd/atf/dist/atf-run/test_program_test.cpp | 14 +++++++------- external/bsd/atf/dist/doc/atf-test-case.4 | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/external/bsd/atf/dist/atf-run/test-program.cpp b/external/bsd/atf/dist/atf-run/test-program.cpp index c3c5885e5c50..17ef068e8c03 100644 --- a/external/bsd/atf/dist/atf-run/test-program.cpp +++ b/external/bsd/atf/dist/atf-run/test-program.cpp @@ -110,7 +110,7 @@ class metadata_reader : public detail::atf_tp_reader { m_tcs[ident].insert(std::make_pair("has.cleanup", "false")); if (m_tcs[ident].find("timeout") == m_tcs[ident].end()) - m_tcs[ident].insert(std::make_pair("timeout", "30")); + m_tcs[ident].insert(std::make_pair("timeout", "300")); } public: diff --git a/external/bsd/atf/dist/atf-run/test_program_test.cpp b/external/bsd/atf/dist/atf-run/test_program_test.cpp index 05c9e35fd126..fd6e79bd2823 100644 --- a/external/bsd/atf/dist/atf-run/test_program_test.cpp +++ b/external/bsd/atf/dist/atf-run/test_program_test.cpp @@ -190,7 +190,7 @@ ATF_TEST_CASE_BODY(tp_2) "\n" "ident: test_case_1\n" "descr: This is the description\n" - "timeout: 30\n" + "timeout: 300\n" "\n" "ident: test_case_2\n" "\n" @@ -201,7 +201,7 @@ ATF_TEST_CASE_BODY(tp_2) // NO_CHECK_STYLE_BEGIN const char* exp_calls[] = { - "got_tc(test_case_1, {descr=This is the description, ident=test_case_1, timeout=30})", + "got_tc(test_case_1, {descr=This is the description, ident=test_case_1, timeout=300})", "got_tc(test_case_2, {ident=test_case_2})", "got_tc(test_case_3, {X-prop1=A custom property, descr=Third test case, ident=test_case_3})", "got_eof()", @@ -224,7 +224,7 @@ ATF_TEST_CASE_BODY(tp_3) "\n" "ident: single_test\n" "descr: Some description\n" - "timeout: 30\n" + "timeout: 300\n" "require.arch: thearch\n" "require.config: foo-bar\n" "require.machine: themachine\n" @@ -234,7 +234,7 @@ ATF_TEST_CASE_BODY(tp_3) // NO_CHECK_STYLE_BEGIN const char* exp_calls[] = { - "got_tc(single_test, {descr=Some description, ident=single_test, require.arch=thearch, require.config=foo-bar, require.machine=themachine, require.progs=/bin/cp mv, require.user=root, timeout=30})", + "got_tc(single_test, {descr=Some description, ident=single_test, require.arch=thearch, require.config=foo-bar, require.machine=themachine, require.progs=/bin/cp mv, require.user=root, timeout=300})", "got_eof()", NULL }; @@ -474,7 +474,7 @@ ATF_TEST_CASE_BODY(tp_59) "\n" "\n" "ident: test\n" - "timeout: 30\n" + "timeout: 300\n" ; const char* exp_calls[] = { @@ -762,7 +762,7 @@ ATF_TEST_CASE_BODY(get_metadata_several_tcs) { check_property((*iter).second, "descr", "Description 1"); check_property((*iter).second, "has.cleanup", "false"); check_property((*iter).second, "ident", "first"); - check_property((*iter).second, "timeout", "30"); + check_property((*iter).second, "timeout", "300"); } { @@ -786,7 +786,7 @@ ATF_TEST_CASE_BODY(get_metadata_several_tcs) { ATF_REQUIRE_EQ(3, (*iter).second.size()); check_property((*iter).second, "has.cleanup", "false"); check_property((*iter).second, "ident", "third"); - check_property((*iter).second, "timeout", "30"); + check_property((*iter).second, "timeout", "300"); } } diff --git a/external/bsd/atf/dist/doc/atf-test-case.4 b/external/bsd/atf/dist/doc/atf-test-case.4 index b7f8ae82abdb..f5ee0b9c80ce 100644 --- a/external/bsd/atf/dist/doc/atf-test-case.4 +++ b/external/bsd/atf/dist/doc/atf-test-case.4 @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 31, 2010 +.Dd November 16, 2010 .Dt ATF-TEST-CASE 4 .Os .Sh NAME @@ -230,7 +230,7 @@ unprivileged user will be supported. .It timeout Type: integral. Optional; defaults to -.Sq 30 . +.Sq 300 . .Pp Specifies the maximum amount of time the test case can run. This is particularly useful because some tests can stall either because they