aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-09-05 17:55:53 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-09-06 13:59:30 +0100
commitd1e8bea9c9c1869bfbb28b7a3e9d8e3b6f8aca46 (patch)
treed6180fbe209af1812acf519e821c0604b0624957
parentMerge tag 'migration-20240904-pull-request' of https://gitlab.com/farosas/qemu into staging (diff)
downloadqemu-d1e8bea9c9c1869bfbb28b7a3e9d8e3b6f8aca46.tar.xz
qemu-d1e8bea9c9c1869bfbb28b7a3e9d8e3b6f8aca46.zip
tests/qtest: Add missing qtest_quit() to stm32 tests
In the dm163-test and stm32l4x5_usart-test, a couple of subtests are missing the qtest_quit() call. The effect of this is that on hosts other than Linux and FreeBSD the test will timeout after executing all the tests: 242/845 qemu:qtest+qtest-arm / qtest-arm/dm163-test TIMEOUT 60.04s 3 subtests passed 100/845 qemu:qtest+qtest-arm / qtest-arm/stm32l4x5_usart-test TIMEOUT 600.02s 5 subtests passed This happens because the qemu-system-arm binary which the test starts does not exit, and because it shares the stdout with the test binary, the overall meson test harness thinks the test is still running. On Linux and FreeBSD we have an extra safety net set up in qtest_spawn_qemu() which kills off any QEMU binary that ends up without a parent. This is intended for the case where QEMU crashed and didn't respond to a SIGTERM or polite request to quit, but it also sidestepped the problem in this case. However, OpenBSD doesn't have a PDEATHSIG equivalent, so we see the timeouts when running a 'make vm-build-openbsd' run. Add the missing qtest_quit() calls. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20240905165554.320577-2-peter.maydell@linaro.org
-rw-r--r--tests/qtest/dm163-test.c2
-rw-r--r--tests/qtest/stm32l4x5_usart-test.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/qtest/dm163-test.c b/tests/qtest/dm163-test.c
index 3161c9208d..4c8e654af2 100644
--- a/tests/qtest/dm163-test.c
+++ b/tests/qtest/dm163-test.c
@@ -182,6 +182,8 @@ static void test_dm163_gpio_connection(void)
g_assert_false(qtest_get_irq(qts, LAT_B));
g_assert_false(qtest_get_irq(qts, SELBK));
g_assert_false(qtest_get_irq(qts, RST_B));
+
+ qtest_quit(qts);
}
int main(int argc, char **argv)
diff --git a/tests/qtest/stm32l4x5_usart-test.c b/tests/qtest/stm32l4x5_usart-test.c
index 8902518233..c175ff3064 100644
--- a/tests/qtest/stm32l4x5_usart-test.c
+++ b/tests/qtest/stm32l4x5_usart-test.c
@@ -202,6 +202,8 @@ static void test_write_read(void)
qtest_writel(qts, USART1_BASE_ADDR + A_TDR, 0xFFFFFFFF);
const uint32_t tdr = qtest_readl(qts, USART1_BASE_ADDR + A_TDR);
g_assert_cmpuint(tdr, ==, 0x000001FF);
+
+ qtest_quit(qts);
}
static void test_receive_char(void)