|
From: | Thomas Huth |
Subject: | Re: [PATCH 22/22] tests/qtest: skip bcm2835-test if no raspi3b model |
Date: | Wed, 3 May 2023 11:51:39 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 |
On 03/05/2023 11.12, Alex Bennée wrote:
We can't assume the machine exists and should gracefully skip the test if we haven't built the model. This is ostensibly fixed by db2237c459 (tests/qtest: Restrict bcm2835-dma-test to CONFIG_RASPI) but I still hit it during my tests.
The problem is likely that you build aarch64-softmmu with the minimal config, but still keep arm-softmmu around with the full config? Then CONFIG_RASPI will still be set at the meson.build level since it is taken from config-all-devices.mak here.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- tests/qtest/bcm2835-dma-test.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/qtest/bcm2835-dma-test.c b/tests/qtest/bcm2835-dma-test.c index 8293d822b9..2e6245e9e2 100644 --- a/tests/qtest/bcm2835-dma-test.c +++ b/tests/qtest/bcm2835-dma-test.c @@ -107,12 +107,11 @@ static void bcm2835_dma_test_interrupts(void)int main(int argc, char **argv){ - int ret; g_test_init(&argc, &argv, NULL); - qtest_add_func("/bcm2835/dma/test_interrupts", + if (qtest_has_machine("raspi3b")) { + qtest_add_func("/bcm2835/dma/test_interrupts", bcm2835_dma_test_interrupts); - qtest_start("-machine raspi3b"); - ret = g_test_run(); - qtest_end();
Where did the qtest_end() go?It's maybe cleaner if you move the qtest_start() and qtest_end() calls into the bcm2835_dma_test_interrupts() function instead.
Thomas
- return ret; + qtest_start("-machine raspi3b"); + } + return g_test_run(); }
[Prev in Thread] | Current Thread | [Next in Thread] |