]> granicus.if.org Git - libevent/commitdiff
Disable main/many_events_slow_add with evport backend
authorNick Mathewson <nickm@torproject.org>
Fri, 27 May 2011 18:57:55 +0000 (14:57 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 27 May 2011 18:58:21 +0000 (14:58 -0400)
In 2.0 and earlier, evport only reports up to 8 events at a time, which
confuses this test badly.

test/regress.c

index abe6af8c2465f0b4eb8457750e916b11f34fbcb9..0987809a91c9847a2b5b273f274fb6d39b3196dd 100644 (file)
@@ -2218,6 +2218,7 @@ test_many_events(void *arg)
        int called[MANY];
        int i;
        int loopflags = EVLOOP_NONBLOCK, evflags=0;
+       const int is_evport = !strcmp(event_base_get_method(base),"evport");
        if (one_at_a_time) {
                loopflags |= EVLOOP_ONCE;
                evflags = EV_PERSIST;
@@ -2226,6 +2227,10 @@ test_many_events(void *arg)
        memset(sock, 0xff, sizeof(sock));
        memset(ev, 0, sizeof(ev));
        memset(called, 0, sizeof(called));
+       if (is_evport && one_at_a_time) {
+               TT_DECLARE("NOTE", ("evport can't pass this in 2.0; skipping\n"));
+               tt_skip();
+       }
 
        for (i = 0; i < MANY; ++i) {
                /* We need an event that will hit the backend, and that will