new file mode 100755
@@ -0,0 +1,50 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (C) 2022 Luis Chamberlain <mcgrof@kernel.org>
+#
+# This does basic optimal write test for the zone nvme character device.
+
+. tests/zbd/rc
+
+DESCRIPTION="basic optimal write using io_uring_cmd engine for zone nvme-ns character device"
+QUICK=1
+CAN_BE_ZONED=1
+
+requires() {
+ _have_fio
+}
+
+fallback_device() {
+ _fallback_null_blk_zoned
+}
+
+cleanup_fallback_device() {
+ _exit_null_blk
+}
+
+test_device() {
+ echo "Running ${TEST_NAME}"
+ local -i bs
+ declare -a fio_args
+ local ngdev=${TEST_DEV/nvme/ng}
+
+ _get_sysfs_variable "${TEST_DEV}" || return $?
+ bs=${SYSFS_VARS[$SV_PHYS_BLK_SIZE]}
+ _put_sysfs_variable
+
+ fio_args=(
+ --bs="$bs"
+ --size=1024M
+ --cmd_type=nvme
+ --filename="$ngdev"
+ ) &&
+ _run_fio_verify_iouring_cmd_write_opts_zone "${fio_args[@]}" >>"${FULL}" 2>&1 ||
+ fail=true
+
+ if [ -z "$fail" ]; then
+ echo "Test complete"
+ else
+ echo "Test failed"
+ return 1
+ fi
+}
new file mode 100644
@@ -0,0 +1,2 @@
+Running zbd/012
+Test complete
This adds a basic optimal write test using fio against a ZNS character device. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- tests/zbd/012 | 50 +++++++++++++++++++++++++++++++++++++++++++++++ tests/zbd/012.out | 2 ++ 2 files changed, 52 insertions(+) create mode 100755 tests/zbd/012 create mode 100644 tests/zbd/012.out