]> git.proxmox.com Git - mirror_qemu.git/commit - tests/qtest/libqtest.c
tests/qtest: Poll on waitpid() for a while before sending SIGKILL
authorStefan Berger <stefanb@linux.ibm.com>
Thu, 12 Jan 2023 14:34:13 +0000 (09:34 -0500)
committerStefan Berger <stefanb@linux.ibm.com>
Mon, 16 Jan 2023 22:18:51 +0000 (17:18 -0500)
commit82df11e78d0baef7ffb7e7933c6fb830ffed087c
tree1b5f88c0bf39f98e16c888efc60a1976aaeb62d8
parentfb7e7990342e59cf67dbd895c1a1e3fb1741df7a
tests/qtest: Poll on waitpid() for a while before sending SIGKILL

To prevent getting stuck on waitpid() in case the target process does
not terminate on SIGTERM, poll on waitpid() for 30s and if the target
process has not changed state until then send a SIGKILL to it.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230112143413.3979057-1-stefanb@linux.ibm.com
[PMM: changed TFR to RETRY_ON_EINTR]
tests/qtest/libqtest.c