diff --git a/src/cijoe/fio/configs/example_config_benchmark.toml b/src/cijoe/fio/configs/example_config_benchmark.toml deleted file mode 100644 index 0f5e6267..00000000 --- a/src/cijoe/fio/configs/example_config_benchmark.toml +++ /dev/null @@ -1,24 +0,0 @@ -# Declaration of where fio is located on the test-target and which IO-engines it -# has available -[fio] -bin = "{{ local.env.HOME }}/opt/fio/bin/fio" - -[fio.engines.libaio] -type = "builtin" - -[fio.engines.io_uring] -type = "builtin" - -[fio.engines.io_uring_cmd] -type = "builtin" - -[fio.engines.xnvme] -type = "builtin" - -[fio.engines.spdk_nvme] -path = "/opt/aux/spdk_nvme" -type = "external_preload" - -[fio.engines.spdk_bdev] -path = "/opt/aux/spdk_bdev" -type = "external_preload" diff --git a/src/cijoe/fio/scripts/check.py b/src/cijoe/fio/scripts/check.py index 5f6f0f58..2ee5d6a4 100644 --- a/src/cijoe/fio/scripts/check.py +++ b/src/cijoe/fio/scripts/check.py @@ -9,12 +9,17 @@ Retargetable: True ------------------ """ -from cijoe.fio.wrapper import fio +import logging as log def main(args, cijoe, step): """Check version of fio""" - err, _ = fio(cijoe, "--help") + fio_bin = cijoe.getconf("fio.bin") + if not fio_bin: + log.error("missing config: fio.bin") + return 1 + + err, _ = cijoe.run(f"{fio_bin} --version") return err diff --git a/src/cijoe/fio/wrapper.py b/src/cijoe/fio/wrapper.py deleted file mode 100644 index 1d90eea6..00000000 --- a/src/cijoe/fio/wrapper.py +++ /dev/null @@ -1,41 +0,0 @@ -""" - fio-wrapper - =========== - - The intent is to be able to do tie fio into testing infra and to have a means of - ensuring that "benchmark" can be performed in a reproducible manner. - - It does so by constructing an transforming a dictionary of parameters and - environment variables. This is done via: - - * fio(cijoe, parameters="", env={}): invoke fio as defined in cijoe.config.options - - Then **chaining** of the parameter construction is done, such that it is possible to - control certain job-parameters depending on the device, I/O engine, and I/O engine - options. - For example, we might wish to run fio with ``--direct=1``, however, when sending - that same job to e.g. ``/dev/ng0n1`` (the char-device encapsulating an NVMe - namespace), then ``--direct=1`` is invalid. - Such a transformation is then done when seeing that the device is an NVMe chardev. - - config - ------ - - fio.bin - - fio.engines - - retargtable: true - ----------------- -""" - - -def fio(cijoe, parameters="", env={}): - """ - Invoke 'fio' using binary at `'cijoe.config.options.fio.bin`', with the given - parameters and environment variables (``env``) - - @returns err, state - """ - - return cijoe.run(f"{cijoe.config.options['fio']['bin']} {parameters}", env=env) diff --git a/tests/fio/test_fio_wrapper.py b/tests/fio/test_fio_wrapper.py deleted file mode 100644 index 3749baa0..00000000 --- a/tests/fio/test_fio_wrapper.py +++ /dev/null @@ -1,36 +0,0 @@ -import pytest - -import cijoe.fio.wrapper as fio -import cijoe.linux.null_blk as null_blk - - -def skip_when_config_has_no_remote(cijoe): - """Skip testing when configuration is module not enabled""" - - transport = cijoe.config.options.get("cijoe", {}).get("transport", None) - if not transport: - pytest.skip(reason="skipping as there is no remote transport defined") - - -def test_run(cijoe): - skip_when_config_has_no_remote(cijoe) - - err, _ = null_blk.insert(cijoe) - assert not err - - err, _ = fio.run( - cijoe, - [ - "--filename", - "/dev/nullb0", - "--bs", - "4k", - "--rw", - "randread", - "--size", - "1G", - "--name", - "foo42", - ], - ) - assert not err