* [PATCH v2] qtest: fix 'expression is always false' build failure in qtest_has_accel()
@ 2021-10-27 15:10 Igor Mammedov
2021-10-27 15:26 ` Jason Andryuk
0 siblings, 1 reply; 2+ messages in thread
From: Igor Mammedov @ 2021-10-27 15:10 UTC (permalink / raw)
To: qemu-devel; +Cc: lvivier, thuth, Jason Andryuk, mst
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>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 2c5b53cbe2..ff85e9c2af 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
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] qtest: fix 'expression is always false' build failure in qtest_has_accel()
2021-10-27 15:10 [PATCH v2] qtest: fix 'expression is always false' build failure in qtest_has_accel() Igor Mammedov
@ 2021-10-27 15:26 ` Jason Andryuk
0 siblings, 0 replies; 2+ messages in thread
From: Jason Andryuk @ 2021-10-27 15:26 UTC (permalink / raw)
To: Igor Mammedov; +Cc: Laurent Vivier, Thomas Huth, QEMU, Michael S. Tsirkin
On Wed, Oct 27, 2021 at 11:10 AM Igor Mammedov <imammedo@redhat.com> wrote:
>
> 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>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Thanks,
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-27 15:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-27 15:10 [PATCH v2] qtest: fix 'expression is always false' build failure in qtest_has_accel() Igor Mammedov
2021-10-27 15:26 ` Jason Andryuk
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).