All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lsmod01.sh: retry test couple times to lower false positives
Date: Fri, 18 Oct 2019 09:27:36 -0400 (EDT)	[thread overview]
Message-ID: <2145309610.6976144.1571405256594.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20191018132300.GA27956@dell5510>



----- Original Message -----
> Hi Jan,
> 
> > Test sporadically fails with:
> >   lsmod01 1 TFAIL: lsmod output different from /proc/modules.
> >   36c36
> >   < loop 42057 2
> >   ---
> >   > loop 42057 1
> 
> > commands runtest file runs mkswap01 before this test. That test is
> > using loop device, and udev is presumably still holding a reference
> > by the time lsmod01 test starts.
> 
> > Repeat the test couple times to avoid racing with rest of the system.
> 
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
> ...
> > +++ b/testcases/commands/lsmod/lsmod01.sh
> > @@ -10,31 +10,41 @@ TST_NEEDS_TMPDIR=1
> >  TST_NEEDS_CMDS="lsmod"
> >  . tst_test.sh
> 
> > -lsmod_test()
> > +lsmod_matches_proc_modules()
> >  {
> >  	lsmod_output=$(lsmod | awk '!/Module/{print $1, $2, $3}' | sort)
> >  	if [ -z "$lsmod_output" ]; then
> > -		tst_res TFAIL "Failed to parse the output from lsmod"
> > -		return
> > +		tst_brk TBROK "Failed to parse the output from lsmod"
> >  	fi
> 
> > -	modules_output=$(awk '{print $1, $2, $3}' /proc/modules | sort)
> > +	modules_output=$(awk '{print $1, $2, $3} 1' /proc/modules | sort)
> This is a regression. Please keep the old version (without 1).

My bad, I left it in by accident after testing.

> 
> 
> -	modules_output=$(awk '{print $1, $2, $3} 1' /proc/modules | sort)
> +	modules_output=$(awk '{print $1, $2, $3}' /proc/modules | sort)
> 
> >  	if [ -z "$modules_output" ]; then
> > -		tst_res TFAIL "Failed to parse /proc/modules"
> > -		return
> > +		tst_brk TBROK "Failed to parse /proc/modules"
> >  	fi
> 
> >  	if [ "$lsmod_output" != "$modules_output" ]; then
> > -		tst_res TFAIL "lsmod output different from /proc/modules."
> > +		tst_res TINFO "lsmod output different from /proc/modules."
> nit: please remove dots at the end of messages, when you're touching that
> file.

will do

> 
> The rest looks good to me.
> 
> Kind regards,
> Petr
> 

  reply	other threads:[~2019-10-18 13:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 10:05 [LTP] [PATCH] lsmod01.sh: retry test couple times to lower false positives Jan Stancek
2019-10-18 13:23 ` Petr Vorel
2019-10-18 13:27   ` Jan Stancek [this message]
2019-10-18 13:45 ` Petr Vorel
2019-10-22  7:10   ` Jan Stancek
2019-10-23 12:19 ` Petr Vorel
2019-10-23 13:28   ` Jan Stancek
2019-10-23 18:28     ` Petr Vorel
2019-10-24  4:47       ` Li Wang
2019-10-24  7:49         ` Petr Vorel
2019-10-24  7:12       ` Jan Stancek

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=2145309610.6976144.1571405256594.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.