]> granicus.if.org Git - libevent/commitdiff
a bug in the regression test of event_reinit caused epoll to fail
authorNiels Provos <provos@gmail.com>
Thu, 29 Nov 2007 02:52:32 +0000 (02:52 +0000)
committerNiels Provos <provos@gmail.com>
Thu, 29 Nov 2007 02:52:32 +0000 (02:52 +0000)
svn:r560

test/regress.c

index 8d24ee3218abea326964efd068f9b293760c22e0..0909ca4cf8af93fad347a199bdf1be98b0b0fe41 100644 (file)
@@ -473,7 +473,10 @@ test_fork(void)
 
                event_dispatch();
 
-               exit(test_ok == 0);
+               /* we do not send an EOF; simple_read_cb requires an EOF 
+                * to set test_ok.  we just verify that the callback was
+                * called. */
+               exit(test_ok != 0 || called != 2);
        }
 
        /* wait for the child to read the data */
@@ -487,7 +490,7 @@ test_fork(void)
        }
        
        if (WEXITSTATUS(status) != 0) {
-               fprintf(stderr, "FAILED\n");
+               fprintf(stderr, "FAILED (exit)\n");
                exit(1);
        }