Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@ jobs:
run: |
echo "Running simple make targets on ${{ matrix.distro_container }} environment"
make mrproper
make defconfig-fio-tests-null
make -j$(nproc)
make fio-tests

10 changes: 10 additions & 0 deletions defconfigs/fio-tests-null
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CONFIG_SKIP_BRINGUP=y
CONFIG_WORKFLOWS=y
CONFIG_WORKFLOW_LINUX_DISTRO=y
CONFIG_WORKFLOWS_TESTS=y
CONFIG_WORKFLOWS_LINUX_TESTS=y
CONFIG_WORKFLOWS_DEDICATED_WORKFLOW=y
CONFIG_KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS=y
CONFIG_KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS=y
CONFIG_FIO_TEST_BASIC=y
CONFIG_FIO_TESTS_DEVICE="/dev/null"
59 changes: 43 additions & 16 deletions kconfigs/workflows/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,18 @@ config KDEVOPS_WORKFLOW_DEDICATE_LTP
ltp workflow in separate target nodes per testing group.

config KDEVOPS_WORKFLOW_DEDICATE_NFSTEST
bool "nfstest"
select KDEVOPS_WORKFLOW_ENABLE_NFSTEST
help
This will dedicate your configuration to running only the
nfstest workflow in separate target nodes per testing group.
bool "nfstest"
select KDEVOPS_WORKFLOW_ENABLE_NFSTEST
help
This will dedicate your configuration to running only the
nfstest workflow in separate target nodes per testing group.

config KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS
bool "fio-tests"
select KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS
help
This will dedicate your configuration to running only the
fio-tests workflow.

config KDEVOPS_WORKFLOW_DEDICATE_SYSBENCH
bool "sysbench"
Expand All @@ -193,8 +200,9 @@ config KDEVOPS_WORKFLOW_NAME
default "selftests" if KDEVOPS_WORKFLOW_DEDICATE_SELFTESTS
default "gitr" if KDEVOPS_WORKFLOW_DEDICATE_GITR
default "ltp" if KDEVOPS_WORKFLOW_DEDICATE_LTP
default "nfstest" if KDEVOPS_WORKFLOW_DEDICATE_NFSTEST
default "sysbench" if KDEVOPS_WORKFLOW_DEDICATE_SYSBENCH
default "nfstest" if KDEVOPS_WORKFLOW_DEDICATE_NFSTEST
default "sysbench" if KDEVOPS_WORKFLOW_DEDICATE_SYSBENCH
default "fio-tests" if KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS

endif

Expand Down Expand Up @@ -281,12 +289,20 @@ config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_NFSTEST
single target node for by-hand testing.

config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_SYSBENCH
bool "sysbench"
select KDEVOPS_WORKFLOW_ENABLE_SYSBENCH
depends on LIBVIRT || TERRAFORM_PRIVATE_NET
help
Select this option if you want to provision sysbench on a
single target node for by-hand testing.
bool "sysbench"
select KDEVOPS_WORKFLOW_ENABLE_SYSBENCH
depends on LIBVIRT || TERRAFORM_PRIVATE_NET
help
Select this option if you want to provision sysbench on a
single target node for by-hand testing.

config KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_FIO_TESTS
bool "fio-tests"
select KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS
depends on LIBVIRT || TERRAFORM_PRIVATE_NET || SKIP_BRINGUP
help
Select this option if you want to run fio-tests on a single
target node for by-hand testing.

endif # !WORKFLOWS_DEDICATED_WORKFLOW

Expand Down Expand Up @@ -380,16 +396,27 @@ endmenu
endif # KDEVOPS_WORKFLOW_ENABLE_NFSTEST

config KDEVOPS_WORKFLOW_ENABLE_SYSBENCH
bool
output yaml
default y if KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_SYSBENCH || KDEVOPS_WORKFLOW_DEDICATE_SYSBENCH
bool
output yaml
default y if KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_SYSBENCH || KDEVOPS_WORKFLOW_DEDICATE_SYSBENCH

if KDEVOPS_WORKFLOW_ENABLE_SYSBENCH
menu "Configure and run the sysbench tests"
source "workflows/sysbench/Kconfig"
endmenu
endif # KDEVOPS_WORKFLOW_ENABLE_SYSBENCH

config KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS
bool
output yaml
default y if KDEVOPS_WORKFLOW_NOT_DEDICATED_ENABLE_FIO_TESTS || KDEVOPS_WORKFLOW_DEDICATE_FIO_TESTS

if KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS
menu "Configure and run fio-tests"
source "workflows/fio_tests/Kconfig"
endmenu
endif # KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS

config KDEVOPS_WORKFLOW_ENABLE_SSD_STEADY_STATE
bool "Attain SSD steady state prior to tests"
output yaml
Expand Down
4 changes: 4 additions & 0 deletions playbooks/fio_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- hosts: all
roles:
- role: fio_tests
7 changes: 7 additions & 0 deletions playbooks/roles/fio_tests/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fio_tests_device: "/dev/null"
fio_test_basic: false
fio_test_iobatch: false
fio_test_max_iobatch_single: false
fio_test_max_iobatch_jobs: false
fio_test_snia: false
35 changes: 35 additions & 0 deletions playbooks/roles/fio_tests/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- name: Import optional extra_args file
ansible.builtin.include_vars:
file: "{{ item }}"
with_first_found:
- files:
- "../extra_vars.yml"
- "../extra_vars.yaml"
- "../extra_vars.json"
skip: true
failed_when: false
tags: vars

- name: Install fio
become: yes
package:
name: fio
state: present
tags: ['install']

- name: Run basic fio sequential write
become: yes
command: >-
fio --name=basic-seqwrite --rw=write --filename={{ fio_tests_device }} \
--size=1M --ioengine=libaio --direct=1 --output=/tmp/basic-seqwrite.out
when: fio_test_basic | bool
tags: ['fio']

- name: Fetch fio result
ansible.builtin.fetch:
src: /tmp/basic-seqwrite.out
dest: "{{ topdir_path }}/workflows/fio_tests/results/{{ inventory_hostname }}/"
flat: yes
when: fio_test_basic | bool
tags: ['results']
1 change: 1 addition & 0 deletions playbooks/roles/gen_hosts/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ kdevops_workflow_enable_gitr: False
kdevops_workflow_enable_ltp: False
kdevops_workflow_enable_nfstest: false
kdevops_workflow_enable_sysbench: false
kdevops_workflow_enable_fio_tests: false

is_fstests: False
fstests_fstyp: "bogus"
Expand Down
24 changes: 24 additions & 0 deletions playbooks/roles/gen_hosts/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,30 @@
- kdevops_workflow_enable_sysbench
- ansible_hosts_template.stat.exists

- name: Collect enabled fio-tests targets
vars:
fio_tests_vars: "{{ vars | dict2items | selectattr('key','match','^fio_test_') }}"
fio_tests_enabled: "{{ fio_tests_vars | selectattr('value','eq',True) | map(attribute='key') | list }}"
fio_tests_nodes: "{{ fio_tests_enabled | map('regex_replace','fio_test_','') | list }}"
set_fact:
enabled_fio_tests: "{{ fio_tests_nodes }}"
when:
- kdevops_workflows_dedicated_workflow
- kdevops_workflow_enable_fio_tests

- name: Generate the Ansible hosts file for a dedicated fio-tests setup
tags: [ 'hosts' ]
template:
src: "{{ kdevops_hosts_template }}"
dest: "{{ topdir_path }}/{{ kdevops_hosts }}"
force: yes
trim_blocks: True
lstrip_blocks: True
when:
- kdevops_workflows_dedicated_workflow
- kdevops_workflow_enable_fio_tests
- ansible_hosts_template.stat.exists

- name: Verify if final host file exists
stat:
path: "{{ topdir_path }}/{{ kdevops_hosts }}"
Expand Down
23 changes: 23 additions & 0 deletions playbooks/roles/gen_hosts/templates/fio_tests.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[all]
{% for t in enabled_fio_tests %}
{{ kdevops_host_prefix }}-{{ t }}
{% if kdevops_baseline_and_dev %}
{{ kdevops_host_prefix }}-{{ t }}-dev
{% endif %}
{% endfor %}
[all:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
[baseline]
{% for t in enabled_fio_tests %}
{{ kdevops_host_prefix }}-{{ t }}
{% endfor %}
[baseline:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
[dev]
{% if kdevops_baseline_and_dev %}
{% for t in enabled_fio_tests %}
{{ kdevops_host_prefix }}-{{ t }}-dev
{% endfor %}
{% endif %}
[dev:vars]
ansible_python_interpreter = "{{ kdevops_python_interpreter }}"
4 changes: 4 additions & 0 deletions workflows/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_NFSTEST))
include workflows/nfstest/Makefile
endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_NFSTEST == y

ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS))
include workflows/fio_tests/Makefile
endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_FIO_TESTS == y

ifeq (y,$(CONFIG_KDEVOPS_WORKFLOW_ENABLE_SYSBENCH))
include workflows/sysbench/Makefile
endif # CONFIG_KDEVOPS_WORKFLOW_ENABLE_SYSBENCH == y
Expand Down
28 changes: 28 additions & 0 deletions workflows/fio_tests/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
menu "fio-tests simple workflows"

config FIO_TESTS_DEVICE
string "Device or file to use"
output yaml
default "/dev/null"

config FIO_TEST_BASIC
bool "Basic tests"
output yaml

config FIO_TEST_IOBATCH
bool "IO depth batch tests"
output yaml

config FIO_TEST_MAX_IOBATCH_SINGLE
bool "Max iodepth batch single job tests"
output yaml

config FIO_TEST_MAX_IOBATCH_JOBS
bool "Max iodepth batch jobs tests"
output yaml

config FIO_TEST_SNIA
bool "SNIA interpretation tests"
output yaml

endmenu
15 changes: 15 additions & 0 deletions workflows/fio_tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
PHONY += fio-tests fio-tests-help-menu

ifeq (y,$(CONFIG_WORKFLOWS_DEDICATED_WORKFLOW))
export KDEVOPS_HOSTS_TEMPLATE := fio_tests.j2
endif

fio-tests:
$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
-i $(KDEVOPS_HOSTFILE) playbooks/fio_tests.yml

fio-tests-help-menu:
@echo "fio-tests - Run fio-tests workflow"
@echo ""

HELP_TARGETS += fio-tests-help-menu
Loading