From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 1/1] tests: don't sleep too much for rsrc tags
Date: Thu, 17 Mar 2022 14:35:22 +0000 [thread overview]
Message-ID: <16780e103cfd395ad380bab4dbe6cf35cb581d98.1647527537.git.asml.silence@gmail.com> (raw)
check_cq_empty() sleeps for a second, and it's called many times
throughout the test. It's too much, reduced it to 1ms. Even if there is
a false negative, we don't care and next check_cq_empty() will fail.
Signed-off-by: Pavel Begunkov <[email protected]>
---
test/rsrc_tags.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/rsrc_tags.c b/test/rsrc_tags.c
index f441b5c..2d11d2a 100644
--- a/test/rsrc_tags.c
+++ b/test/rsrc_tags.c
@@ -27,7 +27,7 @@ static bool check_cq_empty(struct io_uring *ring)
struct io_uring_cqe *cqe = NULL;
int ret;
- sleep(1); /* doesn't happen immediately, so wait */
+ usleep(1000); /* doesn't happen immediately, so wait */
ret = io_uring_peek_cqe(ring, &cqe); /* nothing should be there */
return ret == -EAGAIN;
}
--
2.35.1
next reply other threads:[~2022-03-17 14:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 14:35 Pavel Begunkov [this message]
2022-03-17 15:00 ` [PATCH liburing 1/1] tests: don't sleep too much for rsrc tags Jens Axboe
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=16780e103cfd395ad380bab4dbe6cf35cb581d98.1647527537.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/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