* [PATCH blktests 0/3] misc fixes
@ 2026-02-23 7:41 Shin'ichiro Kawasaki
2026-02-23 7:41 ` [PATCH blktests 1/3] common/nvme: do not call 'nvme id-ns' to non-nvme devices Shin'ichiro Kawasaki
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-02-23 7:41 UTC (permalink / raw)
To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki
These are miscellaneous fixes. They are not critical but worth fixing.
Shin'ichiro Kawasaki (3):
common/nvme: do not call 'nvme id-ns' to non-nvme devices
check: increment bash requirement version from 4.2 to 4.3
src: add nvme-passthru-admin-uring to .gitignore
README.md | 2 +-
check | 6 +++---
common/nvme | 10 +++++++---
src/.gitignore | 1 +
4 files changed, 12 insertions(+), 7 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH blktests 1/3] common/nvme: do not call 'nvme id-ns' to non-nvme devices
2026-02-23 7:41 [PATCH blktests 0/3] misc fixes Shin'ichiro Kawasaki
@ 2026-02-23 7:41 ` Shin'ichiro Kawasaki
2026-02-26 5:38 ` Chaitanya Kulkarni
2026-02-23 7:41 ` [PATCH blktests 2/3] check: increment bash requirement version from 4.2 to 4.3 Shin'ichiro Kawasaki
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-02-23 7:41 UTC (permalink / raw)
To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki
The test case block/041 tests PI metadata capability in the block layer.
At this moment, nvme is the only one block device that supports the
capability. To check that the test target nvme devices fulfills the
requirement, the test case calls 'nvme ns-id' command via
_test_dev_disable_extended_lba(). However, since the test case is in
the block group, TEST_DEVS can specify non-nvme devices. Even though the
test case is skipped by _require_test_dev_is_nvme() check, the
'nvme ns-id' is called for the non-nvme device and fails. It spits out
unnecessary error messages.
To avoid the error message, check if the test device is nvme before
calling 'nvme ns-id'. For the check, factor out a helper function
_test_dev_is_nvme(). While at it, replace short command options -q and
-f with long options --quiet and --canonicalize for readability.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
common/nvme | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/common/nvme b/common/nvme
index a419cd3..bb4896a 100644
--- a/common/nvme
+++ b/common/nvme
@@ -1121,8 +1121,12 @@ _nvmet_target_cleanup() {
fi
}
+_test_dev_is_nvme() {
+ readlink --canonicalize "$TEST_DEV_SYSFS/device" | grep --quiet nvme
+}
+
_require_test_dev_is_nvme() {
- if ! readlink -f "$TEST_DEV_SYSFS/device" | grep -q nvme; then
+ if ! _test_dev_is_nvme; then
SKIP_REASONS+=("$TEST_DEV is not a NVMe device")
return 1
fi
@@ -1150,8 +1154,8 @@ _test_dev_has_no_metadata() {
_test_dev_disables_extended_lba() {
local flbas
- if ! flbas=$(nvme id-ns "$TEST_DEV" | grep flbas | \
- sed --quiet 's/.*: \(.*\)/\1/p'); then
+ if ! _test_dev_is_nvme || ! flbas=$(nvme id-ns "$TEST_DEV" | \
+ grep flbas | sed --quiet 's/.*: \(.*\)/\1/p'); then
SKIP_REASONS+=("$TEST_DEV does not have namespace flbas field")
return 1
fi
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH blktests 2/3] check: increment bash requirement version from 4.2 to 4.3
2026-02-23 7:41 [PATCH blktests 0/3] misc fixes Shin'ichiro Kawasaki
2026-02-23 7:41 ` [PATCH blktests 1/3] common/nvme: do not call 'nvme id-ns' to non-nvme devices Shin'ichiro Kawasaki
@ 2026-02-23 7:41 ` Shin'ichiro Kawasaki
2026-02-26 5:39 ` Chaitanya Kulkarni
2026-02-23 7:41 ` [PATCH blktests 3/3] src: add nvme-passthru-admin-uring to .gitignore Shin'ichiro Kawasaki
2026-03-02 0:32 ` [PATCH blktests 0/3] misc fixes Shinichiro Kawasaki
3 siblings, 1 reply; 8+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-02-23 7:41 UTC (permalink / raw)
To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki
The helper functions _get_nvmet_ports() and _get_nvmet_port_params() use
the bash 'nameref' feature, introduced in the bash version 4.3.
Currently, blktests README and the check script declare bash version
4.2 as the minimum bash version, leading to a version mismatch.
Fix this inconsistency by updating the minimum required bash version
to 4.3. Note that bash 4.2 was released in 2011, while bash 4.3 was
released in 2014. This change is unlikely to affect blktests users.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
README.md | 2 +-
check | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index e993105..b137a43 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ filesystem testing framework. It was originally written by Omar Sandoval and
The dependencies are minimal, but make sure you have them installed:
-- bash (>= 4.2)
+- bash (>= 4.3)
- GNU coreutils
- GNU awk
- util-linux
diff --git a/check b/check
index a2c19a2..8c113b3 100755
--- a/check
+++ b/check
@@ -1074,11 +1074,11 @@ _check_dependencies() {
local -A required_commands_and_packages
local cmd
- # Require bash version 4.2
+ # Require bash version 4.3
IFS='.' read -r v1 v2 v3 < <(bash --version | grep version | head -1 | \
sed 's/.*version \([0-9.]\+\).*/\1/')
- if ((v1 * 65536 + v2 * 256 + v3 < 4 * 65536 + 2 * 256)); then
- _warning "bash version is older than 4.2"
+ if ((v1 * 65536 + v2 * 256 + v3 < 4 * 65536 + 3 * 256)); then
+ _warning "bash version is older than 4.3"
fi
# Check dependent commands to run blktests
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH blktests 3/3] src: add nvme-passthru-admin-uring to .gitignore
2026-02-23 7:41 [PATCH blktests 0/3] misc fixes Shin'ichiro Kawasaki
2026-02-23 7:41 ` [PATCH blktests 1/3] common/nvme: do not call 'nvme id-ns' to non-nvme devices Shin'ichiro Kawasaki
2026-02-23 7:41 ` [PATCH blktests 2/3] check: increment bash requirement version from 4.2 to 4.3 Shin'ichiro Kawasaki
@ 2026-02-23 7:41 ` Shin'ichiro Kawasaki
2026-02-26 5:39 ` Chaitanya Kulkarni
2026-03-02 0:32 ` [PATCH blktests 0/3] misc fixes Shinichiro Kawasaki
3 siblings, 1 reply; 8+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-02-23 7:41 UTC (permalink / raw)
To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki
Commit a94b77010d56 ("nvme/067: test io_uring pass through for NVMe
admin queue") introduced a new program nvme-passthru-admin-uring under
/src directory, but omitted it from .gitignore. Add it to .gitignore.
Fixes: a94b77010d56 ("nvme/067: test io_uring pass through for NVMe admin queue")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
src/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/.gitignore b/src/.gitignore
index e6c6c38..988d785 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -13,3 +13,4 @@
/miniublk
/nvme-passthrough-meta
/ioctl-lbmd-query
+/nvme-passthru-admin-uring
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH blktests 1/3] common/nvme: do not call 'nvme id-ns' to non-nvme devices
2026-02-23 7:41 ` [PATCH blktests 1/3] common/nvme: do not call 'nvme id-ns' to non-nvme devices Shin'ichiro Kawasaki
@ 2026-02-26 5:38 ` Chaitanya Kulkarni
0 siblings, 0 replies; 8+ messages in thread
From: Chaitanya Kulkarni @ 2026-02-26 5:38 UTC (permalink / raw)
To: Shin'ichiro Kawasaki, linux-block@vger.kernel.org,
linux-nvme@lists.infradead.org
On 2/22/26 23:41, Shin'ichiro Kawasaki wrote:
> The test case block/041 tests PI metadata capability in the block layer.
> At this moment, nvme is the only one block device that supports the
> capability. To check that the test target nvme devices fulfills the
> requirement, the test case calls 'nvme ns-id' command via
> _test_dev_disable_extended_lba(). However, since the test case is in
> the block group, TEST_DEVS can specify non-nvme devices. Even though the
> test case is skipped by _require_test_dev_is_nvme() check, the
> 'nvme ns-id' is called for the non-nvme device and fails. It spits out
> unnecessary error messages.
>
> To avoid the error message, check if the test device is nvme before
> calling 'nvme ns-id'. For the check, factor out a helper function
> _test_dev_is_nvme(). While at it, replace short command options -q and
> -f with long options --quiet and --canonicalize for readability.
>
> Signed-off-by: Shin'ichiro Kawasaki<shinichiro.kawasaki@wdc.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH blktests 2/3] check: increment bash requirement version from 4.2 to 4.3
2026-02-23 7:41 ` [PATCH blktests 2/3] check: increment bash requirement version from 4.2 to 4.3 Shin'ichiro Kawasaki
@ 2026-02-26 5:39 ` Chaitanya Kulkarni
0 siblings, 0 replies; 8+ messages in thread
From: Chaitanya Kulkarni @ 2026-02-26 5:39 UTC (permalink / raw)
To: Shin'ichiro Kawasaki, linux-block@vger.kernel.org,
linux-nvme@lists.infradead.org
On 2/22/26 23:41, Shin'ichiro Kawasaki wrote:
> The helper functions _get_nvmet_ports() and _get_nvmet_port_params() use
> the bash 'nameref' feature, introduced in the bash version 4.3.
> Currently, blktests README and the check script declare bash version
> 4.2 as the minimum bash version, leading to a version mismatch.
>
> Fix this inconsistency by updating the minimum required bash version
> to 4.3. Note that bash 4.2 was released in 2011, while bash 4.3 was
> released in 2014. This change is unlikely to affect blktests users.
>
> Signed-off-by: Shin'ichiro Kawasaki<shinichiro.kawasaki@wdc.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH blktests 3/3] src: add nvme-passthru-admin-uring to .gitignore
2026-02-23 7:41 ` [PATCH blktests 3/3] src: add nvme-passthru-admin-uring to .gitignore Shin'ichiro Kawasaki
@ 2026-02-26 5:39 ` Chaitanya Kulkarni
0 siblings, 0 replies; 8+ messages in thread
From: Chaitanya Kulkarni @ 2026-02-26 5:39 UTC (permalink / raw)
To: Shin'ichiro Kawasaki, linux-block@vger.kernel.org,
linux-nvme@lists.infradead.org
On 2/22/26 23:41, Shin'ichiro Kawasaki wrote:
> Commit a94b77010d56 ("nvme/067: test io_uring pass through for NVMe
> admin queue") introduced a new program nvme-passthru-admin-uring under
> /src directory, but omitted it from .gitignore. Add it to .gitignore.
>
> Fixes: a94b77010d56 ("nvme/067: test io_uring pass through for NVMe admin queue")
> Signed-off-by: Shin'ichiro Kawasaki<shinichiro.kawasaki@wdc.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH blktests 0/3] misc fixes
2026-02-23 7:41 [PATCH blktests 0/3] misc fixes Shin'ichiro Kawasaki
` (2 preceding siblings ...)
2026-02-23 7:41 ` [PATCH blktests 3/3] src: add nvme-passthru-admin-uring to .gitignore Shin'ichiro Kawasaki
@ 2026-03-02 0:32 ` Shinichiro Kawasaki
3 siblings, 0 replies; 8+ messages in thread
From: Shinichiro Kawasaki @ 2026-03-02 0:32 UTC (permalink / raw)
To: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Cc: Chaitanya Kulkarni
On Feb 23, 2026 / 16:41, Shin'ichiro Kawasaki wrote:
> These are miscellaneous fixes. They are not critical but worth fixing.
Chaitanya, thanks for the review. FYI, I applied the patches.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-03-02 0:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 7:41 [PATCH blktests 0/3] misc fixes Shin'ichiro Kawasaki
2026-02-23 7:41 ` [PATCH blktests 1/3] common/nvme: do not call 'nvme id-ns' to non-nvme devices Shin'ichiro Kawasaki
2026-02-26 5:38 ` Chaitanya Kulkarni
2026-02-23 7:41 ` [PATCH blktests 2/3] check: increment bash requirement version from 4.2 to 4.3 Shin'ichiro Kawasaki
2026-02-26 5:39 ` Chaitanya Kulkarni
2026-02-23 7:41 ` [PATCH blktests 3/3] src: add nvme-passthru-admin-uring to .gitignore Shin'ichiro Kawasaki
2026-02-26 5:39 ` Chaitanya Kulkarni
2026-03-02 0:32 ` [PATCH blktests 0/3] misc fixes Shinichiro Kawasaki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox