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: Wed, 23 Oct 2019 09:28:26 -0400 (EDT)	[thread overview]
Message-ID: <463301336.8732968.1571837306503.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20191023121901.GA25868@dell5510>


----- Original Message -----
> 
> > -	tst_res TPASS "'lsmod' passed."
> > +lsmod_test()
> > +{
> > +	for i in $(seq 1 5); do
> > +		if lsmod_matches_proc_modules; then
> > +			tst_res TPASS "'lsmod' passed."
> > +			return
> > +		fi
> > +		tst_res TINFO "Trying again"
> > +		sleep 1
> > +	done
> This is similar pattern to TST_RETRY_FUNC()/TST_RETRY_FN_EXP_BACKOFF()
> (for both shell and C). I wonder if we also have use for TPASS/TFAIL
> instead of just TBROK and specifying number of tries instead of time to be
> setup.

I think TFAIL fits more here, it's outcome of what we are testing.
TBROK in my mind is failure unrelated to subject of test.

But functionally TST_RETRY_FUNC should work too. 

> C and shell usage is a bit different, so maybe
> TST_RETRY_FUNC()/TST_RETRY_FN_EXP_BACKOFF() doesn't make much sense for shell

I see it used in mkswap01.sh and numa01.sh.

I wonder if we need to TBROK in TST_RETRY_FUNC(). We could just return
what the FUNC returns and let the test decide.
TST_RETRY_FUNC_BRK() could be a wrapper that TBROKs on timeout.


  reply	other threads:[~2019-10-23 13:28 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
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 [this message]
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=463301336.8732968.1571837306503.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.