From: Richard Palethorpe <rpalethorpe@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/2] lib: add tst_get_timeout()
Date: Tue, 28 Aug 2018 16:20:58 +0200 [thread overview]
Message-ID: <87wosashbp.fsf@rpws.prws.suse.cz> (raw)
In-Reply-To: <20180828125808.GB24095@rei>
Hello,
Cyril Hrubis <chrubis@suse.cz> writes:
> Hi!
> It's just an idea, but we can make this even more elegant API.
>
> We measure the time in the test library anyway, so what about we added
> something as tst_timeout_reached() that would return number of seconds
> remaining to 80% of the real timeout or 0 if in a case that the timeout
> was reached. Then we can use this as a soft-timeout in all the testcases
> without any additional steps.
>
> --
> Cyril Hrubis
> chrubis@suse.cz
80% is probably way more than many of the CVE test cases need unless the
overall timeout is reduced from 5 minutes. Probably 20% would be
OK. Assuming this is the kind of usage scenario you had in mind.
We could also call it tst_timeout_approaching, tst_timeout_near or
tst_time_to_fail... not sure if they are any better.
--
Thank you,
Richard.
next prev parent reply other threads:[~2018-08-28 14:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 11:07 [LTP] [PATCH v2 1/2] lib: add tst_get_timeout() Jan Stancek
2018-08-28 11:07 ` [LTP] [PATCH v2 2/2] move_pages12: end early if runtime gets close to test time Jan Stancek
2018-08-28 12:34 ` [LTP] [PATCH v2 1/2] lib: add tst_get_timeout() Li Wang
2018-08-28 12:58 ` Cyril Hrubis
2018-08-28 14:20 ` Richard Palethorpe [this message]
2018-08-28 14:38 ` Jan Stancek
2018-08-29 4:52 ` Li Wang
2018-08-29 7:18 ` 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=87wosashbp.fsf@rpws.prws.suse.cz \
--to=rpalethorpe@suse.de \
--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