[Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in

Juan Quintela posted 22 patches 7 years, 2 months ago
[Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in
Posted by Juan Quintela 7 years, 2 months ago
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 4e5f47aac0..1105469daa 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -290,8 +290,9 @@ endif
 gcov-files-i386-$(CONFIG_USB_EHCI) += hw/usb/hcd-ehci.c
 gcov-files-i386-y += hw/usb/dev-hid.c
 gcov-files-i386-y += hw/usb/dev-storage.c
-check-qtest-i386-y += tests/usb-hcd-xhci-test$(EXESUF)
-gcov-files-i386-y += hw/usb/hcd-xhci.c
+check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
+gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
+gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci-nec.c
 check-qtest-i386-y += tests/cpu-plug-test$(EXESUF)
 check-qtest-i386-y += tests/q35-test$(EXESUF)
 check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
@@ -349,8 +350,8 @@ check-qtest-ppc64-$(CONFIG_USB_OHCI) += tests/usb-hcd-ohci-test$(EXESUF)
 gcov-files-ppc64-$(CONFIG_USB_OHCI) += hw/usb/hcd-ohci.c
 check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
 gcov-files-ppc64-$(CONFIG_USB_UHCI) += hw/usb/hcd-uhci.c
-check-qtest-ppc64-y += tests/usb-hcd-xhci-test$(EXESUF)
-gcov-files-ppc64-y += hw/usb/hcd-xhci.c
+check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
+gcov-files-ppc64-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
 check-qtest-ppc64-y += $(check-qtest-virtio-y)
 check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
 check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
-- 
2.17.1


Re: [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in
Posted by Thomas Huth 7 years, 2 months ago
On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  tests/Makefile.include | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 4e5f47aac0..1105469daa 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -290,8 +290,9 @@ endif
>  gcov-files-i386-$(CONFIG_USB_EHCI) += hw/usb/hcd-ehci.c
>  gcov-files-i386-y += hw/usb/dev-hid.c
>  gcov-files-i386-y += hw/usb/dev-storage.c
> -check-qtest-i386-y += tests/usb-hcd-xhci-test$(EXESUF)
> -gcov-files-i386-y += hw/usb/hcd-xhci.c
> +check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
> +gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
> +gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci-nec.c

Maybe use CONFIG_USB_XHCI_NEC for the hcd-xhci-nec.c entry instead?

>  check-qtest-i386-y += tests/cpu-plug-test$(EXESUF)
>  check-qtest-i386-y += tests/q35-test$(EXESUF)
>  check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
> @@ -349,8 +350,8 @@ check-qtest-ppc64-$(CONFIG_USB_OHCI) += tests/usb-hcd-ohci-test$(EXESUF)
>  gcov-files-ppc64-$(CONFIG_USB_OHCI) += hw/usb/hcd-ohci.c
>  check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
>  gcov-files-ppc64-$(CONFIG_USB_UHCI) += hw/usb/hcd-uhci.c
> -check-qtest-ppc64-y += tests/usb-hcd-xhci-test$(EXESUF)
> -gcov-files-ppc64-y += hw/usb/hcd-xhci.c
> +check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
> +gcov-files-ppc64-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c

Also add hcd-xhci-nec.c gcov entry here?

>  check-qtest-ppc64-y += $(check-qtest-virtio-y)
>  check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
>  check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)

 Thomas

Re: [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in
Posted by Juan Quintela 7 years, 2 months ago
Thomas Huth <thuth@redhat.com> wrote:
> On 08/08/2018 01:48 PM, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  tests/Makefile.include | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
>> 
>> diff --git a/tests/Makefile.include b/tests/Makefile.include
>> index 4e5f47aac0..1105469daa 100644
>> --- a/tests/Makefile.include
>> +++ b/tests/Makefile.include
>> @@ -290,8 +290,9 @@ endif
>>  gcov-files-i386-$(CONFIG_USB_EHCI) += hw/usb/hcd-ehci.c
>>  gcov-files-i386-y += hw/usb/dev-hid.c
>>  gcov-files-i386-y += hw/usb/dev-storage.c
>> -check-qtest-i386-y += tests/usb-hcd-xhci-test$(EXESUF)
>> -gcov-files-i386-y += hw/usb/hcd-xhci.c
>> +check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
>> +gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
>> +gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci-nec.c
>
> Maybe use CONFIG_USB_XHCI_NEC for the hcd-xhci-nec.c entry instead?

Not sure, this split looks artifitial. My read of this:


commit 0bbb2f3df1ffd9ccf7135a69a450c6929bc0b915
Author: Gerd Hoffmann <kraxel@redhat.com>
Date:   Wed May 17 12:33:12 2017 +0200

    xhci: split into multiple files
    

Is that it got split so we could add more controllers that never
happened.  I am not sure what we need to do.

>>  check-qtest-i386-y += tests/cpu-plug-test$(EXESUF)
>>  check-qtest-i386-y += tests/q35-test$(EXESUF)
>>  check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
>> @@ -349,8 +350,8 @@ check-qtest-ppc64-$(CONFIG_USB_OHCI) +=
>> tests/usb-hcd-ohci-test$(EXESUF)
>>  gcov-files-ppc64-$(CONFIG_USB_OHCI) += hw/usb/hcd-ohci.c
>>  check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
>>  gcov-files-ppc64-$(CONFIG_USB_UHCI) += hw/usb/hcd-uhci.c
>> -check-qtest-ppc64-y += tests/usb-hcd-xhci-test$(EXESUF)
>> -gcov-files-ppc64-y += hw/usb/hcd-xhci.c
>> +check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
>> +gcov-files-ppc64-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
>
> Also add hcd-xhci-nec.c gcov entry here?

I didn't want to go "further", but I think that we should have here is
something like:


check-qtest-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
gcov-files-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c

and remove the arch specific bits.  If one arch don't support it, we
know have CONFIG_USB_XHCI bits to not _enable_ it there.

What do you think?

Thanks, Juan.

Re: [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in
Posted by Thomas Huth 7 years, 2 months ago
On 08/08/2018 07:02 PM, Juan Quintela wrote:
> Thomas Huth <thuth@redhat.com> wrote:
[...]
> I didn't want to go "further", but I think that we should have here is
> something like:
> 
> check-qtest-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
> gcov-files-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
> 
> and remove the arch specific bits.  If one arch don't support it, we
> know have CONFIG_USB_XHCI bits to not _enable_ it there.
> 
> What do you think?
> 
> Thanks, Juan.

If "make check" passes with that change, that sounds like the right
solution to me, too.

 Thomas