Re: [PATCH 2/6] tests/nvme: add new test for rand-read on the nvme character device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 21, 2022 at 02:34:37AM -0800, Luis Chamberlain wrote:
This does basic rand-read testing of the character device of a
conventional NVMe drive.

Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
---
tests/nvme/046     | 42 ++++++++++++++++++++++++++++++++++++++++++
tests/nvme/046.out |  2 ++
2 files changed, 44 insertions(+)
create mode 100755 tests/nvme/046
create mode 100644 tests/nvme/046.out

diff --git a/tests/nvme/046 b/tests/nvme/046
new file mode 100755
index 000000000000..3526ab9eedab
--- /dev/null
+++ b/tests/nvme/046
@@ -0,0 +1,42 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (C) 2022 Luis Chamberlain <mcgrof@xxxxxxxxxx>
+#
+# This does basic sanity test for the nvme character device. This is a basic
+# test and if it fails it is probably very likely other nvme character device
+# tests would fail.
+#
+. tests/nvme/rc
+
+DESCRIPTION="basic rand-read io_uring_cmd engine for nvme-ns character device"
+QUICK=1
+
+requires() {
+	_nvme_requires
+	_have_fio
+}
+
+device_requires() {
+	_require_test_dev_is_nvme
+}
+
+test_device() {
+	echo "Running ${TEST_NAME}"
+	local ngdev=${TEST_DEV/nvme/ng}
+	local fio_args=(
+		--size=1M
+		--cmd_type=nvme
+		--filename="$ngdev"
+		--time_based
+		--runtime=10
+	) &&

Is this && needed?

+	_run_fio_rand_iouring_cmd "${fio_args[@]}" >>"${FULL}" 2>&1 ||

Something to change here (and therefore in other patches too).
If we change "cmd_type = something_random", test continues to show the
success while it should show failure.

How about changing above line to:
_run_fio_rand_iouring_cmd "${fio_args[@]}" || fail=true

And thanks for the series.






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux