From fe5b07199d70a7633b7c0616200fe3c5e6b240c0 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 20 Nov 2018 11:46:44 +0300 Subject: [PATCH] Mark a lot of flacky tests with TT_RETRIABLE (for linux/win32 only) This patch mark testcases that only fail under travis-ci/appveyor with TT_RETRIABLE, since otherwise there is too much noise, other issues (like failures under vagrant boxes) would be investigated separatelly. linux (from travis-ci only): - http/cancel_by_host_no_ns - http/cancel_by_host_inactive_server - http/cancel_by_host_ns_timeout - http/cancel_by_host_ns_timeout_inactive_server - thread/conditions_simple - util/monotonic_prc_precise - util/usleep - main/del_wait vagrant/ubuntu box (this is the only exception): - thread/no_events win32 (from appveyor only): - main/active_later - main/persistent_active_timeout And we should use TT_RETRIABLE over TT_OFF_BY_DEFAULT/TT_SKIP when it make sense. But there is still "test-ratelim__group_lim" left. --- test/regress.c | 6 +++--- test/regress_http.c | 10 ++++++---- test/regress_thread.c | 8 ++++---- test/regress_util.c | 4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/test/regress.c b/test/regress.c index e3966247..057765ea 100644 --- a/test/regress.c +++ b/test/regress.c @@ -3416,14 +3416,14 @@ struct testcase_t main_testcases[] = { BASIC(bad_assign, TT_FORK|TT_NEED_BASE|TT_NO_LOGS), BASIC(bad_reentrant, TT_FORK|TT_NEED_BASE|TT_NO_LOGS), - BASIC(active_later, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR), + BASIC(active_later, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR|TT_RETRIABLE), BASIC(event_remove_timeout, TT_FORK|TT_NEED_BASE|TT_NEED_SOCKETPAIR), /* These are still using the old API */ LEGACY(persistent_timeout, TT_FORK|TT_NEED_BASE), { "persistent_timeout_jump", test_persistent_timeout_jump, TT_FORK|TT_NEED_BASE, &basic_setup, NULL }, { "persistent_active_timeout", test_persistent_active_timeout, - TT_FORK|TT_NEED_BASE, &basic_setup, NULL }, + TT_FORK|TT_NEED_BASE|TT_RETRIABLE, &basic_setup, NULL }, LEGACY(priorities, TT_FORK|TT_NEED_BASE), BASIC(priority_active_inversion, TT_FORK|TT_NEED_BASE), { "common_timeout", test_common_timeout, TT_FORK|TT_NEED_BASE, @@ -3476,7 +3476,7 @@ struct testcase_t main_testcases[] = { #endif #ifdef EVENT__HAVE_PTHREADS /** TODO: support win32 */ - LEGACY(del_wait, TT_ISOLATED|TT_NEED_THREADS), + LEGACY(del_wait, TT_ISOLATED|TT_NEED_THREADS|TT_RETRIABLE), LEGACY(del_notify, TT_ISOLATED|TT_NEED_THREADS), #endif diff --git a/test/regress_http.c b/test/regress_http.c index 2efc0dbf..2429c754 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -4826,6 +4826,8 @@ http_newreqcb_test(void *arg) #define HTTP_CAST_ARG(a) ((void *)(a)) #define HTTP_OFF_N(title, name, arg) \ { #title, http_##name##_test, TT_ISOLATED|TT_OFF_BY_DEFAULT, &basic_setup, HTTP_CAST_ARG(arg) } +#define HTTP_RET_N(title, name, arg) \ + { #title, http_##name##_test, TT_ISOLATED|TT_RETRIABLE, &basic_setup, HTTP_CAST_ARG(arg) } #define HTTP_N(title, name, arg) \ { #title, http_##name##_test, TT_ISOLATED, &basic_setup, HTTP_CAST_ARG(arg) } #define HTTP(name) HTTP_N(name, name, NULL) @@ -4881,17 +4883,17 @@ struct testcase_t http_testcases[] = { HTTP(simple_nonconformant), HTTP_N(cancel, cancel, BASIC), - HTTP_N(cancel_by_host, cancel, BY_HOST), + HTTP_RET_N(cancel_by_host, cancel, BY_HOST), + HTTP_RET_N(cancel_by_host_inactive_server, cancel, BY_HOST | INACTIVE_SERVER), HTTP_N(cancel_by_host_no_ns, cancel, BY_HOST | NO_NS), - HTTP_N(cancel_by_host_inactive_server, cancel, BY_HOST | INACTIVE_SERVER), HTTP_N(cancel_inactive_server, cancel, INACTIVE_SERVER), HTTP_N(cancel_by_host_no_ns_inactive_server, cancel, BY_HOST | NO_NS | INACTIVE_SERVER), HTTP_OFF_N(cancel_by_host_server_timeout, cancel, BY_HOST | INACTIVE_SERVER | SERVER_TIMEOUT), HTTP_OFF_N(cancel_server_timeout, cancel, INACTIVE_SERVER | SERVER_TIMEOUT), HTTP_OFF_N(cancel_by_host_no_ns_server_timeout, cancel, BY_HOST | NO_NS | INACTIVE_SERVER | SERVER_TIMEOUT), HTTP_OFF_N(cancel_by_host_ns_timeout_server_timeout, cancel, BY_HOST | NO_NS | NS_TIMEOUT | INACTIVE_SERVER | SERVER_TIMEOUT), - HTTP_N(cancel_by_host_ns_timeout, cancel, BY_HOST | NO_NS | NS_TIMEOUT), - HTTP_N(cancel_by_host_ns_timeout_inactive_server, cancel, BY_HOST | NO_NS | NS_TIMEOUT | INACTIVE_SERVER), + HTTP_RET_N(cancel_by_host_ns_timeout, cancel, BY_HOST | NO_NS | NS_TIMEOUT), + HTTP_RET_N(cancel_by_host_ns_timeout_inactive_server, cancel, BY_HOST | NO_NS | NS_TIMEOUT | INACTIVE_SERVER), HTTP(virtual_host), HTTP(post), diff --git a/test/regress_thread.c b/test/regress_thread.c index 689c23d1..1e0ce41f 100644 --- a/test/regress_thread.c +++ b/test/regress_thread.c @@ -564,8 +564,8 @@ end: ; } -#define TEST(name) \ - { #name, thread_##name, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE, \ +#define TEST(name, f) \ + { #name, thread_##name, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE|(f), \ &basic_setup, NULL } struct testcase_t thread_testcases[] = { @@ -575,7 +575,7 @@ struct testcase_t thread_testcases[] = { { "forking", thread_basic, TT_FORK|TT_NEED_THREADS|TT_NEED_BASE, &basic_setup, (char*)"forking" }, #endif - TEST(conditions_simple), + TEST(conditions_simple, TT_RETRIABLE), { "deferred_cb_skew", thread_deferred_cb_skew, TT_FORK|TT_NEED_THREADS|TT_OFF_BY_DEFAULT, &basic_setup, NULL }, @@ -583,7 +583,7 @@ struct testcase_t thread_testcases[] = { /****** XXX TODO FIXME windows seems to be having some timing trouble, * looking into it now. / ellzey ******/ - TEST(no_events), + TEST(no_events, TT_RETRIABLE), #endif END_OF_TESTCASES }; diff --git a/test/regress_util.c b/test/regress_util.c index 721537cc..3da20703 100644 --- a/test/regress_util.c +++ b/test/regress_util.c @@ -1559,12 +1559,12 @@ struct testcase_t util_testcases[] = { { "mm_malloc", test_event_malloc, 0, NULL, NULL }, { "mm_calloc", test_event_calloc, 0, NULL, NULL }, { "mm_strdup", test_event_strdup, 0, NULL, NULL }, - { "usleep", test_evutil_usleep, 0, NULL, NULL }, + { "usleep", test_evutil_usleep, TT_RETRIABLE, NULL, NULL }, { "monotonic_res", test_evutil_monotonic_res, 0, &basic_setup, (void*)"" }, { "monotonic_res_precise", test_evutil_monotonic_res, TT_OFF_BY_DEFAULT, &basic_setup, (void*)"precise" }, { "monotonic_res_fallback", test_evutil_monotonic_res, TT_OFF_BY_DEFAULT, &basic_setup, (void*)"fallback" }, { "monotonic_prc", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"" }, - { "monotonic_prc_precise", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"precise" }, + { "monotonic_prc_precise", test_evutil_monotonic_prc, TT_RETRIABLE, &basic_setup, (void*)"precise" }, { "monotonic_prc_fallback", test_evutil_monotonic_prc, 0, &basic_setup, (void*)"fallback" }, { "date_rfc1123", test_evutil_date_rfc1123, 0, NULL, NULL }, { "evutil_v4addr_is_local", test_evutil_v4addr_is_local, 0, NULL, NULL }, -- 2.40.0