]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tests: kqueue: use a more precise timer for the NOTE_ABSTIME test
authorkevans <kevans@FreeBSD.org>
Fri, 17 Apr 2020 02:22:15 +0000 (02:22 +0000)
committerkevans <kevans@FreeBSD.org>
Fri, 17 Apr 2020 02:22:15 +0000 (02:22 +0000)
commitfa4675f29b89bf4399dbe517dca6b73ff7de3fec
tree627ca404cd39822f50c9bcab06cacc8a5ec1bbb4
parentfda6fb828d41d4a993b6dd909a08778d7030febd
tests: kqueue: use a more precise timer for the NOTE_ABSTIME test

Originally noticed while attempting to run the kqueue tests under
qemu-user-static, this apparently just happens sometimes when running in a
jail in general -- the timer will fire off "too early," but it's really just
the result of imprecise measurements (noted by cem).

Kicking this over to NOTE_USECONDS still tests the correct thing while
allowing it to work more consistently; a basic sanity test reveals that we
often end up coming in just less than 200 microseconds after the timer
fired off.

MFC after: 3 days
tests/sys/kqueue/libkqueue/timer.c