From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] starvation.c: New case for sched starvation
Date: Tue, 9 May 2023 07:52:56 +0200 [thread overview]
Message-ID: <20230509055256.GB128837@pevik> (raw)
In-Reply-To: <ZFe1VgRXMggwVwV3@localhost>
> On Fri, May 05, 2023 at 07:31:37PM +0200, Petr Vorel wrote:
> > Hi Wei,
> > > +static struct tst_test test = {
> > > + .test_all = do_test,
> > > + .setup = setup,
> > > + .forks_child = 1,
> > > + .needs_checkpoints = 1,
> > > + .max_runtime = 120,
> > Are you sure 2 min is enough? Maybe we need to use tst_remaining_runtime() to
> > check if we're not running out of time.
> Seems difficult to check with tst_remaining_runtime since i can use code such as:
> while(tst_remaining_runtime())
> wait_for_pid();
If you don't know how to use tst_remaining_runtime() how about getting
inspiration from lib/newlib_tests/test_runtime01.c ?
static void run(void)
{
int runtime;
tst_res(TINFO, "...");
do {
runtime = tst_remaining_runtime();
tst_res(TINFO, "Remaining runtime %d", runtime);
sleep(1);
} while (runtime);
tst_res(TPASS, "Test passed");
}
static struct tst_test test = {
.test_all = run,
.max_runtime = 120,
};
=> Also, it's a question, how long should the test be running.
Is it worth to be running for 2 mins? It's kind of stress test, right?
But even that wouldn't be 30 sec enough?
Kind regards,
Petr
> > Also, if we set getopt to choose number of options, we'd need to adjust it by
> > tst_set_max_runtime().
> > Kind regards,
> > Petr
> > > +};
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-05-09 5:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 11:03 [LTP] [PATCH v1] starvation.c: New case for sched starvation Wei Gao via ltp
2023-05-05 17:31 ` Petr Vorel
2023-05-07 14:27 ` Wei Gao via ltp
2023-05-09 5:52 ` Petr Vorel [this message]
2023-05-09 13:56 ` Wei Gao via ltp
2023-05-07 14:22 ` [LTP] [PATCH v2] " Wei Gao via ltp
2023-07-13 8:58 ` Cyril Hrubis
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=20230509055256.GB128837@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.com \
/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