]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Initialize virRandom in for test suite.
authorCole Robinson <crobinso@redhat.com>
Thu, 8 Oct 2009 22:03:55 +0000 (18:03 -0400)
committerCole Robinson <crobinso@redhat.com>
Tue, 20 Oct 2009 18:17:34 +0000 (14:17 -0400)
Otherwise any virRandom calls will result in a segfault.

tests/testutils.c

index 536441a358b47013d47d028a49e0841552afa159..e6f5e611938717e93f73d921f2cd246f88b6b5b1 100644 (file)
@@ -340,7 +340,8 @@ int virtTestMain(int argc,
 #endif
 
     if (virThreadInitialize() < 0 ||
-        virErrorInitialize() < 0)
+        virErrorInitialize() < 0 ||
+        virRandomInitialize(time(NULL) ^ getpid()))
         return 1;
 
     if ((debugStr = getenv("VIR_TEST_DEBUG")) != NULL) {