[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/9] qtest: fix 'expression is always false' build failure in qtes
From: |
Michael S. Tsirkin |
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 |
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
- [PULL 0/9] pc,pci,virtio: features, fixes, Michael S. Tsirkin, 2021/11/01
- [PULL 1/9] qtest: fix 'expression is always false' build failure in qtest_has_accel(),
Michael S. Tsirkin <=
- [PULL 2/9] vhost-vdpa: Set discarding of RAM broken when initializing the backend, Michael S. Tsirkin, 2021/11/01
- [PULL 3/9] hw/acpi: Add VIOT table, Michael S. Tsirkin, 2021/11/01
- [PULL 4/9] hw/i386/pc: Remove x86_iommu_get_type(), Michael S. Tsirkin, 2021/11/01
- [PULL 6/9] hw/i386/pc: Allow instantiating a virtio-iommu device, Michael S. Tsirkin, 2021/11/01
- [PULL 5/9] hw/i386/pc: Move IOMMU singleton into PCMachineState, Michael S. Tsirkin, 2021/11/01
- [PULL 7/9] pci: Define pci_bus_dev_fn/pci_bus_fn/pci_bus_ret_fn, Michael S. Tsirkin, 2021/11/01
- [PULL 8/9] pci: Export pci_for_each_device_under_bus*(), Michael S. Tsirkin, 2021/11/01
- [PULL 9/9] hw/i386: fix vmmouse registration, Michael S. Tsirkin, 2021/11/01
- Re: [PULL 0/9] pc,pci,virtio: features, fixes, Richard Henderson, 2021/11/02