[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 10/12] qtest/qmp-cmd-test: Make test build-independent fro
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v4 10/12] qtest/qmp-cmd-test: Make test build-independent from accelerator |
Date: |
Fri, 30 Apr 2021 17:48:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 4/30/21 8:13 AM, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>> On 4/29/21 3:22 PM, Markus Armbruster wrote:
>>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>>>>> Now than we can probe if the TCG accelerator is available
>>>>>> at runtime with a QMP command, do it once at the beginning
>>>>>> and only register the tests we can run.
>>>>>> We can then replace the #ifdef'ry by a runtime check.
>>>>>>
>>>>>> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
>>>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>>>
>>>>> Please read the last remark first. The other ones are detail; feel free
>>>>> to skip them until we're done with the last one.
>>>>>
>>>>>> ---
>>>>>> tests/qtest/qmp-cmd-test.c | 18 ++++++++++++++----
>>>>>> 1 file changed, 14 insertions(+), 4 deletions(-)
>>>>
>>>>>> + tcg_accel_available = qtest_has_accel("tcg");
>>>>>> +
>>>>>
>>>>> When does tcg_accel_available differ from defined(CONFIG_TCG)?
>>>>
>>>> qtest_has_accel("tcg") is a runtime check, while defined(CONFIG_TCG)
>>>> is build-time.
>>>
>>> Let me rephrase my question: under what conditions can the values of
>>> qtest_has_accel("tcg") and defined(CONFIG_TCG) differ?
>>
>> They are currently the same, so this patch is a no-op. *But* it
>> allows us to remove the global dependence on CONFIG_TCG in the
>> Meson machinery (see the last commit in this series).
>>
>> Is that missing part of the commit description?
>>
>> "This will allow us to remove the global CONFIG_TCG dependency
>> in our Meson machinery in a pair of commits."?
>
> Do you mean "in the next two commits"?
Yes.
> Please also note that the probing at run-time always gives the same
> result as the compile-time check it replaces.
>
> I don't understand what exactly the conversion to probing enables and
> how, but I believe I don't have to.
This series is removing some limitations in qtests to help Claudio work:
x86: https://www.mail-archive.com/qemu-devel@nongnu.org/msg793885.html
arm: https://www.mail-archive.com/qemu-devel@nongnu.org/msg799328.html
s390x: https://www.mail-archive.com/qemu-devel@nongnu.org/msg800254.html
which allow building with different sets of accelerators (and more).
Claudio/Paolo could better explain :)
What I like from feature tested at runtime is we can run qtests using
older binaries, binaries built with different configure flags, or the
binaries installed by the distribution.
Thanks,
Phil.
- Re: [PATCH v4 09/12] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64, (continued)
[PATCH v4 11/12] tests/qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore, Philippe Mathieu-Daudé, 2021/04/15
[PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected, Philippe Mathieu-Daudé, 2021/04/15
- Re: [PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected, Philippe Mathieu-Daudé, 2021/04/28
- Re: [PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected, Alex Bennée, 2021/04/28
- Re: [PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected, Philippe Mathieu-Daudé, 2021/04/28
- Re: [PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected, Alex Bennée, 2021/04/28
- Re: [PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected, Philippe Mathieu-Daudé, 2021/04/28
- Re: [PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected, Philippe Mathieu-Daudé, 2021/04/29
Re: [PATCH v4 12/12] tests/meson: Only build softfloat objects if TCG is selected, Alex Bennée, 2021/04/30