* [RFT] fstests: add support to dynamically skip tests
@ 2024-03-14 19:12 Luis Chamberlain
2024-03-15 14:24 ` Chuck Lever
0 siblings, 1 reply; 3+ messages in thread
From: Luis Chamberlain @ 2024-03-14 19:12 UTC (permalink / raw)
To: chuck.lever, kdevops; +Cc: Luis Chamberlain
Sometimes you just want to skip a few tests from the command line,
example use case:
make fstests-baseline SKIP_TESTS="generic/002,generic/003"
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
Please test. Works for me.
playbooks/roles/fstests/defaults/main.yml | 5 +++++
playbooks/roles/fstests/tasks/main.yml | 9 +++++++++
workflows/fstests/Makefile | 5 +++++
3 files changed, 19 insertions(+)
diff --git a/playbooks/roles/fstests/defaults/main.yml b/playbooks/roles/fstests/defaults/main.yml
index b0d9e0da1732..1d14568a03d0 100644
--- a/playbooks/roles/fstests/defaults/main.yml
+++ b/playbooks/roles/fstests/defaults/main.yml
@@ -15,6 +15,11 @@ dynamic_limit_tests:
fstests_start_after: False
fstests_start_after_test: ""
+
+fstests_skip_tests_enable: False
+fstests_skip_tests: ""
+fstests_skip_tests_args: ""
+
fstests_initial_baseline: False
fstests_initial_baseline_args: ""
diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
index b76536ecf4f6..386dc11014c8 100644
--- a/playbooks/roles/fstests/tasks/main.yml
+++ b/playbooks/roles/fstests/tasks/main.yml
@@ -895,6 +895,13 @@
- fstests_start_after|bool
tags: [ 'oscheck', 'fstests', 'run_tests', 'checktime' ]
+- name: Expand tests to skip tests dynamically passed on the command line
+ set_fact:
+ fstests_skip_tests_args: "-e {{ fstests_skip_tests }}"
+ when:
+ - fstests_skip_tests_enable|bool
+ tags: [ 'oscheck', 'fstests', 'run_tests', 'checktime' ]
+
- name: Verify use of START_AFTER
tags: [ 'oscheck', 'fstests', 'run_tests', 'kdevops_fstests_setup', 'install' , 'generate-fstests-config' ]
ansible.builtin.fail:
@@ -1077,6 +1084,7 @@
vars:
fstests_section: "{{ ansible_host | regex_replace(kdevops_host_prefix + '-') | regex_replace('-dev') | regex_replace('-', '_') }}"
initial_baseline_expunges: "{{ fstests_initial_baseline_args | trim }}"
+ skip_tests_args: "{{ fstests_skip_tests_args | trim }}"
tags: [ 'oscheck', 'fstests', 'run_tests' ]
become: yes
become_flags: 'su - -c'
@@ -1091,6 +1099,7 @@
{{ oscheck_extra_args }}
{{ all_limit_tests }}
{{ initial_baseline_expunges }}
+ {{ skip_tests_args }}
ignore_errors: yes
no_log: True
args:
diff --git a/workflows/fstests/Makefile b/workflows/fstests/Makefile
index 734c8837d302..cb09ef26f1aa 100644
--- a/workflows/fstests/Makefile
+++ b/workflows/fstests/Makefile
@@ -144,6 +144,11 @@ DYNAMIC_RUNTIME_VARS += , "fstests_start_after": True
DYNAMIC_RUNTIME_VARS += , "fstests_start_after_test": "$(START_AFTER)"
endif
+ifneq (,$(SKIP_TESTS))
+DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests_enable": True
+DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests": "$(SKIP_TESTS)"
+endif
+
ifeq (y,$(CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE))
FSTESTS_BASELINE_EXTRA += journal-ln
endif
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [RFT] fstests: add support to dynamically skip tests
2024-03-14 19:12 [RFT] fstests: add support to dynamically skip tests Luis Chamberlain
@ 2024-03-15 14:24 ` Chuck Lever
2024-03-15 18:25 ` Luis Chamberlain
0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2024-03-15 14:24 UTC (permalink / raw)
To: Luis Chamberlain; +Cc: kdevops
On Thu, Mar 14, 2024 at 12:12:46PM -0700, Luis Chamberlain wrote:
> Sometimes you just want to skip a few tests from the command line,
> example use case:
>
> make fstests-baseline SKIP_TESTS="generic/002,generic/003"
>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> ---
>
> Please test. Works for me.
This works very nicely.
Tested-by: Chuck Lever <chuck.lever@oracle.com>
> playbooks/roles/fstests/defaults/main.yml | 5 +++++
> playbooks/roles/fstests/tasks/main.yml | 9 +++++++++
> workflows/fstests/Makefile | 5 +++++
> 3 files changed, 19 insertions(+)
>
> diff --git a/playbooks/roles/fstests/defaults/main.yml b/playbooks/roles/fstests/defaults/main.yml
> index b0d9e0da1732..1d14568a03d0 100644
> --- a/playbooks/roles/fstests/defaults/main.yml
> +++ b/playbooks/roles/fstests/defaults/main.yml
> @@ -15,6 +15,11 @@ dynamic_limit_tests:
>
> fstests_start_after: False
> fstests_start_after_test: ""
> +
> +fstests_skip_tests_enable: False
> +fstests_skip_tests: ""
> +fstests_skip_tests_args: ""
> +
> fstests_initial_baseline: False
> fstests_initial_baseline_args: ""
>
> diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
> index b76536ecf4f6..386dc11014c8 100644
> --- a/playbooks/roles/fstests/tasks/main.yml
> +++ b/playbooks/roles/fstests/tasks/main.yml
> @@ -895,6 +895,13 @@
> - fstests_start_after|bool
> tags: [ 'oscheck', 'fstests', 'run_tests', 'checktime' ]
>
> +- name: Expand tests to skip tests dynamically passed on the command line
> + set_fact:
> + fstests_skip_tests_args: "-e {{ fstests_skip_tests }}"
> + when:
> + - fstests_skip_tests_enable|bool
> + tags: [ 'oscheck', 'fstests', 'run_tests', 'checktime' ]
> +
> - name: Verify use of START_AFTER
> tags: [ 'oscheck', 'fstests', 'run_tests', 'kdevops_fstests_setup', 'install' , 'generate-fstests-config' ]
> ansible.builtin.fail:
> @@ -1077,6 +1084,7 @@
> vars:
> fstests_section: "{{ ansible_host | regex_replace(kdevops_host_prefix + '-') | regex_replace('-dev') | regex_replace('-', '_') }}"
> initial_baseline_expunges: "{{ fstests_initial_baseline_args | trim }}"
> + skip_tests_args: "{{ fstests_skip_tests_args | trim }}"
> tags: [ 'oscheck', 'fstests', 'run_tests' ]
> become: yes
> become_flags: 'su - -c'
> @@ -1091,6 +1099,7 @@
> {{ oscheck_extra_args }}
> {{ all_limit_tests }}
> {{ initial_baseline_expunges }}
> + {{ skip_tests_args }}
> ignore_errors: yes
> no_log: True
> args:
> diff --git a/workflows/fstests/Makefile b/workflows/fstests/Makefile
> index 734c8837d302..cb09ef26f1aa 100644
> --- a/workflows/fstests/Makefile
> +++ b/workflows/fstests/Makefile
> @@ -144,6 +144,11 @@ DYNAMIC_RUNTIME_VARS += , "fstests_start_after": True
> DYNAMIC_RUNTIME_VARS += , "fstests_start_after_test": "$(START_AFTER)"
> endif
>
> +ifneq (,$(SKIP_TESTS))
> +DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests_enable": True
> +DYNAMIC_RUNTIME_VARS += , "fstests_skip_tests": "$(SKIP_TESTS)"
> +endif
> +
> ifeq (y,$(CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE))
> FSTESTS_BASELINE_EXTRA += journal-ln
> endif
> --
> 2.43.0
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFT] fstests: add support to dynamically skip tests
2024-03-15 14:24 ` Chuck Lever
@ 2024-03-15 18:25 ` Luis Chamberlain
0 siblings, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2024-03-15 18:25 UTC (permalink / raw)
To: Chuck Lever; +Cc: kdevops
On Fri, Mar 15, 2024 at 10:24:16AM -0400, Chuck Lever wrote:
> On Thu, Mar 14, 2024 at 12:12:46PM -0700, Luis Chamberlain wrote:
> > Sometimes you just want to skip a few tests from the command line,
> > example use case:
> >
> > make fstests-baseline SKIP_TESTS="generic/002,generic/003"
> >
> > Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> > ---
> >
> > Please test. Works for me.
>
> This works very nicely.
>
> Tested-by: Chuck Lever <chuck.lever@oracle.com>
Merged.
Luis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-15 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-14 19:12 [RFT] fstests: add support to dynamically skip tests Luis Chamberlain
2024-03-15 14:24 ` Chuck Lever
2024-03-15 18:25 ` Luis Chamberlain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox