Skip to contentSkip to conversation

tests/qtest: remove unused prctl/procctl headers

PATCH In review Brad Smith 2 participants 2 messages Nov 23

lore
Share & tools
lore

Brad Smith

author
#0 lore raw

PATCH 1/1 tests/qtest: remove unused prctl/procctl headers

Commit 6cbde91a2758 ("tests/qtest: use prctl(PR_SET_PDEATHSIG) as fallback to kill QEMU") added <sys/prctl.h> for PR_SET_PDEATHSIG on Linux, and commit 49e9f8644b03 ("qtest: kill orphaned qtest QEMU processes on FreeBSD") added <sys/procctl.h> for PROC_PDEATHSIG_CTL on FreeBSD. Those calls were later replaced by -run-with exit-with-parent=on, but the headers were left behind.

Remove them.

---
 tests/qtest/libqtest.c | 6 ------
 1 file changed, 6 deletions(-)
tests/qtest/libqtest.c +0 -6
index 7f66c1bbb3..f39a39b85c 100644
@@ -21,12 +21,6 @@
 #include <sys/wait.h>
 #include <sys/un.h>
 #endif /* _WIN32 */
-#ifdef __linux__
-#include <sys/prctl.h>
-#endif /* __linux__ */
-#ifdef __FreeBSD__
-#include <sys/procctl.h>
-#endif /* __FreeBSD__ */
 
 #include "libqtest.h"
 #include "libqmp.h"
Signature · 1 line
2.56.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Brad Smith

Commit 6cbde91a2758 ("tests/qtest: use prctl(PR_SET_PDEATHSIG) as fallback to kill QEMU") added <sys/prctl.h> for PR_SET_PDEATHSIG on Linux, and commit 49e9f8644b03 ("qtest: kill orphaned qtest QEMU processes on FreeBSD") added <sys/procctl.h> for PROC_PDEATHSIG_CTL on FreeBSD. Those calls were later replaced by -run-with exit-with-parent=on, but the headers were left behind.

Quoted 6 lines

Remove them.

---
 tests/qtest/libqtest.c | 6 ------
 1 file changed, 6 deletions(-)
Quoted 22 lines
tests/qtest/libqtest.c +0 -6
index 7f66c1bbb3..f39a39b85c 100644
@@ -21,12 +21,6 @@
 #include <sys/wait.h>
 #include <sys/un.h>
 #endif /* _WIN32 */
-#ifdef __linux__
-#include <sys/prctl.h>
-#endif /* __linux__ */
-#ifdef __FreeBSD__
-#include <sys/procctl.h>
-#endif /* __FreeBSD__ */
 
 #include "libqtest.h"
 #include "libqmp.h"
Signature · 1 line
2.56.0

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|