[zeromq-dev] need help writing a test for zmq_poll

Chuck Remes cremes.devlist at mac.com
Tue Nov 15 06:27:36 CET 2011


I am pretty sure that zmq_poll in both 2.1.10 and 3.1 fails to properly fall through the "timeout" value when there is a socket with an event on it. Instead of returning immediately, it sleeps (or spins) for the duration of the timeout and then returns the correct values. I'd like to prove this by writing a test in C (for the tests/ dir) but my C skills might not be up to the challenge.

How would you suggest structuring the test so that for each legal socket pair (REQ/REP, XREQ/REP, PUB/SUB, etc) we can verify that zmq_poll returns immediately when there is a read or write event waiting on the socket?

cr
 



More information about the zeromq-dev mailing list