From: Branden Archer Date: Sun, 19 Jun 2016 20:49:20 +0000 (-0400) Subject: Remove double addition of test suite X-Git-Tag: 0.11.0~21^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98b1e71c78707adafe5dec27446a183e69937f29;p=check Remove double addition of test suite The original purpose of adding the default timeout tests twice does not seem to be relevant anymore; the timeout tests have been split into several different types, each using either the tcase_set_timeout or an environment variable. The tc_timeout_default suite never has anything but the default timeout set, so the spirit of why it was originally added no longer applies. In addition, if the suite were formally torn down it would cause a double free error. --- diff --git a/tests/check_check_master.c b/tests/check_check_master.c index 199866c..2f33cdd 100644 --- a/tests/check_check_master.c +++ b/tests/check_check_master.c @@ -165,16 +165,6 @@ static master_test_t master_tests[] = { { "User Double Timeout Tests", CK_ERROR, "Test timeout expired" }, { "User Double Timeout Tests", CK_ERROR, "Test timeout expired" }, - /* Default Timeout tests are run twice , see check_check_sub.c:make_sub_suite() */ - { "Default Timeout Tests", CK_ERROR, "Test timeout expired" }, -#ifdef HAVE_LIBRT - { "Default Timeout Tests", CK_PASS, "Passed" }, - { "Default Timeout Tests", CK_PASS, "Passed" }, -#endif /* HAVE_LIBRT */ - { "Default Timeout Tests", CK_PASS, "Passed" }, - { "Default Timeout Tests", CK_ERROR, "Test timeout expired" }, - { "Default Timeout Tests", CK_ERROR, "Test timeout expired" }, - #if HAVE_DECL_SETENV { "Environment Integer Timeout Scaling Tests", CK_ERROR, "Test timeout expired" }, #ifdef HAVE_LIBRT diff --git a/tests/check_check_sub.c b/tests/check_check_sub.c index e1fe8c5..7d6c7d5 100644 --- a/tests/check_check_sub.c +++ b/tests/check_check_sub.c @@ -1014,8 +1014,6 @@ Suite *make_sub_suite(void) suite_add_tcase (s, tc_timeout_usr_int); suite_add_tcase (s, tc_timeout_usr_double); - /* Add a second time to make sure tcase_set_timeout doesn't contaminate it. */ - suite_add_tcase (s, tc_timeout_default); #if HAVE_DECL_SETENV suite_add_tcase (s, tc_timeout_env_scale_int); suite_add_tcase (s, tc_timeout_env_scale_double);