]> granicus.if.org Git - libevent/commitdiff
Mark a lot of flacky tests with TT_RETRIABLE (for linux/win32 only)
authorAzat Khuzhin <a3at.mail@gmail.com>
Tue, 20 Nov 2018 08:46:44 +0000 (11:46 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 20 Nov 2018 20:02:56 +0000 (23:02 +0300)
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
test/regress_http.c
test/regress_thread.c
test/regress_util.c

index e3966247a6fcebb39bc2a8589fcbe9406fc356d7..057765eaea72465b6b2e18b28a5fe50330773e0b 100644 (file)
@@ -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
 
index 2efc0dbf325df588af87cbe1a297f14af2d181cb..2429c754e76aaed6cde20c100ebbe3de13b2d8e7 100644 (file)
@@ -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),
index 689c23d1fb80017a5696c157a50e905b50dc7104..1e0ce41ff95e3afc40fb99eb1a2732816caa2cf1 100644 (file)
@@ -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
 };
index 721537cc721b06574007929fc34d443ecc9f1fad..3da207039e6d4e379cc6a1fc0d93088620c7e0fd 100644 (file)
@@ -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 },