]> granicus.if.org Git - libevent/commit
Add a "many events" regression test.
authorNick Mathewson <nickm@torproject.org>
Fri, 30 Oct 2009 22:43:30 +0000 (22:43 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 30 Oct 2009 22:43:30 +0000 (22:43 +0000)
commit96c6956e0247f615d8afd25d79586dfa5b478ef0
tree423cce1311fead2e9dabf1f05db4c8554e7b3e28
parent516452b71a4450f7201bc1a6bd31878c68a81e57
Add a "many events" regression test.

This is a glass-box test to get more coverage on the event loop
backends.  We've run into bugs here before with fencepost errors, and
it turns out that none of our unit tests had enough events to
exercise the resize code.

Most of the backends have some kind of logic that resizes an array
when:
    - The highest fd is too high
    - The number of events added since the last iteration of the loop
      is too high
    - The number of active events is too high.

This test hits all 3 cases, and increases coverage in select.c by 7%,
in poll by 1%, and in kqueue by 9%.

svn:r1482
test/regress.c