[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] qtest: fix 'expression is always false' build failure in
From: |
Jason Andryuk |
Subject: |
Re: [PATCH v2] qtest: fix 'expression is always false' build failure in qtest_has_accel() |
Date: |
Wed, 27 Oct 2021 11:26:09 -0400 |
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