Am 2016-11-17 um 07:08 schrieb Alistair Leslie-Hughes:
- Sleep(1000);
I think there should be ways to avoid this sleep. E.g. you could store the expected number of callbacks in a global variable and signal an event in the callback handler when it has been reached. If any additional callbacks are invoked report an error in the callback. In the main thread do a timed wait for the event and check for timeouts to catch cases where too few callback invocations take place. That way you limit the timeout to error cases.
A one second sleep may not be long, but these things do sum up over the entire testsuite, so we should put in some effort to minimize the time make test requires.
You also have some PCRAP uses in the code (PDPNMSG_ASYNC_OP_COMPLETE).
Stefan