public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH] fstests: btrfs/080: fix the stray '\'
Date: Fri,  9 Dec 2022 14:19:01 +0800	[thread overview]
Message-ID: <20221209061901.30511-1-wqu@suse.com> (raw)

[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>
---
 tests/btrfs/080 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/btrfs/080 b/tests/btrfs/080
index 45f5ad19..ac9d9b64 100755
--- a/tests/btrfs/080
+++ b/tests/btrfs/080
@@ -76,7 +76,7 @@ workout()
 # 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
-- 
2.38.0


             reply	other threads:[~2022-12-09  6:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09  6:19 Qu Wenruo [this message]
2022-12-09  8:40 ` [PATCH] fstests: btrfs/080: fix the stray '\' David Disseldorp

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=20221209061901.30511-1-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox