[libvirt] [PATCH v2 1/7] tests: Fix the iommu group path in mock pci
Michal Privoznik
mprivozn at redhat.com
Fri Aug 16 12:44:13 UTC 2019
On 7/25/19 8:09 PM, Daniel Henrique Barboza wrote:
> From: Shivaprasad G Bhat <sbhat at linux.vnet.ibm.com>
>
> The mocked path falls into /sys/bus/kernel/iommu_groups instead of
> /sys/kernel/iommu_groups. Needed for adding some new test cases.
>
> Signed-off-by: Shivaprasad G Bhat <sbhat at linux.vnet.ibm.com>
> Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
> ---
> tests/virpcimock.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/virpcimock.c b/tests/virpcimock.c
> index beb5e1490d..5ec9abe05f 100644
> --- a/tests/virpcimock.c
> +++ b/tests/virpcimock.c
> @@ -399,7 +399,7 @@ pci_device_new_from_stub(const struct pciDevice *data)
> make_file(devpath, "class", tmp, -1);
>
> if (snprintf(tmp, sizeof(tmp),
> - "%s/../../../kernel/iommu_groups/%d",
> + "%s/../../../../kernel/iommu_groups/%d",
> devpath, dev->iommuGroup) < 0) {
> ABORT("@tmp overflow");
> }
> @@ -407,7 +407,7 @@ pci_device_new_from_stub(const struct pciDevice *data)
> ABORT("Unable to create %s", tmp);
>
> if (snprintf(tmp, sizeof(tmp),
> - "../../../kernel/iommu_groups/%d", dev->iommuGroup) < 0) {
> + "../../../../kernel/iommu_groups/%d", dev->iommuGroup) < 0) {
> ABORT("@tmp overflow");
> }
> make_symlink(devpath, "iommu_group", tmp);
>
Huh, this is again something that I fix in my series. Well, in fact,
since I'm moving the place where PCI devices are created the symlink as
we have it is correct in fact.
Michal
More information about the libvir-list
mailing list