From cb737041e2ea8c9611be2f3b0340df24be793943 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 15 Dec 2014 12:50:11 -0500 Subject: [PATCH] Fix annoying heisenbug in test-time.c --- test/test-time.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test-time.c b/test/test-time.c index fd4de7b6..bcc7086d 100644 --- a/test/test-time.c +++ b/test/test-time.c @@ -70,7 +70,7 @@ time_cb(evutil_socket_t fd, short event, void *arg) j = rand_int(NEVENT); tv.tv_sec = 0; tv.tv_usec = rand_int(50000); - if (tv.tv_usec % 2) + if (tv.tv_usec % 2 || called < NEVENT) evtimer_add(ev[j], &tv); else evtimer_del(ev[j]); @@ -109,6 +109,8 @@ main(int argc, char **argv) event_dispatch(); + + printf("%d, %d\n", called, NEVENT); return (called < NEVENT); } -- 2.40.0