qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 22/22] tests/qtest: skip bcm2835-test if no raspi3b model


From: Alex Bennée
Subject: Re: [PATCH 22/22] tests/qtest: skip bcm2835-test if no raspi3b model
Date: Wed, 03 May 2023 11:34:53 +0100
User-agent: mu4e 1.11.4; emacs 29.0.90

Thomas Huth <thuth@redhat.com> writes:

> 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?

Yeah I dropped it because other tests seem to use the return
g_test_run() pattern. Maybe they are wrong?

>
> 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();
>>   }


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]