[PATCH blktests v2 2/2] nvme/047: add test for uring-passthrough
Sagi Grimberg
sagi at grimberg.me
Mon Apr 3 06:39:57 PDT 2023
> User can communicate to NVMe char device (/dev/ngXnY) using the
> uring-passthrough interface. This test exercises some of these
> communication pathways, using the 'io_uring_cmd' ioengine of fio.
>
> Signed-off-by: Kanchan Joshi <joshi.k at samsung.com>
> ---
> tests/nvme/047 | 43 +++++++++++++++++++++++++++++++++++++++++++
> tests/nvme/047.out | 2 ++
> 2 files changed, 45 insertions(+)
> create mode 100755 tests/nvme/047
> create mode 100644 tests/nvme/047.out
>
> diff --git a/tests/nvme/047 b/tests/nvme/047
> new file mode 100755
> index 0000000..ea9b001
> --- /dev/null
> +++ b/tests/nvme/047
> @@ -0,0 +1,43 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-3.0+
> +# Copyright (C) 2023 Kanchan Joshi, Samsung Electronics
> +# Test exercising uring passthrough IO on nvme char device
> +
> +. tests/nvme/rc
> +
> +DESCRIPTION="basic test for uring-passthrough I/O on /dev/ngX"
> +QUICK=1
> +
> +requires() {
> + _nvme_requires
> + _have_kver 6 1
> + _have_fio_ver 3 33
> +}
> +
> +test_device() {
> + echo "Running ${TEST_NAME}"
> + local ngdev=${TEST_DEV/nvme/ng}
> + local common_args=(
> + --size=1M
> + --filename="$ngdev"
> + --bs=4k
> + --rw=randread
Maybe while you're at it expand a bit to:
--rw=randrw
--bsrange=512-128k,512-128k
> + --numjobs=1
> + --iodepth=16
> + --name=randread
> + --ioengine=io_uring_cmd
> + --cmd_type=nvme
> + --time_based
> + --runtime=2
> + )
> + #plain read test
> + _run_fio "${common_args[@]}"
> +
> + #read with iopoll
> + _run_fio "${common_args[@]}" --hipri
> +
> + #read with fixedbufs
> + _run_fio "${common_args[@]}" --fixedbufs
> +
> + echo "Test complete"
> +}
> diff --git a/tests/nvme/047.out b/tests/nvme/047.out
> new file mode 100644
> index 0000000..915d0a2
> --- /dev/null
> +++ b/tests/nvme/047.out
> @@ -0,0 +1,2 @@
> +Running nvme/047
> +Test complete
More information about the Linux-nvme
mailing list