Jirka reported to me that one of the test cases I've introduced started to fail for him. It turned out that flatpak "leaks" a FD of the wayland socket to run programs in his env, which broke a test case wanting to use fd '205'. (we use stable FD numbers via dup2 to ensure output stays identical) To prevent this from happening refactor virCommandMassClose and use it in all tests to close everything except stdio. Peter Krempa (2): util: command: Extract non-virCommand related bits from virCommandMassClose testutils: Close FDs leaked into test programs to avoid random breakage src/libvirt_private.syms | 1 + src/util/vircommand.c | 101 +++++++++++++++++++++------------------ src/util/vircommand.h | 3 ++ tests/testutils.c | 10 ++++ 4 files changed, 69 insertions(+), 46 deletions(-) -- 2.54.0