[PATCH] tests: tag slow tests with 'slow' suite for easy filtering

marcandre.lureau@redhat.com posted 1 patch 2 weeks, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260512065633.3542562-1-marcandre.lureau@redhat.com
Maintainers: Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/meson.build | 3 ++-
tests/unit/meson.build  | 9 ++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
[PATCH] tests: tag slow tests with 'slow' suite for easy filtering
Posted by marcandre.lureau@redhat.com 2 weeks, 4 days ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Add several RCU and thread-pool unit tests to the slow_tests dict,
and tag all slow tests (both qtest and unit) with a 'slow' suite so
they can be excluded or selected via meson test --suite/--no-suite.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/qtest/meson.build | 3 ++-
 tests/unit/meson.build  | 9 ++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 728dde54b3f..2c5dcf2340f 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -493,6 +493,7 @@ foreach dir : target_dirs
          protocol: 'tap',
          timeout: slow_qtests.get(test, 60),
          priority: slow_qtests.get(test, 60),
-         suite: ['qtest', 'qtest-' + target_base])
+         suite: ['qtest', 'qtest-' + target_base] +
+                (slow_qtests.has_key(test) ? ['slow'] : []))
   endforeach
 endforeach
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 03d36748c73..ed1172a107c 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -176,6 +176,12 @@ slow_tests = {
   'test-crypto-tlscredsx509': 90,
   'test-crypto-tlssession': 90,
   'test-replication': 60,
+  'rcutorture': 30,
+  'test-rcu-list': 30,
+  'test-rcu-simpleq': 30,
+  'test-rcu-tailq': 30,
+  'test-rcu-slist': 30,
+  'test-thread-pool': 30,
 }
 
 foreach test_name, extra: tests
@@ -197,5 +203,6 @@ foreach test_name, extra: tests
        protocol: 'tap',
        timeout: slow_tests.get(test_name, 30),
        priority: slow_tests.get(test_name, 30),
-       suite: ['unit'])
+       suite: ['unit'] +
+              (slow_tests.has_key(test_name) ? ['slow'] : []))
 endforeach
-- 
2.54.0


Re: [PATCH] tests: tag slow tests with 'slow' suite for easy filtering
Posted by Fabiano Rosas 2 weeks, 3 days ago
marcandre.lureau@redhat.com writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Add several RCU and thread-pool unit tests to the slow_tests dict,
> and tag all slow tests (both qtest and unit) with a 'slow' suite so
> they can be excluded or selected via meson test --suite/--no-suite.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  tests/qtest/meson.build | 3 ++-
>  tests/unit/meson.build  | 9 ++++++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index 728dde54b3f..2c5dcf2340f 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -493,6 +493,7 @@ foreach dir : target_dirs
>           protocol: 'tap',
>           timeout: slow_qtests.get(test, 60),
>           priority: slow_qtests.get(test, 60),
> -         suite: ['qtest', 'qtest-' + target_base])
> +         suite: ['qtest', 'qtest-' + target_base] +
> +                (slow_qtests.has_key(test) ? ['slow'] : []))

The change looks ok. 

Acked-by: Fabiano Rosas <farosas@suse.de>

And I'll not rant about meson output.

qtest+qtest-s390x+slow - qemu:qtest-s390x/device-introspect-test
^1x   ^2x   ^            ^why ^3x   ^

>    endforeach
>  endforeach
> diff --git a/tests/unit/meson.build b/tests/unit/meson.build
> index 03d36748c73..ed1172a107c 100644
> --- a/tests/unit/meson.build
> +++ b/tests/unit/meson.build
> @@ -176,6 +176,12 @@ slow_tests = {
>    'test-crypto-tlscredsx509': 90,
>    'test-crypto-tlssession': 90,
>    'test-replication': 60,
> +  'rcutorture': 30,
> +  'test-rcu-list': 30,
> +  'test-rcu-simpleq': 30,
> +  'test-rcu-tailq': 30,
> +  'test-rcu-slist': 30,
> +  'test-thread-pool': 30,
>  }
>  
>  foreach test_name, extra: tests
> @@ -197,5 +203,6 @@ foreach test_name, extra: tests
>         protocol: 'tap',
>         timeout: slow_tests.get(test_name, 30),
>         priority: slow_tests.get(test_name, 30),
> -       suite: ['unit'])
> +       suite: ['unit'] +
> +              (slow_tests.has_key(test_name) ? ['slow'] : []))
>  endforeach