[PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices'

Bin Meng posted 51 patches 3 years, 5 months ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Stefan Berger <stefanb@linux.vnet.ibm.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Greg Kurz <groug@kaod.org>, Christian Schoenebeck <qemu_oss@crudebyte.com>, "Cédric Le Goater" <clg@kaod.org>, Daniel Henrique Barboza <danielhb413@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, Gerd Hoffmann <kraxel@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Michael Roth <michael.roth@amd.com>, Konstantin Kostiuk <kkostiuk@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, John Snow <jsnow@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Andrew Jeffery <andrew@aj.id.au>, Joel Stanley <joel@jms.id.au>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <ani@anisinha.ca>, Alexander Bulekov <alxndr@bu.edu>, Bandan Das <bsd@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Darren Kenny <darren.kenny@oracle.com>, Qiuhao Li <Qiuhao.Li@outlook.com>, Havard Skinnemoen <hskinnemoen@google.com>, Tyrone Ting <kfting@nuvoton.com>, Markus Armbruster <armbru@redhat.com>, Coiby Xu <Coiby.Xu@gmail.com>, Jason Wang <jasowang@redhat.com>, Fam Zheng <fam@euphon.net>
There is a newer version of this series
[PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices'
Posted by Bin Meng 3 years, 5 months ago
From: Bin Meng <bin.meng@windriver.com>

When QEMU is configured with '--without-default-devices', we should
not build and run iotests and qtest because devices used by these
test cases are not built in.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
---

 tests/qemu-iotests/meson.build | 5 +++++
 tests/qtest/meson.build        | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
index 323a4acb6a..38d9a874d2 100644
--- a/tests/qemu-iotests/meson.build
+++ b/tests/qemu-iotests/meson.build
@@ -2,6 +2,11 @@ if not have_tools or targetos == 'windows' or get_option('gprof')
   subdir_done()
 endif
 
+# Skip iotests if configured without a default selection of devices
+if not get_option('default_devices')
+  subdir_done()
+endif
+
 foreach cflag: config_host['QEMU_CFLAGS'].split()
   if cflag.startswith('-fsanitize') and \
      not cflag.contains('safe-stack') and not cflag.contains('cfi-icall')
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index c97da5a062..0291b3966c 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -4,6 +4,11 @@ if not config_host.has_key('CONFIG_POSIX')
   subdir_done()
 endif
 
+# Skip QTests if configured without a default selection of devices
+if not get_option('default_devices')
+  subdir_done()
+endif
+
 slow_qtests = {
   'ahci-test' : 60,
   'bios-tables-test' : 120,
-- 
2.34.1
Re: [PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices'
Posted by Thomas Huth 3 years, 5 months ago
On 24/08/2022 11.40, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
> 
> When QEMU is configured with '--without-default-devices', we should
> not build and run iotests and qtest because devices used by these
> test cases are not built in.
> 
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
> 
>   tests/qemu-iotests/meson.build | 5 +++++
>   tests/qtest/meson.build        | 5 +++++
>   2 files changed, 10 insertions(+)
> 
> diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
> index 323a4acb6a..38d9a874d2 100644
> --- a/tests/qemu-iotests/meson.build
> +++ b/tests/qemu-iotests/meson.build
> @@ -2,6 +2,11 @@ if not have_tools or targetos == 'windows' or get_option('gprof')
>     subdir_done()
>   endif
>   
> +# Skip iotests if configured without a default selection of devices
> +if not get_option('default_devices')
> +  subdir_done()
> +endif
> +
>   foreach cflag: config_host['QEMU_CFLAGS'].split()
>     if cflag.startswith('-fsanitize') and \
>        not cflag.contains('safe-stack') and not cflag.contains('cfi-icall')
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index c97da5a062..0291b3966c 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -4,6 +4,11 @@ if not config_host.has_key('CONFIG_POSIX')
>     subdir_done()
>   endif
>   
> +# Skip QTests if configured without a default selection of devices
> +if not get_option('default_devices')
> +  subdir_done()
> +endif
> +
>   slow_qtests = {
>     'ahci-test' : 60,
>     'bios-tables-test' : 120,

That's a very big hammer already ... I'd prefer if we could work on the 
tests instead to adapt for the availability of devices instead (we've done 
quite a lot of work in this area in the past already, but apparently still 
not enough yet ...)

  Thomas
Re: [PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices'
Posted by Bin Meng 3 years, 5 months ago
On Thu, Aug 25, 2022 at 8:04 PM Thomas Huth <thuth@redhat.com> wrote:
>
> On 24/08/2022 11.40, Bin Meng wrote:
> > From: Bin Meng <bin.meng@windriver.com>
> >
> > When QEMU is configured with '--without-default-devices', we should
> > not build and run iotests and qtest because devices used by these
> > test cases are not built in.
> >
> > Signed-off-by: Bin Meng <bin.meng@windriver.com>
> > ---
> >
> >   tests/qemu-iotests/meson.build | 5 +++++
> >   tests/qtest/meson.build        | 5 +++++
> >   2 files changed, 10 insertions(+)
> >
> > diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
> > index 323a4acb6a..38d9a874d2 100644
> > --- a/tests/qemu-iotests/meson.build
> > +++ b/tests/qemu-iotests/meson.build
> > @@ -2,6 +2,11 @@ if not have_tools or targetos == 'windows' or get_option('gprof')
> >     subdir_done()
> >   endif
> >
> > +# Skip iotests if configured without a default selection of devices
> > +if not get_option('default_devices')
> > +  subdir_done()
> > +endif
> > +
> >   foreach cflag: config_host['QEMU_CFLAGS'].split()
> >     if cflag.startswith('-fsanitize') and \
> >        not cflag.contains('safe-stack') and not cflag.contains('cfi-icall')
> > diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> > index c97da5a062..0291b3966c 100644
> > --- a/tests/qtest/meson.build
> > +++ b/tests/qtest/meson.build
> > @@ -4,6 +4,11 @@ if not config_host.has_key('CONFIG_POSIX')
> >     subdir_done()
> >   endif
> >
> > +# Skip QTests if configured without a default selection of devices
> > +if not get_option('default_devices')
> > +  subdir_done()
> > +endif
> > +
> >   slow_qtests = {
> >     'ahci-test' : 60,
> >     'bios-tables-test' : 120,
>
> That's a very big hammer already ... I'd prefer if we could work on the
> tests instead to adapt for the availability of devices instead (we've done
> quite a lot of work in this area in the past already, but apparently still
> not enough yet ...)

Adapting tests for the availability of devices is a large scope. I may
not have time to work on this.

I will have to drop this patch in v2, and adjust the patches in the
series to keep bisectability then.

Regards,
Bin