Linux block layer
 help / color / mirror / Atom feed
* [PATCH blktests 0/4] misc fixes
@ 2026-07-13  0:39 Shin'ichiro Kawasaki
  2026-07-13  0:39 ` [PATCH blktests 1/4] check: fix exit status code handling Shin'ichiro Kawasaki
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-07-13  0:39 UTC (permalink / raw)
  To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki

These are miscellaneous fixes. They do not affect test results, but worth
fixing.

Shin'ichiro Kawasaki (4):
  check: fix exit status code handling
  nvme/rc: use _set_attr() in _create_nvmet_passthru()
  CONTRIBUTING: clarify that GPL-2.0 is not applicable
  new: guide long command options

 CONTRIBUTING.md | 4 ++++
 check           | 4 +++-
 new             | 3 +++
 tests/nvme/rc   | 2 +-
 4 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH blktests 1/4] check: fix exit status code handling
  2026-07-13  0:39 [PATCH blktests 0/4] misc fixes Shin'ichiro Kawasaki
@ 2026-07-13  0:39 ` Shin'ichiro Kawasaki
  2026-07-13  0:39 ` [PATCH blktests 2/4] nvme/rc: use _set_attr() in _create_nvmet_passthru() Shin'ichiro Kawasaki
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-07-13  0:39 UTC (permalink / raw)
  To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki

Commit e50a5ff644f3 ("check: call _unload_module() after
fallback_device_cleanup()") added a _unload_module() call to
_check_and_call(). However, after this commit, _check_and_call() no
longer returns the exit status of _call_test(). Then, the check script
does not return non-zero exit status even when any test case fails. Fix
this by adding a local variable to keep the exit status of _call_test().

Fixes: e50a5ff644f3 ("check: call _unload_module() after fallback_device_cleanup()")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 check | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/check b/check
index bc2dde9..61524a5 100755
--- a/check
+++ b/check
@@ -701,7 +701,7 @@ _unload_modules() {
 }
 
 _check_and_call_test() {
-	local postfix
+	local postfix ret
 
 	if declare -fF requires >/dev/null; then
 		requires
@@ -710,7 +710,9 @@ _check_and_call_test() {
 	[[ -n $COND_DESC ]] && postfix=_${COND_DESC//[ =]/_}
 	RESULTS_DIR="$OUTPUT/nodev${postfix}"
 	_call_test test
+	ret=$?
 	_unload_modules
+	return $ret
 }
 
 _check_and_call_test_device() {
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH blktests 2/4] nvme/rc: use _set_attr() in _create_nvmet_passthru()
  2026-07-13  0:39 [PATCH blktests 0/4] misc fixes Shin'ichiro Kawasaki
  2026-07-13  0:39 ` [PATCH blktests 1/4] check: fix exit status code handling Shin'ichiro Kawasaki
@ 2026-07-13  0:39 ` Shin'ichiro Kawasaki
  2026-07-13  0:39 ` [PATCH blktests 3/4] CONTRIBUTING: clarify that GPL-2.0 is not applicable Shin'ichiro Kawasaki
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-07-13  0:39 UTC (permalink / raw)
  To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki

Commit 91316870b124 ("common/nvme, nvme/rc: use _set_attr() to trace
attribute writes") replaced sysfs/confgfs/debugfs attribute writes with
_set_attr() function call, but it missed to one place. Replace the
missed write.

Fixes: 91316870b124 ("common/nvme, nvme/rc: use _set_attr() to trace attribute writes")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/nvme/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/nvme/rc b/tests/nvme/rc
index d6496b3..1d71811 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -225,7 +225,7 @@ _create_nvmet_passthru() {
 	mkdir -p "${subsys_path}"
 	_set_attr 0 "${subsys_path}/attr_allow_any_host"
 
-	_test_dev_nvme_ctrl > "${passthru_path}/device_path"
+	_set_attr "$(_test_dev_nvme_ctrl)" "${passthru_path}/device_path"
 	_set_attr 1 "${passthru_path}/enable"
 	if [[ -f "${passthru_path}/clear_ids" ]]; then
 		_set_attr 1 "${passthru_path}/clear_ids"
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH blktests 3/4] CONTRIBUTING: clarify that GPL-2.0 is not applicable
  2026-07-13  0:39 [PATCH blktests 0/4] misc fixes Shin'ichiro Kawasaki
  2026-07-13  0:39 ` [PATCH blktests 1/4] check: fix exit status code handling Shin'ichiro Kawasaki
  2026-07-13  0:39 ` [PATCH blktests 2/4] nvme/rc: use _set_attr() in _create_nvmet_passthru() Shin'ichiro Kawasaki
@ 2026-07-13  0:39 ` Shin'ichiro Kawasaki
  2026-07-13  0:39 ` [PATCH blktests 4/4] new: guide long command options Shin'ichiro Kawasaki
  2026-07-13 17:13 ` [PATCH blktests 0/4] misc fixes Bart Van Assche
  4 siblings, 0 replies; 6+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-07-13  0:39 UTC (permalink / raw)
  To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki

Majority of the blktests code has GPL-3.0+, so the effective main
license is GPL-3.0+ (e.g., check, common/rc). However, GPL-2.0 and
GPL-3.0 are not compatible with each other [1]. Because the majority of
blktests is GPL-3.0+, blktests cannot contain GPL-2.0 files. All files
shall be GPL-3.0+ or GPL-2.0+. Document this requirement for
clarification.

[1] https://www.gnu.org/licenses/gpl-faq.html#v2v3Compatibility

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 CONTRIBUTING.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4cfc868..375c4eb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -16,3 +16,7 @@ as per the [Developer Certificate of Origin](https://developercertificate.org/).
 Please run `make check` before submitting a new test. This runs the
 [shellcheck](https://github.com/koalaman/shellcheck) static analysis tool and
 some other sanity checks.
+
+When you add new files, choose a license from GPL-3.0+ or GPL-2.0+. The main
+license of blktests is GPL-3.0+. GPL-3.0+ is recommended. GPL-2.0+ is allowed
+but GPL-2.0 cannot be applied.
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH blktests 4/4] new: guide long command options
  2026-07-13  0:39 [PATCH blktests 0/4] misc fixes Shin'ichiro Kawasaki
                   ` (2 preceding siblings ...)
  2026-07-13  0:39 ` [PATCH blktests 3/4] CONTRIBUTING: clarify that GPL-2.0 is not applicable Shin'ichiro Kawasaki
@ 2026-07-13  0:39 ` Shin'ichiro Kawasaki
  2026-07-13 17:13 ` [PATCH blktests 0/4] misc fixes Bart Van Assche
  4 siblings, 0 replies; 6+ messages in thread
From: Shin'ichiro Kawasaki @ 2026-07-13  0:39 UTC (permalink / raw)
  To: linux-block, linux-nvme; +Cc: Shin'ichiro Kawasaki

In the past, command option confusion caused a script bug. The command
option definition change and command option misunderstanding were the
cause. To avoid such troubles, guide to use long command options.

Link: https://lore.kernel.org/linux-nvme/Zbu2qJGoz9UQfPw7@kbusch-mbp.dhcp.thefacebook.com/
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 new | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/new b/new
index 4773175..58b5006 100755
--- a/new
+++ b/new
@@ -279,6 +279,9 @@ test() {
 # - Use the \$() form of command substitution instead of backticks.
 # - Use bash for loops instead of seq. E.g., for ((i = 0; i < 10; i++)), not
 #   for i in \$(seq 0 9).
+# - Use long command options instead of short options for readability and
+#   stability: e.g., 'nvme io-passthru --opcode X' is recommended over
+#   'nvme io-passthru -o X'.
 #
 # Please run \`make check\` after your test is done to check for shell
 # scripting errors and other mistakes.
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH blktests 0/4] misc fixes
  2026-07-13  0:39 [PATCH blktests 0/4] misc fixes Shin'ichiro Kawasaki
                   ` (3 preceding siblings ...)
  2026-07-13  0:39 ` [PATCH blktests 4/4] new: guide long command options Shin'ichiro Kawasaki
@ 2026-07-13 17:13 ` Bart Van Assche
  4 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2026-07-13 17:13 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki, linux-block, linux-nvme

On 7/12/26 5:39 PM, Shin'ichiro Kawasaki wrote:
> These are miscellaneous fixes. They do not affect test results, but worth
> fixing.

For the series:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-13 17:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13  0:39 [PATCH blktests 0/4] misc fixes Shin'ichiro Kawasaki
2026-07-13  0:39 ` [PATCH blktests 1/4] check: fix exit status code handling Shin'ichiro Kawasaki
2026-07-13  0:39 ` [PATCH blktests 2/4] nvme/rc: use _set_attr() in _create_nvmet_passthru() Shin'ichiro Kawasaki
2026-07-13  0:39 ` [PATCH blktests 3/4] CONTRIBUTING: clarify that GPL-2.0 is not applicable Shin'ichiro Kawasaki
2026-07-13  0:39 ` [PATCH blktests 4/4] new: guide long command options Shin'ichiro Kawasaki
2026-07-13 17:13 ` [PATCH blktests 0/4] misc fixes Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox