[libvirt] [PATCH] tests: Initialize virRandom in for test suite.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Otherwise any virRandom calls will result in a segfault.

Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
---
 tests/testutils.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tests/testutils.c b/tests/testutils.c
index 536441a..e6f5e61 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -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) {
-- 
1.6.0.6

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]