* [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd
@ 2024-09-05 16:55 Peter Maydell
2024-09-05 16:55 ` [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests Peter Maydell
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Peter Maydell @ 2024-09-05 16:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Daniel P. Berrangé
I noticed that 'make vm-build-openbsd' had bitrotted a bit:
* two tests for the stm32l4x5 forgot a qtest_quit(), which meant
they would pass all their subtests but then timeout because the
underlying QEMU process never exited
* the ahci-test timeout was a bit aggressive
This patchset fixes these.
thanks
-- PMM
Peter Maydell (2):
tests/qtest: Add missing qtest_quit() to stm32 tests
tests/qtest: Bump timeout on ahci-test
tests/qtest/dm163-test.c | 2 ++
tests/qtest/stm32l4x5_usart-test.c | 2 ++
tests/qtest/meson.build | 1 +
3 files changed, 5 insertions(+)
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests
2024-09-05 16:55 [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell
@ 2024-09-05 16:55 ` Peter Maydell
2024-09-05 16:58 ` Daniel P. Berrangé
2024-09-05 16:55 ` [PATCH 2/2] tests/qtest: Bump timeout on ahci-test Peter Maydell
2024-09-06 14:28 ` [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell
2 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2024-09-05 16:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Daniel P. Berrangé
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>
---
Many thanks to Dan Berrangé for diagnosing the cause of this hang...
Dan also suggested on IRC that we should support g_autoptr for
the QTestState, so you don't need to manually qtest_quit(). But
for the immediate fix, I just add the missing calls.
---
tests/qtest/dm163-test.c | 2 ++
tests/qtest/stm32l4x5_usart-test.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/tests/qtest/dm163-test.c b/tests/qtest/dm163-test.c
index 3161c9208d8..4c8e654af29 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 89025182331..c175ff3064f 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)
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] tests/qtest: Bump timeout on ahci-test
2024-09-05 16:55 [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell
2024-09-05 16:55 ` [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests Peter Maydell
@ 2024-09-05 16:55 ` Peter Maydell
2024-09-05 16:58 ` Daniel P. Berrangé
2024-09-06 14:28 ` [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell
2 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2024-09-05 16:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Daniel P. Berrangé
On my OpenBSD VM test system, the ahci-test sometimes hits its 60 second
timeout. It has 75 subtests and allowing at least two seconds per
subtest seems reasonable. Bump it to 150s.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
tests/qtest/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 2f0d3ef0809..fc852f3d8ba 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -1,4 +1,5 @@
slow_qtests = {
+ 'ahci-test': 150,
'aspeed_smc-test': 360,
'bios-tables-test' : 910,
'cdrom-test' : 610,
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests
2024-09-05 16:55 ` [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests Peter Maydell
@ 2024-09-05 16:58 ` Daniel P. Berrangé
0 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2024-09-05 16:58 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
On Thu, Sep 05, 2024 at 05:55:53PM +0100, Peter Maydell wrote:
> 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>
> ---
> Many thanks to Dan Berrangé for diagnosing the cause of this hang...
> Dan also suggested on IRC that we should support g_autoptr for
> the QTestState, so you don't need to manually qtest_quit(). But
> for the immediate fix, I just add the missing calls.
> ---
> tests/qtest/dm163-test.c | 2 ++
> tests/qtest/stm32l4x5_usart-test.c | 2 ++
> 2 files changed, 4 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] tests/qtest: Bump timeout on ahci-test
2024-09-05 16:55 ` [PATCH 2/2] tests/qtest: Bump timeout on ahci-test Peter Maydell
@ 2024-09-05 16:58 ` Daniel P. Berrangé
0 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2024-09-05 16:58 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
On Thu, Sep 05, 2024 at 05:55:54PM +0100, Peter Maydell wrote:
> On my OpenBSD VM test system, the ahci-test sometimes hits its 60 second
> timeout. It has 75 subtests and allowing at least two seconds per
> subtest seems reasonable. Bump it to 150s.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> tests/qtest/meson.build | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd
2024-09-05 16:55 [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell
2024-09-05 16:55 ` [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests Peter Maydell
2024-09-05 16:55 ` [PATCH 2/2] tests/qtest: Bump timeout on ahci-test Peter Maydell
@ 2024-09-06 14:28 ` Peter Maydell
2 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2024-09-06 14:28 UTC (permalink / raw)
To: qemu-devel; +Cc: Daniel P. Berrangé
On Thu, 5 Sept 2024 at 17:55, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> I noticed that 'make vm-build-openbsd' had bitrotted a bit:
> * two tests for the stm32l4x5 forgot a qtest_quit(), which meant
> they would pass all their subtests but then timeout because the
> underlying QEMU process never exited
> * the ahci-test timeout was a bit aggressive
>
> This patchset fixes these.
>
> thanks
> -- PMM
>
> Peter Maydell (2):
> tests/qtest: Add missing qtest_quit() to stm32 tests
> tests/qtest: Bump timeout on ahci-test
I've applied these directly to master to fix the
test failures when I apply a pullreq.
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-06 14:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05 16:55 [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell
2024-09-05 16:55 ` [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests Peter Maydell
2024-09-05 16:58 ` Daniel P. Berrangé
2024-09-05 16:55 ` [PATCH 2/2] tests/qtest: Bump timeout on ahci-test Peter Maydell
2024-09-05 16:58 ` Daniel P. Berrangé
2024-09-06 14:28 ` [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).