tests: Put a mock library at the start of LD_PRELOAD

This fixes vircgrouptest when run in a sandbox which already overrides
open() and others.
This commit is contained in:
Jiri Denemark 2013-07-30 10:41:50 +02:00
parent 6aa5ebbecd
commit df166a611b

View File

@ -87,8 +87,9 @@ int virtTestMain(int argc,
perror(lib); \
return EXIT_FAILURE; \
} \
if (virAsprintf(&newenv, "%s%s%s", preload ? preload : "", \
preload ? ":" : "", lib) < 0) { \
if (!preload) { \
newenv = (char *) lib; \
} else if (virAsprintf(&newenv, "%s:%s", lib, preload) < 0) { \
perror("virAsprintf"); \
return EXIT_FAILURE; \
} \