From: Igor Mammedov <imammedo@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Ani Sinha <anisinha@redhat.com>
Subject: Re: [PATCH] tests/qtest/bios-tables-test: Check for virtio-iommu device before using it
Date: Tue, 29 Aug 2023 12:20:58 +0200 [thread overview]
Message-ID: <20230829122058.636c0c8f@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20230822164948.65187-1-thuth@redhat.com>
On Tue, 22 Aug 2023 18:49:48 +0200
Thomas Huth <thuth@redhat.com> wrote:
> The virtio-iommu device might be missing in the QEMU binary (e.g. in
> downstream RHEL builds), so let's better check for its availability first
> before using it.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
> ---
> tests/qtest/bios-tables-test.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index 47ba20b957..dd06e6300a 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -2138,7 +2138,9 @@ int main(int argc, char *argv[])
> qtest_add_func("acpi/q35/core-count2",
> test_acpi_q35_tcg_core_count2);
> }
> - qtest_add_func("acpi/q35/viot", test_acpi_q35_viot);
> + if (qtest_has_device("virtio-iommu-pci")) {
> + qtest_add_func("acpi/q35/viot", test_acpi_q35_viot);
> + }
> #ifdef CONFIG_POSIX
> qtest_add_func("acpi/q35/cxl", test_acpi_q35_cxl);
> #endif
> @@ -2173,7 +2175,9 @@ int main(int argc, char *argv[])
> qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp);
> qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb);
> qtest_add_func("acpi/virt/oem-fields", test_acpi_virt_oem_fields);
> - qtest_add_func("acpi/virt/viot", test_acpi_virt_viot);
> + if (qtest_has_device("virtio-iommu-pci")) {
> + qtest_add_func("acpi/virt/viot", test_acpi_virt_viot);
> + }
> }
> }
> ret = g_test_run();
prev parent reply other threads:[~2023-08-29 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 16:49 [PATCH] tests/qtest/bios-tables-test: Check for virtio-iommu device before using it Thomas Huth
2023-08-29 10:20 ` Igor Mammedov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230829122058.636c0c8f@imammedo.users.ipa.redhat.com \
--to=imammedo@redhat.com \
--cc=anisinha@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).