aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2023-11-21 14:39:07 -0800
committerZorro Lang <zlang@kernel.org>2024-01-14 20:39:09 +0800
commit8716ac9a3eeadab0dc2a888bc75979213b35c392 (patch)
tree10a087fbeca43720fe0a5fc019e095a062fba645
parent72dad8092e6238cc2dff451b194b0fda13e2c7b2 (diff)
downloadxfstests-dev-8716ac9a3eeadab0dc2a888bc75979213b35c392.tar.gz
common/rc: fix _require_xfs_io_command with digits in argument
'_require_xfs_io_command set_encpolicy -s' does not work as expected because the following in the output of 'xfs_io -c "help set_encpolicy"': -s LOG2_DUSIZE -- log2 of data unit size ... does not match the regex: "^ -s ([a-zA-Z_]+ )?--" ... because the 2 in the argument name LOG2_DUSIZE is not matched. Fix the regex to support digits in the argument name. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
-rw-r--r--common/rc2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rc b/common/rc
index a9e0ba7e22..524ffa02aa 100644
--- a/common/rc
+++ b/common/rc
@@ -2726,7 +2726,7 @@ _require_xfs_io_command()
[ -n "$param" ] || return
if [ -z "$param_checked" ]; then
- $XFS_IO_PROG -c "help $command" | grep -E -q "^ $param ([a-zA-Z_]+ )?--" || \
+ $XFS_IO_PROG -c "help $command" | grep -E -q "^ $param ([a-zA-Z0-9_]+ )?--" || \
_notrun "xfs_io $command doesn't support $param"
else
# xfs_io could result in "command %c not supported" if it was