]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix command test wrt gnutls initialize & fix debugging
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 25 Aug 2011 11:05:54 +0000 (12:05 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 25 Aug 2011 11:05:54 +0000 (12:05 +0100)
commit2d533a465a95227cd9a06573027f60a42c8cbd42
treede79b3839d842341b36667970fc221f587a8fd29
parenteaddec976ef06457fee4a4ce86b8c7ee906183b7
Fix command test wrt gnutls initialize & fix debugging

The VIR_TEST_DEBUG and VIR_TEST_VERBOSE env vars did not work
because we replaced 'environ' with 'newenv'. Simply calling
virTestGetDebug/Verbose() before replacing the 'environ' ensures
we have processed the env variables.

The gnutls initialization code opens /dev/urandom and keeps that
FD around for later use. We have code which kills off FDs 3-5
to avoid interfereing with our test case. Move the virInitialize
call before this point, so it kills off the gnutls /dev/urandom
FD which is irrelevant for testing purposes

* tests/commandtest.c: Fix test debugging & make it robust against
  opened FDs
tests/commandtest.c