[PATCH 02/15] qemuxml2xmltest: Convert hugepages related tests to _CAPS_LATEST

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


On a Thursday in 2022, Michal Privoznik wrote:
>Currently, we have maybe a dozen tests for hugepages related stuff in
>qemuxml2xmltest. 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_DEVICE_PC_DIMM 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().
>

Same comment as in the previous commit.

>Since some of our expected output files are just a symlink to their
>respective input files, these are changed too. But from QEMU's
>POV nothing changes as no .args file is changed.
>
>Oh, and I'm also adding a 'hugepages-memaccess3' test case, which
>was missing, surprisingly.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> .../qemuxml2argvdata/hugepages-default-2M.xml |  5 +-
> .../hugepages-default-system-size.xml         |  5 +-
[...]
> ...pages-discard-hugepages.x86_64-latest.xml} |  0
> tests/qemuxml2xmltest.c                       | 33 +++++------
> 37 files changed, 107 insertions(+), 282 deletions(-)
> rename tests/qemuxml2xmloutdata/{hugepages-default-2M.xml => hugepages-default-2M.x86_64-latest.xml} (100%)
> rename tests/qemuxml2xmloutdata/{hugepages-default-system-size.xml => hugepages-default-system-size.x86_64-latest.xml} (100%)
[...]
> delete mode 100644 tests/qemuxml2xmloutdata/hugepages-shared.xml
> rename tests/qemuxml2xmloutdata/{pages-dimm-discard.xml => pages-dimm-discard.x86_64-latest.xml} (100%)
> rename tests/qemuxml2xmloutdata/{pages-discard-hugepages.xml => pages-discard-hugepages.x86_64-latest.xml} (100%)
>

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

Jano


More information about the libvir-list mailing list