[PATCH 01/15] qemuxml2argvtest: Convert hugepages related tests to _CAPS_LATEST

Ján Tomko jtomko at redhat.com
Fri Nov 4 09:21:33 UTC 2022


On a Thursday in 2022, Michal Privoznik wrote:
>Currently, we have maybe a dozen tests for hugepages related
>stuff in qemuxml2argvtest. In all cases DO_TEST() is used, which
>means we have to enumerate all capabilities needed (though, it's
>usually just QEMU_CAPS_OBJECT_MEMORY_RAM and
>QEMU_CAPS_OBJECT_MEMORY_FILE, exceptionally
>QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD too).
>

>Nevertheless, these caps made sense back in QEMU 2.X era when
>these objects were being introduced. But now, almost 8 years
>after the fact we can safely assume every QEMU knows these caps.
>Therefore, switch to DO_TEST_CAPS_LATEST().
>

This paragraph feels misleading. Of course the latest QEMU we support
will know them, if they are even in the oldest QEMU we support.

How about:

Instead of deleting the caps flags one-by-one, just switch the tests
to use DO_CAPS_LATEST().

>The qemuxml2xmltest will undergo similar treatment in next
>commit.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> ...> hugepages-default-2M.x86_64-latest.args} | 11 ++--
> .../qemuxml2argvdata/hugepages-default-2M.xml |  4 +-
> ...es-default-system-size.x86_64-latest.args} | 13 ++--
[...]
> .../hugepages-numa-nodeset-part.xml           |  4 +-
> .../hugepages-numa-nodeset.xml                |  4 +-
> tests/qemuxml2xmloutdata/hugepages-shared.xml |  4 +-
> 44 files changed, 375 insertions(+), 372 deletions(-)
> rename tests/qemuxml2argvdata/{hugepages-default-system-size.args => hugepages-default-2M.x86_64-latest.args} (55%)
> rename tests/qemuxml2argvdata/{hugepages-default-2M.args => hugepages-default-system-size.x86_64-latest.args} (61%)
> rename tests/qemuxml2argvdata/{hugepages-default.args => hugepages-default.x86_64-latest.args} (51%)
> delete mode 100644 tests/qemuxml2argvdata/hugepages-memaccess.args
[...]
> delete mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.args
> create mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args
> delete mode 100644 tests/qemuxml2argvdata/pages-discard.args
> rename tests/qemuxml2argvdata/{hugepages-numa-nodeset.args => pages-discard.x86_64-latest.args} (59%)

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano


More information about the libvir-list mailing list