mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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); \
|
perror(lib); \
|
||||||
return EXIT_FAILURE; \
|
return EXIT_FAILURE; \
|
||||||
} \
|
} \
|
||||||
if (virAsprintf(&newenv, "%s%s%s", preload ? preload : "", \
|
if (!preload) { \
|
||||||
preload ? ":" : "", lib) < 0) { \
|
newenv = (char *) lib; \
|
||||||
|
} else if (virAsprintf(&newenv, "%s:%s", lib, preload) < 0) { \
|
||||||
perror("virAsprintf"); \
|
perror("virAsprintf"); \
|
||||||
return EXIT_FAILURE; \
|
return EXIT_FAILURE; \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user