qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Jason Andryuk" <jandryuk@gmail.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Paolo Bonzini" <pbonzinni@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>
Subject: [PULL 1/9] qtest: fix 'expression is always false' build failure in qtest_has_accel()
Date: Mon, 1 Nov 2021 19:44:22 -0400	[thread overview]
Message-ID: <20211101234358.582487-2-mst@redhat.com> (raw)
In-Reply-To: <20211101234358.582487-1-mst@redhat.com>

From: Igor Mammedov <imammedo@redhat.com>

If KVM is disabled or not present, qtest library build
may fail with:
   libqtest.c: In function 'qtest_has_accel':
      comparison of unsigned expression < 0 is always false
      [-Werror=type-limits]
         for (i = 0; i < ARRAY_SIZE(targets); i++) {

due to empty 'targets' array.
Fix it by making sure that CONFIG_KVM_TARGETS isn't empty.

Fixes: e741aff0f43343 ("tests: qtest: add qtest_has_accel() to check if tested binary supports accelerator")
Reported-by: Jason Andryuk <jandryuk@gmail.com>
Suggested-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20211027151012.2639284-1-imammedo@redhat.com>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index b092728397..ab4a5723f0 100644
--- a/meson.build
+++ b/meson.build
@@ -75,7 +75,7 @@ else
   kvm_targets = []
 endif
 
-kvm_targets_c = ''
+kvm_targets_c = '""'
 if not get_option('kvm').disabled() and targetos == 'linux'
   kvm_targets_c = '"' + '" ,"'.join(kvm_targets) + '"'
 endif
-- 
MST



  reply	other threads:[~2021-11-01 23:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 23:44 [PULL 0/9] pc,pci,virtio: features, fixes Michael S. Tsirkin
2021-11-01 23:44 ` Michael S. Tsirkin [this message]
2021-11-01 23:44 ` [PULL 2/9] vhost-vdpa: Set discarding of RAM broken when initializing the backend Michael S. Tsirkin
2021-11-01 23:44 ` [PULL 3/9] hw/acpi: Add VIOT table Michael S. Tsirkin
2021-11-01 23:44 ` [PULL 4/9] hw/i386/pc: Remove x86_iommu_get_type() Michael S. Tsirkin
2021-11-01 23:44 ` [PULL 5/9] hw/i386/pc: Move IOMMU singleton into PCMachineState Michael S. Tsirkin
2021-11-01 23:44 ` [PULL 6/9] hw/i386/pc: Allow instantiating a virtio-iommu device Michael S. Tsirkin
2021-11-01 23:44 ` [PULL 7/9] pci: Define pci_bus_dev_fn/pci_bus_fn/pci_bus_ret_fn Michael S. Tsirkin
2021-11-01 23:44 ` [PULL 8/9] pci: Export pci_for_each_device_under_bus*() Michael S. Tsirkin
2021-11-02 13:54   ` Matthew Rosato
2021-11-01 23:44 ` [PULL 9/9] hw/i386: fix vmmouse registration Michael S. Tsirkin
2021-11-03  1:04 ` [PULL 0/9] pc,pci,virtio: features, fixes Richard Henderson

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=20211101234358.582487-2-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=imammedo@redhat.com \
    --cc=jandryuk@gmail.com \
    --cc=pbonzinni@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).