[bind10-dev] libfaketime for improving unit (and luttuce?) tests
Jeremy C. Reed
jreed at isc.org
Mon Feb 3 15:04:51 UTC 2014
I didn't look at libfaketime (but I had heard of it).
Maybe we should look at BIND9's bin/tests/virtual-time/vtwrapper.c which
offers gettimeofday(), select(), poll(), kevent() and epoll_wait() Unix
system calls. From the virtual-time README:
-=-=-=-=-=-=-=
...
gettimeofday() returns a date in virtual/exponentially inflated
delay from an epoch, select(), poll(), kevent() and epoll_wait()
timeouts are deflated down to at least 10ms.
These tests depends on LD_PRELOAD being supported by the runtime
loader.
Beware BIND clock uses unsigned integer, in 22 seconds isc_time_now()
overflows and breaks assertions. Note 22 real seconds is 136 virtual
years...
-=-=-=-=-=-=-=
More information about the bind10-dev
mailing list