mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
test: fix commandtest under autobuild.sh
* tests/commandtest.c (mymain): Kill off any leaked-in fds. * autobuild.sh: Don't leak fds. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
30a4ee84c4
commit
7aaf4e6439
@ -38,7 +38,7 @@ make install
|
|||||||
exec 3>&1
|
exec 3>&1
|
||||||
st=$(
|
st=$(
|
||||||
exec 4>&1 >&3
|
exec 4>&1 >&3
|
||||||
{ make check syntax-check 2>&1; echo $? >&4; } | tee "$RESULTS"
|
{ make check syntax-check 2>&1 3>&- 4>&-; echo $? >&4; } | tee "$RESULTS"
|
||||||
)
|
)
|
||||||
exec 3>&-
|
exec 3>&-
|
||||||
test "$st" = 0
|
test "$st" = 0
|
||||||
|
@ -688,6 +688,12 @@ mymain(int argc, char **argv)
|
|||||||
if (chdir("/tmp") < 0)
|
if (chdir("/tmp") < 0)
|
||||||
return(EXIT_FAILURE);
|
return(EXIT_FAILURE);
|
||||||
|
|
||||||
|
/* Kill off any inherited fds that might interfere with our
|
||||||
|
* testing. */
|
||||||
|
close(3);
|
||||||
|
close(4);
|
||||||
|
close(5);
|
||||||
|
|
||||||
virInitialize();
|
virInitialize();
|
||||||
|
|
||||||
const char *const newenv[] = {
|
const char *const newenv[] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user