[bind10-dev] libfaketime for improving unit (and luttuce?) tests

Shane Kerr shane at isc.org
Mon Feb 3 13:43:16 UTC 2014


Hello,

Summary:

I think we should investigate using libfaketime when testing BIND 10.
It should help by:

1. reducing the time it takes to run our tests, both unit and lettuce
   (system) tests

2. fixing occasion problems due to crappy clocks on virtual machines

https://github.com/wolfcw/libfaketime


Details:

I was at FOSDEM 2014 over the weekend, and one of the problems being
addressed was trying to get bitwise identical builds from software
packages:

https://fosdem.org/2014/schedule/event/reproducibledebian/

One thing rejected as a possibility was rather than removing
unnecessary timestamps from builds was to use something like
libfaketime to get consistent timestamps.

This piqued my interest, so I had a look at the libfaketime library:

https://github.com/wolfcw/libfaketime

It seems to provide almost every kind of ability to manipulate the time
reported to a program, and is reported to run on Linux and Unix.

My thinking is that on systems that provide libfaketime we can use that
instead of relying on the actual clock, but otherwise we can fall back
to the system times. (Although it's not a huge amount of code, we
probably can't ship it with BIND 10, as it is GPL.) We would only need
to do this for tests that are timing-related in any case.

Cheers,

--
Shane


More information about the bind10-dev mailing list