[BUG]
The latest grep will report stray '\', causing golden output mismatch
for btrfs/080:
btrfs/080 - output mismatch (see ~/xfstests-dev/results//btrfs/080.out.bad)
--- tests/btrfs/080.out 2022-11-24 19:53:53.
137469203 +0800
+++ ~/xfstests-dev/results//btrfs/080.out.bad 2022-12-09 11:41:46.
194597311 +0800
@@ -1,2 +1,3 @@
QA output created by 080
+grep: warning: stray \ before -
Silence is golden
...
(Run 'diff -u ~/xfstests-dev/tests/btrfs/080.out ~/xfstests-dev/results//btrfs/080.out.bad' to see the entire diff)
[CAUSE]
Even for regrex of grep, '-' doesn't need special escape, thus
"\bno\-holes\b" indeed has an unnecessary '\' before '-'.
[FIX]
Just remove the stray '\'.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
# created fs doesn't get that feature enabled. With it enabled, the below fsck
# call wouldn't fail. This feature hasn't been enabled by default since it was
# introduced, but be safe and explicitly disable it.
-_scratch_mkfs -O list-all 2>&1 | grep -q '\bno\-holes\b'
+_scratch_mkfs -O list-all 2>&1 | grep -q '\bno-holes\b'
if [ $? -eq 0 ]; then
mkfs_options="-O ^no-holes"
fi