test-appliance: detect 'mkfs.f2fs -f' support by grepping help output
PATCH 1/1 test-appliance: detect 'mkfs.f2fs -f' support by grepping help output
From: Eric Biggers <[email protected]>
Grep the help output rather than the binary itself. This matches the detection method that was implemented in xfstests common/config.
Signed-off-by Eric Biggers <[email protected]>
--- kvm-xfstests/test-appliance/files/root/fs/f2fs/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kvm-xfstests/test-appliance/files/root/fs/f2fs/config +1 -1
@@ -20,7 +20,7 @@ function format_filesystem() local dev="$1" local opts="$2" - if grep -q 'force overwrite' /sbin/mkfs.f2fs; then + if /sbin/mkfs.f2fs --help |& grep -q "[[:space:]]-f[[:space:]|]"; then # f2fs-tools v1.9+ opts+=" -f" fi
Signature · 1 line
2.17.0.484.g0c8726318c-goog
Theodore Y. Ts'o
AppliedQuoted 6 lines · Eric Biggers
From: Eric Biggers <[email protected]>
Grep the help output rather than the binary itself. This matches the detection method that was implemented in xfstests common/config.
Signed-off-by Eric Biggers <[email protected]>
Applied, thanks.
- Ted