From: Keith Busch <kbusch@meta.com>
To: <linux-nvme@lists.infradead.org>, <shinichiro.kawasaki@wdc.com>
Cc: Keith Busch <kbusch@kernel.org>
Subject: [PATCH blktests] nvme: test log page offsets
Date: Mon, 5 Feb 2024 10:52:25 -0800 [thread overview]
Message-ID: <20240205185225.2878642-1-kbusch@meta.com> (raw)
From: Keith Busch <kbusch@kernel.org>
I've encountered a device that fails catastrophically if the host
requests to an error log with a non-zero LPO. The fallout has been bad
enough to warrant a sanity check against this scenario.
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
tests/nvme/051 | 26 ++++++++++++++++++++++++++
tests/nvme/051.out | 2 ++
2 files changed, 28 insertions(+)
create mode 100755 tests/nvme/051
create mode 100644 tests/nvme/051.out
diff --git a/tests/nvme/051 b/tests/nvme/051
new file mode 100755
index 0000000..ef30ad8
--- /dev/null
+++ b/tests/nvme/051
@@ -0,0 +1,26 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0+
+# Copyright (C) 2024 Keith Busch
+
+. tests/nvme/rc
+
+DESCRIPTION="Tests device support for log page offsets"
+CAN_BE_ZONED=1
+QUICK=1
+
+requires() {
+ _nvme_requires
+}
+
+test_device() {
+ echo "Running ${TEST_NAME}"
+
+ lpa=$(sudo nvme id-ctrl "${TEST_DEV}" | grep lpa | cut -d":" -f 2 | xargs)
+ lpo=$((lpa & 0x4))
+
+ if [ $lpo -ne 0 ]; then
+ nvme get-log "${TEST_DEV}" --log-id=1 --log-len=128 --lpo=0x1000 > /dev/NULL
+ fi
+
+ echo "Test complete"
+}
diff --git a/tests/nvme/051.out b/tests/nvme/051.out
new file mode 100644
index 0000000..156f068
--- /dev/null
+++ b/tests/nvme/051.out
@@ -0,0 +1,2 @@
+Running nvme/051
+Test complete
--
2.34.1
next reply other threads:[~2024-02-05 18:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 18:52 Keith Busch [this message]
2024-02-05 22:30 ` [PATCH blktests] nvme: test log page offsets Chaitanya Kulkarni
2024-02-06 6:02 ` Shinichiro Kawasaki
2024-02-06 6:41 ` Keith Busch
2024-02-06 16:50 ` Keith Busch
2024-02-07 4:32 ` Shinichiro Kawasaki
2024-02-07 5:19 ` Chaitanya Kulkarni
2024-02-07 5:52 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240205185225.2878642-1-kbusch@meta.com \
--to=kbusch@meta.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=shinichiro.kawasaki@wdc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox