[Qemu-devel] [PATCH v3 02/10] check: Use land/lor when possible

Juan Quintela posted 10 patches 7 years, 2 months ago
[Qemu-devel] [PATCH v3 02/10] check: Use land/lor when possible
Posted by Juan Quintela 7 years, 2 months ago
So everythig is (a bit) more consistent

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 6dc8d06f4c..a705793381 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -98,11 +98,9 @@ check-unit-y += tests/test-block-backend$(EXESUF)
 check-unit-y += tests/test-x86-cpuid$(EXESUF)
 # all code tested by test-x86-cpuid is inside topology.h
 gcov-files-test-x86-cpuid-y =
-ifeq ($(CONFIG_SOFTMMU),y)
-check-unit-y += tests/test-xbzrle$(EXESUF)
-gcov-files-test-xbzrle-y = migration/xbzrle.c
-check-unit-$(CONFIG_POSIX) += tests/test-vmstate$(EXESUF)
-endif
+check-unit-$(CONFIG_SOFTMMU) += tests/test-xbzrle$(EXESUF)
+gcov-files-test-xbzrle-$(CONFIG_SOFTMMU) = migration/xbzrle.c
+check-unit-$(call land, $(CONFIG_SOFTMMU), $(CONFIG_POSIX)) += tests/test-vmstate$(EXESUF)
 check-unit-y += tests/test-cutils$(EXESUF)
 gcov-files-test-cutils-y += util/cutils.c
 check-unit-y += tests/test-shift128$(EXESUF)
@@ -299,9 +297,7 @@ check-qtest-i386-y += tests/q35-test$(EXESUF)
 check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
 gcov-files-i386-y += hw/pci-host/q35.c
 check-qtest-i386-$(CONFIG_VHOST_USER_NET_TEST_i386) += tests/vhost-user-test$(EXESUF)
-ifeq ($(CONFIG_VHOST_USER_NET_TEST_i386),)
-check-qtest-x86_64-$(CONFIG_VHOST_USER_NET_TEST_x86_64) += tests/vhost-user-test$(EXESUF)
-endif
+check-qtest-x86_64-$(call lor, $(CONFIG_VHOST_USER_NET_TEST_i386), $(CONFIG_VHOST_USER_NET_TEST_x86_64)) += tests/vhost-user-test$(EXESUF)
 check-qtest-i386-$(CONFIG_TPM_CRB) += tests/tpm-crb-swtpm-test$(EXESUF)
 check-qtest-i386-$(CONFIG_TPM_CRB) += tests/tpm-crb-test$(EXESUF)
 check-qtest-i386-$(CONFIG_TPM_TIS) += tests/tpm-tis-swtpm-test$(EXESUF)
-- 
2.17.1


Re: [Qemu-devel] [PATCH v3 02/10] check: Use land/lor when possible
Posted by Thomas Huth 7 years, 2 months ago
On 2018-08-22 11:54, Juan Quintela wrote:
> So everythig is (a bit) more consistent
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  tests/Makefile.include | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
[...]
> @@ -299,9 +297,7 @@ check-qtest-i386-y += tests/q35-test$(EXESUF)
>  check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
>  gcov-files-i386-y += hw/pci-host/q35.c
>  check-qtest-i386-$(CONFIG_VHOST_USER_NET_TEST_i386) += tests/vhost-user-test$(EXESUF)
> -ifeq ($(CONFIG_VHOST_USER_NET_TEST_i386),)
> -check-qtest-x86_64-$(CONFIG_VHOST_USER_NET_TEST_x86_64) += tests/vhost-user-test$(EXESUF)
> -endif
> +check-qtest-x86_64-$(call lor, $(CONFIG_VHOST_USER_NET_TEST_i386), $(CONFIG_VHOST_USER_NET_TEST_x86_64)) += tests/vhost-user-test$(EXESUF)

I think that is the wrong condition. It's rather "!i386 AND x86_64" that
you have to test here. Since that line will get incredibly long with the
$(call ...) expressions, I'd suggest to rather drop this hunk, I think
it's more readable the way it is.

 Thomas

Re: [Qemu-devel] [PATCH v3 02/10] check: Use land/lor when possible
Posted by Juan Quintela 7 years, 2 months ago
Thomas Huth <thuth@redhat.com> wrote:
> On 2018-08-22 11:54, Juan Quintela wrote:
>> So everythig is (a bit) more consistent
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  tests/Makefile.include | 12 ++++--------
>>  1 file changed, 4 insertions(+), 8 deletions(-)
> [...]
>> @@ -299,9 +297,7 @@ check-qtest-i386-y += tests/q35-test$(EXESUF)
>>  check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
>>  gcov-files-i386-y += hw/pci-host/q35.c
>>  check-qtest-i386-$(CONFIG_VHOST_USER_NET_TEST_i386) +=
>> tests/vhost-user-test$(EXESUF)
>> -ifeq ($(CONFIG_VHOST_USER_NET_TEST_i386),)
>> -check-qtest-x86_64-$(CONFIG_VHOST_USER_NET_TEST_x86_64) +=
>> tests/vhost-user-test$(EXESUF)
>> -endif
>> +check-qtest-x86_64-$(call lor, $(CONFIG_VHOST_USER_NET_TEST_i386),
>> $(CONFIG_VHOST_USER_NET_TEST_x86_64)) +=
>> tests/vhost-user-test$(EXESUF)
>
> I think that is the wrong condition. It's rather "!i386 AND x86_64" that
> you have to test here. Since that line will get incredibly long with the
> $(call ...) expressions, I'd suggest to rather drop this hunk, I think
> it's more readable the way it is.

Dropped.

Anyways, the propper fix is to change how vhost is configured at all.
The bits in configure are "interesting" to say the less.

Later, Juan.