public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
	kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 2/3] fio-tets: add DECLARE_HOSTS support
Date: Wed, 19 Nov 2025 19:15:25 -0800	[thread overview]
Message-ID: <20251120031530.1439748-3-mcgrof@kernel.org> (raw)
In-Reply-To: <20251120031530.1439748-1-mcgrof@kernel.org>

Declared hosts support enables testing on bare metal servers,
pre-provisioned VMs, or any pre-existing infrastructure with SSH access.
The fio-tests workflow can now be used with declared hosts for both
single filesystem and multi-filesystem testing scenarios. The
implementation removes the KDEVOPS_USE_DECLARED_HOSTS restriction and
extends the declared-hosts template to properly handle fio-tests
multi-filesystem sections.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 kconfigs/workflows/Kconfig                    |  1 -
 .../templates/workflows/declared-hosts.j2     | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/kconfigs/workflows/Kconfig b/kconfigs/workflows/Kconfig
index 1b583094..a1ea4944 100644
--- a/kconfigs/workflows/Kconfig
+++ b/kconfigs/workflows/Kconfig
@@ -219,7 +219,6 @@ config KDEVOPS_WORKFLOW_DEDICATE_MMTESTS
 
 config KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS
 	bool "fio-tests"
-	depends on !KDEVOPS_USE_DECLARED_HOSTS
 	select KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS
 	help
 	  This will dedicate your configuration to running only the
diff --git a/playbooks/roles/gen_hosts/templates/workflows/declared-hosts.j2 b/playbooks/roles/gen_hosts/templates/workflows/declared-hosts.j2
index 7d7975c7..f0517c45 100644
--- a/playbooks/roles/gen_hosts/templates/workflows/declared-hosts.j2
+++ b/playbooks/roles/gen_hosts/templates/workflows/declared-hosts.j2
@@ -78,6 +78,21 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
 [fio_tests:vars]
 ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
 
+{# Add per-section groups for multi-filesystem testing #}
+{% if fio_tests_multi_filesystem|default(false)|bool %}
+{% for host in parsed_hosts %}
+{% set section = host | regex_replace('^.*-fio-tests-', '') | regex_replace('-dev$', '') %}
+{% if section != host %}
+[fio_tests_{{ section | replace('-', '_') }}]
+{{ host }}
+
+[fio_tests_{{ section | replace('-', '_') }}:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+{% endif %}
+{% endfor %}
+{% endif %}
+
 {% elif kdevops_workflow_enable_fstests %}
 [fstests]
 {% for host in parsed_hosts %}
@@ -230,6 +245,32 @@ ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
 {% endfor %}
 {% endif %}
 
+{# For non-dedicated workflows (mix mode), add fio-tests group if enabled #}
+{% if kdevops_workflow_enable_fio_tests %}
+[fio_tests]
+{% for host in parsed_hosts %}
+{{ host }}
+{% endfor %}
+
+[fio_tests:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+{# Add per-section groups for multi-filesystem testing #}
+{% if fio_tests_multi_filesystem|default(false)|bool %}
+{% for host in parsed_hosts %}
+{% set section = host | regex_replace('^.*-fio-tests-', '') | regex_replace('-dev$', '') %}
+{% if section != host %}
+[fio_tests_{{ section | replace('-', '_') }}]
+{{ host }}
+
+[fio_tests_{{ section | replace('-', '_') }}:vars]
+ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
+
+{% endif %}
+{% endfor %}
+{% endif %}
+{% endif %}
+
 {% endif %}
 
 [service]
-- 
2.51.0


  parent reply	other threads:[~2025-11-20  3:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20  3:15 [PATCH 0/3] fio-test: add filesystem tests Luis Chamberlain
2025-11-20  3:15 ` [PATCH 1/3] fio-tests: add multi-filesystem testing support Luis Chamberlain
2025-11-21 20:07   ` Daniel Gomez
2025-11-25  0:35     ` Luis Chamberlain
2025-11-20  3:15 ` Luis Chamberlain [this message]
2025-11-20  3:15 ` [PATCH 3/3] fio-tests: add comprehensive filesystem testing documentation Luis Chamberlain
2025-12-06 16:36 ` [PATCH 0/3] fio-test: add filesystem tests Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251120031530.1439748-3-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cel@kernel.org \
    --cc=da.gomez@kruces.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox