From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] preadv203: set max_runtime to 270s
Date: Wed, 25 May 2022 10:21:20 +0200 [thread overview]
Message-ID: <Yo3nAGS+R3IwYYy9@yuki> (raw)
In-Reply-To: <20220525065124.2665801-1-liwang@redhat.com>
Hi!
> Before the runtime patchset preadv203 use 5min as default timeout
> per fs, that's really long enough for prepare_device(). But after
> that, its now only has 30s which might be short for a slower system
> to do preparation work.
>
> Let's set max_runtime to 270s to make the timeout at least equal
> to previously.
Isn't the main reason why the test fails that the verify_preadv2()
function spins for at most 60 seconds?
I guess that the proper solution should be:
diff --git a/testcases/kernel/syscalls/preadv2/preadv203.c b/testcases/kernel/syscalls/preadv2/preadv203.c
index 01622ad15..e9377071e 100644
--- a/testcases/kernel/syscalls/preadv2/preadv203.c
+++ b/testcases/kernel/syscalls/preadv2/preadv203.c
@@ -199,7 +199,6 @@ static void *cache_dropper(void *unused)
static void verify_preadv2(void)
{
pthread_t reader, dropper, writer;
- unsigned int max_runtime = 600;
void *eagains;
stop = 0;
@@ -210,7 +209,7 @@ static void verify_preadv2(void)
SAFE_PTHREAD_CREATE(&reader, NULL, nowait_reader, NULL);
SAFE_PTHREAD_CREATE(&writer, NULL, writer_thread, NULL);
- while (!stop && max_runtime-- > 0)
+ while (!stop && tst_remaining_runtime())
usleep(100000);
stop = 1;
@@ -280,4 +279,5 @@ static struct tst_test test = {
.mount_device = 1,
.all_filesystems = 1,
.needs_root = 1,
+ .max_runtime = 60,
};
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-05-25 8:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 12:50 [LTP] LTP release preparations Cyril Hrubis
2022-05-09 13:51 ` Petr Vorel
2022-05-10 8:36 ` Li Wang
2022-05-10 13:54 ` Cyril Hrubis
2022-05-19 11:42 ` Martin Doucha
2022-05-19 12:11 ` Cyril Hrubis
2022-05-24 13:01 ` Cyril Hrubis
2022-05-25 6:51 ` [LTP] [PATCH] preadv203: set max_runtime to 270s Li Wang
2022-05-25 8:21 ` Cyril Hrubis [this message]
2022-05-25 10:16 ` 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=Yo3nAGS+R3IwYYy9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox