Adjust rx-event test to exercise cancel/fire racemaster
commitbdb509fb1d8e0fdca05dffecdbcbf60a95ea502e
authorBenjamin Kaduk <kaduk@mit.edu>
Thu, 5 Oct 2017 04:03:44 +0000 (4 23:03 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 8 Nov 2017 16:25:23 +0000 (8 11:25 -0500)
treeeddfb2527515a76030f59dc56539ff3de2762581
parent311f1d28a2f626350b33ad432e674055b62511bd
Adjust rx-event test to exercise cancel/fire race

We currently do not properly handle the case where a thread runs
rxevent_Cancel() in parallel with the event-handler thread attempting
to fire that event, but the test suite only picked up on this issue
in a handful of the Debian automated builds (somewhat less-resourced
ones, perhaps).

Modify the event scheduling algorithm in the test so as to create a
larger chunk of events scheduled to fire "right away" and thereby
exercise the race condition more often when we proceed to cancel
a quarter of events "right away".

Change-Id: I50f55fd532901147cfda1a5f40ef949bf3270401
Reviewed-on: https://gerrit.openafs.org/12755
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests/rx/event-t.c