From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] lib: Allow timeout coefficient < 1
Date: Wed, 13 Nov 2019 08:59:42 +0100 [thread overview]
Message-ID: <20191113075942.GA14606@dell5510> (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.
> 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;
Update for current master:
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 8d7dee2cc..2513ce7ba 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1190,8 +1190,8 @@ unsigned int tst_multiply_timeout(unsigned int timeout)
timeout_mul = 1;
}
}
- if (timeout_mul < 1)
- tst_brk(TBROK, "LTP_TIMEOUT_MUL must to be int >= 1! (%.2f)",
+ if (timeout_mul <= 0)
+ tst_brk(TBROK, "LTP_TIMEOUT_MUL must to be int >= 0! (%.2f)",
timeout_mul);
if (timeout < 1)
Kind regards,
Petr
next prev parent reply other threads:[~2019-11-13 7: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 [this message]
2019-11-14 13:59 ` Cyril Hrubis
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=20191113075942.GA14606@dell5510 \
--to=pvorel@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