Disable main/many_events_slow_add with evport backend

In 2.0 and earlier, evport only reports up to 8 events at a time, which
confuses this test badly.
This commit is contained in:
Nick Mathewson 2011-05-27 14:57:55 -04:00
parent dbb3c65288
commit c11c6fcd82

View File

@ -2218,6 +2218,7 @@ test_many_events(void *arg)
int called[MANY]; int called[MANY];
int i; int i;
int loopflags = EVLOOP_NONBLOCK, evflags=0; int loopflags = EVLOOP_NONBLOCK, evflags=0;
const int is_evport = !strcmp(event_base_get_method(base),"evport");
if (one_at_a_time) { if (one_at_a_time) {
loopflags |= EVLOOP_ONCE; loopflags |= EVLOOP_ONCE;
evflags = EV_PERSIST; evflags = EV_PERSIST;
@ -2226,6 +2227,10 @@ test_many_events(void *arg)
memset(sock, 0xff, sizeof(sock)); memset(sock, 0xff, sizeof(sock));
memset(ev, 0, sizeof(ev)); memset(ev, 0, sizeof(ev));
memset(called, 0, sizeof(called)); 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) { for (i = 0; i < MANY; ++i) {
/* We need an event that will hit the backend, and that will /* We need an event that will hit the backend, and that will