[libvirt] [PATCH] test: fix pcie-root-port-too-many test

Andrea Bolognani abologna at redhat.com
Thu Feb 23 08:45:51 UTC 2017


On Wed, 2017-02-22 at 12:43 -0500, Laine Stump wrote:
> While reviewing a patch from Andrea that modified this test case, I
> realized that although it was "properly failing" (it's a negative
> test), that it was failing for the wrong reason (the MULTIFUNCTION cap
> wasn't set in the test case, so it was saying that multifunction=on
> wasn't supported by the QEMU binary; instead it should have been
> complaining that it had run out of PCI slots of the appropriate type
> and couldn't automatically add any more).
> 
> This improper failure had started when I added the patch to
> automatically aggregate pcie-root-ports onto multiple functions of
> each pcie-root slot, but I hadn't noticed it because the test still
> failed.
> 
> This patch corrects the test case to 1) set the MULTIFUNCTION flag in
> the caps, and 2) attempt to add 241 pcie-root-ports to a domain. Since
> there are 30 slots available on a pcie-root (slot 0 is reserved, and
> slot 31 is used by the integrated SATA controller), and a
> pcie-root-port can only be placed on a function of a slot on
> pcie-root, the maximum number of pcie-root-ports in any domain is 240.
> ---
>  .../qemuxml2argv-pcie-root-port-too-many.xml       | 273 ++++++++++++++++++---
>  tests/qemuxml2argvtest.c                           |   1 +
>  2 files changed, 242 insertions(+), 32 deletions(-)

ACK

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list