[libvirt] [PATCH 2/2] qemuxml2argvtest: Test localtime clock basis
Daniel P. Berrange
berrange at redhat.com
Thu Feb 6 11:24:27 UTC 2014
On Wed, Feb 05, 2014 at 03:26:23PM -0700, Eric Blake wrote:
> On 02/05/2014 07:32 AM, Michal Privoznik wrote:
> > When trying to introduce a test for previous patch, I've
> > noticed that the command line is constructed using current
> > time. This won't work in our test suite (unless you guys
> > wants to set a specific time prior to each test run :) ).
> > Therefore we need to mock calls to time(2) to return the
> > same value every time it's called.
>
> Slick. But as we only support mocking calls on Linux, you have
> converted a test from generic platform to Linux-only. Then again, qemu
> tests only run where we support qemu, which is currently Linux only, so
> I'm not sure it will matter. I guess we'll find out if anyone complains
> that it broke 'make check' on their platform.
FYI as a general rule the LD_PRELOAD approach should be capable
of working on any ELF platform, which is basically everything
we care about except Windows. The cwrap project from samba which
uses the same LD_PRELOAD trick claims to have validated such
portability.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list