diff mbox series

[blktests,2/2] nvme/rc: fix shellcheck warning SC2086

Message ID 20240407031752.3945715-1-yi.zhang@redhat.com (mailing list archive)
State New
Headers show
Series [blktests,1/2] nvme/011: fix filename path | expand

Commit Message

Yi Zhang April 7, 2024, 3:17 a.m. UTC
tests/nvme/rc:1056:7: note: Double quote to prevent globbing and word splitting. [SC2086]
tests/nvme/rc:1057:7: note: Double quote to prevent globbing and word splitting. [SC2086]

Fixes: 369d310 ("nvme: Add passthru error logging tests to nvme/039")
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
---
 tests/nvme/rc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Shin'ichiro Kawasaki April 8, 2024, 4:05 a.m. UTC | #1
On Apr 07, 2024 / 11:17, Yi Zhang wrote:
> tests/nvme/rc:1056:7: note: Double quote to prevent globbing and word splitting. [SC2086]
> tests/nvme/rc:1057:7: note: Double quote to prevent globbing and word splitting. [SC2086]
> 
> Fixes: 369d310 ("nvme: Add passthru error logging tests to nvme/039")
> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>

Thanks, applied.

Of note is that the warnings are observed with ShellCheck version 0.8.0, but not
observed with ShellCheck version 0.9.0 and 0.10.0. I added this note to the
commit message.
diff mbox series

Patch

diff --git a/tests/nvme/rc b/tests/nvme/rc
index 203cf0c..1f5ff44 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -1053,8 +1053,8 @@  _nvme_passthru_logging_setup()
 
 _nvme_passthru_logging_cleanup()
 {
-	echo $ctrl_dev_passthru_logging > /sys/class/nvme/"$2"/passthru_err_log_enabled
-	echo $ns_dev_passthru_logging > /sys/class/nvme/"$2"/"$1"/passthru_err_log_enabled
+	echo "$ctrl_dev_passthru_logging" > /sys/class/nvme/"$2"/passthru_err_log_enabled
+	echo "$ns_dev_passthru_logging" > /sys/class/nvme/"$2"/"$1"/passthru_err_log_enabled
 }
 
 _nvme_err_inject_setup()