FSTests Archive on lore.kernel.org
 help / color / Atom feed
From: Eryu Guan <eguan@linux.alibaba.com>
To: Paulo Alcantara <pc@cjr.nz>
Cc: Zorro Lang <zlang@redhat.com>, Eryu Guan <guaneryu@gmail.com>,
	fstests@vger.kernel.org
Subject: Re: [PATCH] generic/310: slightly improve check for dmesg error
Date: Wed, 18 Mar 2020 10:10:18 +0800
Message-ID: <20200318021018.GG47669@e18g06458.et15sqa> (raw)
In-Reply-To: <85k13jron9.fsf@cjr.nz>

On Tue, Mar 17, 2020 at 12:23:38PM -0300, Paulo Alcantara wrote:
> Zorro Lang <zlang@redhat.com> writes:
> 
> > On Mon, Mar 16, 2020 at 10:54:39PM -0300, Paulo Alcantara (SUSE) wrote:
> >> The 'grep -c "error"' check was causing false positive results for
> >> cifs.ko when running it with 'echo 1 > /proc/fs/cifs/cifsFYI'.
> >> 
> >> That is, the test would fail when cifs.ko prints out a non-error
> >> message like this:
> >> 
> >>   [ 2320.903987] fs/cifs/smb2maperror.c: Mapping SMB2 status code
> >>   0x80000006 to POSIX err -61
> >> 
> >> Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
> >> ---
> >>  tests/generic/310 | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >> 
> >> diff --git a/tests/generic/310 b/tests/generic/310
> >> index 1fcd517e4e6f..504f7c44c177 100755
> >> --- a/tests/generic/310
> >> +++ b/tests/generic/310
> >> @@ -49,7 +49,7 @@ _require_command "$KILLALL_PROG" killall
> >>  dmesg -c > /dev/null
> >>  
> >>  nr_bug=`dmesg | grep -c "kernel BUG"`
> >> -nr_error=`dmesg | grep -c "error"`
> >> +nr_error=`dmesg | grep -c "EXT[234]-fs error"`
> >
> > This's a generic test, which is not only for extN filesystem. If only for
> > "fs/cifs/smb2maperror.c: Mapping SMB2 status ...", how about:
> >    grep -wc "error"
> > or
> >    grep -c "\berror"
> >
> > or something better:)
> >
> > I think it still works for "EXT3-fs error (device loop1): ext3_readdir:
> > bad entry in ....".
> 
> Both look good to me. Thanks for pointing it out!
> 
> Eryu,
> 
> Do you want me to resend or you can just apply one of above suggestions?

This change seems easy enough, I can fix it on commit. Thanks!

Eryu

      reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  1:54 Paulo Alcantara (SUSE)
2020-03-17 10:55 ` Zorro Lang
2020-03-17 15:23   ` Paulo Alcantara
2020-03-18  2:10     ` Eryu Guan [this message]

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=20200318021018.GG47669@e18g06458.et15sqa \
    --to=eguan@linux.alibaba.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=pc@cjr.nz \
    --cc=zlang@redhat.com \
    /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

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git