All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 6/6] lib: Add tst_set_runtime() & remove tst_set_timeout()
Date: Tue, 26 Oct 2021 09:14:12 +0200	[thread overview]
Message-ID: <YXeqxPwYuAVvrMdv@yuki> (raw)
In-Reply-To: <CAEemH2dQcUW5k3Rv-n3=CrznqwpFta3P28QrB0oVZPZH6PyNuw@mail.gmail.com>

Hi!
> > Rarely there is a need to set the test runtime dynamically, the only
> > tests in LTP that does this are the timer tests that can get two
> > parameters, number of iterations and sleep time, and the test runtime is
> > close to the multiplication of these two.
> >
> > It's still cleaner to set the runtime and let the test library figure
> > out the timeout in this case.
> >
> 
> If so, should we consider to hinden the .timeout in struct tst_test
> to prevent users from changing it?

If we decide to apply this patchset that would be logical end result.
There are only a few .timeout = foo left in the codebase after this
patchset that either disable timeout for the few unpredictable cases or
shorten it to make the test timeout faster if it gets stuck. We can deal
with these by making the .max_runtime accept -1 and by shortening the
default timeout considerably.

> IIRC, we currently have ".timeout == -1" to disable test timed
> out in unsure situation, e.g some OOM tests. But in this patch,
> I saw you remove that, but not handle it in tst_set_runtime.

Ah, right, I've removed the timeout == -1 handling by mistake. I wanted
to keep it working after this patchset as well until a follow up
patchset deals with the rest of the tests that set the .timeout.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2021-10-26  7:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 16:01 [LTP] [PATCH 0/6] Introduce a concept of test max_runtime Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 1/6] lib: tst_test: Move timeout scaling out of fork_testrun() Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 2/6] lib: Add .max_runtime and tst_remaining_runtime() Cyril Hrubis
2021-10-26 11:42   ` Jan Stancek
2021-10-26 12:49     ` Cyril Hrubis
2021-11-03  9:34   ` Richard Palethorpe
2021-11-03 11:09     ` Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 3/6] mtest06/mmap3: Convert to tst_remaining_runtime() Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 4/6] syscalls/gettimeofday02: " Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 5/6] cve-2015-3290: convert tst_remining_runtime() Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 6/6] lib: Add tst_set_runtime() & remove tst_set_timeout() Cyril Hrubis
2021-10-26  6:16   ` Li Wang
2021-10-26  7:14     ` Cyril Hrubis [this message]
2021-10-26  7:44       ` Li Wang
2021-10-26  7:56         ` Cyril Hrubis
2021-10-26  8:29           ` Li Wang

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=YXeqxPwYuAVvrMdv@yuki \
    --to=chrubis@suse.cz \
    --cc=liwang@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.