]> granicus.if.org Git - check/commitdiff
Remove double addition of test suite
authorBranden Archer <b.m.archer4@gmail.com>
Sun, 19 Jun 2016 20:49:20 +0000 (16:49 -0400)
committerBranden Archer <b.m.archer4@gmail.com>
Sun, 19 Jun 2016 20:49:37 +0000 (16:49 -0400)
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.

tests/check_check_master.c
tests/check_check_sub.c

index 199866cc0155be9306ae7fe3001d8f629ef73f1b..2f33cddf44661c7c518c5d71c3569524df050c50 100644 (file)
@@ -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
index e1fe8c5fa62f51ec72b6840a1d812e1e6fe759b2..7d6c7d54a0fa197ecb07ae0b96f5827089ff6d61 100644 (file)
@@ -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);