1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

tests: Initialize virRandom in for test suite.

Otherwise any virRandom calls will result in a segfault.
This commit is contained in:
Cole Robinson 2009-10-08 18:03:55 -04:00
parent cf577653dc
commit f5ee422c58

View 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) {