mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
6aa5ebbecd
commit
df166a611b
|
@ -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; \
|
||||
} \
|
||||
|
|
Loading…
Reference in New Issue