From: Cole Robinson Date: Thu, 8 Oct 2009 22:03:55 +0000 (-0400) Subject: tests: Initialize virRandom in for test suite. X-Git-Tag: v0.7.3~206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5ee422c586957a9a46e9c393c584370d6a5642e;p=thirdparty%2Flibvirt.git tests: Initialize virRandom in for test suite. Otherwise any virRandom calls will result in a segfault. --- diff --git a/tests/testutils.c b/tests/testutils.c index 536441a358..e6f5e61193 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) {