public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] lib: Allow timeout coefficient < 1
Date: Thu, 14 Nov 2019 14:59:25 +0100	[thread overview]
Message-ID: <20191114135925.GA31033@rei.lan> (raw)
In-Reply-To: <20191107153458.16917-3-rpalethorpe@suse.com>

Hi!
> For the Syzkaller reproducers we want to allow the test runner to set the
> timeout to be a fraction of the default amount.

I guess that this is fine for prototyping but for the real world usage
the syswrap.c should have a .timeout set in the tst_test structure
instead.

> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
>  lib/tst_test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 6239acf89..2e00fd86b 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -1107,7 +1107,7 @@ void tst_set_timeout(int timeout)
>  	if (mul) {
>  		float m = atof(mul);
>  
> -		if (m < 1)
> +		if (m <= 0)
>  			tst_brk(TBROK, "Invalid timeout multiplier '%s'", mul);
>  
>  		results->timeout = results->timeout * m + 0.5;
> -- 
> 2.23.0
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2019-11-14 13:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 15:34 [LTP] [PATCH 0/2] LTP wrapper for Syzkaller reproducers Richard Palethorpe
2019-11-07 15:34 ` [LTP] [PATCH 1/2] Wrapper " Richard Palethorpe
2019-11-07 15:43   ` Dmitry Vyukov
2019-11-12 12:38     ` Li Wang
2019-11-12 14:00       ` Richard Palethorpe
2019-11-12 14:10         ` Li Wang
2019-11-13  6:27           ` Li Wang
2019-11-13  9:34             ` Richard Palethorpe
2019-11-26  8:18   ` Li Wang
2019-11-26 10:32     ` Richard Palethorpe
2019-11-26 12:42       ` [LTP] [Automated-testing] " Petr Vorel
2019-11-26 12:59   ` Petr Vorel
2019-11-07 15:34 ` [LTP] [PATCH 2/2] lib: Allow timeout coefficient < 1 Richard Palethorpe
2019-11-13  7:59   ` Petr Vorel
2019-11-14 13:59   ` Cyril Hrubis [this message]
2019-11-07 15:43 ` [LTP] [PATCH 0/2] LTP wrapper for Syzkaller reproducers Dmitry Vyukov

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=20191114135925.GA31033@rei.lan \
    --to=chrubis@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox