From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@kernel.org>
Cc: fstests <fstests@vger.kernel.org>, xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] generic/{349,350,351}: fix scsi_debug parameter quoting issues
Date: Wed, 23 Sep 2026 23:03:15 -0700 [thread overview]
Message-ID: <20260924060315.GF6253@frogsfrogsfrogs> (raw)
From: Darrick J. Wong <djwong@kernel.org>
Commit a90ba59dca447d reworked the argument handling code inside
_get_scsi_debug_dev to put all the remaining arguments (after we extract
the first four arguments) inside an array that gets passed to modprobe:
opts+=("$@")
This code takes every command line argument and copies them into the
array verbatim. Contrast this to what it did before (excerpted):
opts="...dev_size_mb=$size $@"
echo "scsi_debug options $opts" >> $seqres.full
modprobe scsi_debug $opts
The old code put all the arguments into a string, then passed the string
unquoted to modprobe, which means that any spaces in the parameters
given to _get_scsi_debug_dev become argument separators in the modprobe
call. Put more simply, passing "foo=1 bar=1" to _get_scsi_debug_dev
results in "foo=1" "bar=1" being passed to modprobe.
Now we no longer do that, which causes these three tests to fail with:
scsi_debug: `1 lbpws10=1' invalid for parameter `lbpws'
because we're effectively passing lbpws="1 lbpws10=1" to scsi_debug.
Fix this by removing the quoting from the three tests.
Cc: <fstests@vger.kernel.org> # v2026.09.22
Fixes: a90ba59dca447d ("common/scsi_debug: don't slow down I/O")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
tests/generic/349 | 2 +-
tests/generic/350 | 2 +-
tests/generic/351 | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/generic/349 b/tests/generic/349
index 72fbda412ea41c..0d019d4ab46170 100755
--- a/tests/generic/349
+++ b/tests/generic/349
@@ -20,7 +20,7 @@ _require_scsi_debug
_require_xfs_io_command "fzero"
echo "Create and format"
-dev=$(_get_scsi_debug_dev 512 512 0 4 "lbpws=1 lbpws10=1")
+dev=$(_get_scsi_debug_dev 512 512 0 4 lbpws=1 lbpws10=1)
_pwrite_byte 0x62 0 4m $dev >> $seqres.full
echo "Zero range"
diff --git a/tests/generic/350 b/tests/generic/350
index 6079a8d5032303..7dcdda03a613ff 100755
--- a/tests/generic/350
+++ b/tests/generic/350
@@ -20,7 +20,7 @@ _require_scsi_debug
_require_xfs_io_command "fpunch"
echo "Create and format"
-dev=$(_get_scsi_debug_dev 512 512 0 4 "lbpws=1 lbpws10=1")
+dev=$(_get_scsi_debug_dev 512 512 0 4 lbpws=1 lbpws10=1)
_pwrite_byte 0x62 0 4m $dev >> $seqres.full
echo "Zero punch"
diff --git a/tests/generic/351 b/tests/generic/351
index e73b70e4d7957e..374ea1afe46d76 100755
--- a/tests/generic/351
+++ b/tests/generic/351
@@ -27,7 +27,7 @@ _require_xfs_io_command "fzero"
_require_xfs_io_command "fpunch"
echo "Create and format"
-dev=$(_get_scsi_debug_dev 4096 4096 0 4 "lbpws=1 lbpws10=1")
+dev=$(_get_scsi_debug_dev 4096 4096 0 4 lbpws=1 lbpws10=1)
_pwrite_byte 0x62 0 4m $dev >> $seqres.full
$XFS_IO_PROG -c "fsync" $dev
@@ -70,7 +70,7 @@ echo "Destroy device"
_put_scsi_debug_dev
echo "Create w/o unmap or writesame and format"
-dev=$(_get_scsi_debug_dev 512 512 0 4 "lbpws=0 lbpws10=0 lbpu=0 write_same_length=0 unmap_max_blocks=0")
+dev=$(_get_scsi_debug_dev 512 512 0 4 lbpws=0 lbpws10=0 lbpu=0 write_same_length=0 unmap_max_blocks=0)
_pwrite_byte 0x62 0 4m $dev >> $seqres.full
$XFS_IO_PROG -c "fsync" $dev
next reply other threads:[~2026-09-24 6:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 6:03 Darrick J. Wong [this message]
2026-09-24 11:36 ` [PATCH] generic/{349,350,351}: fix scsi_debug parameter quoting issues Andrey Albershteyn
2026-09-25 5:01 ` Christoph Hellwig
2026-09-28 13:55 ` Zorro Lang
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=20260924060315.GF6253@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.