From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 1/3] tests: remove sigalarm from poll.c
Date: Wed, 23 Nov 2022 11:35:08 +0000 [thread overview]
Message-ID: <cb1f7add1ede0a1f9526b53ba8ff337fd9a754c6.1669079092.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Test loop handles timeouting and killing stuck tests, no need to have a
separate sigalarm in poll.c
Signed-off-by: Pavel Begunkov <[email protected]>
---
test/poll.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/test/poll.c b/test/poll.c
index 1cd57ba..42123bd 100644
--- a/test/poll.c
+++ b/test/poll.c
@@ -14,12 +14,6 @@
#include "liburing.h"
-static void sig_alrm(int sig)
-{
- fprintf(stderr, "Timed out!\n");
- exit(1);
-}
-
int main(int argc, char *argv[])
{
struct io_uring_cqe *cqe;
@@ -43,20 +37,12 @@ int main(int argc, char *argv[])
perror("fork");
exit(2);
case 0: {
- struct sigaction act;
-
ret = io_uring_queue_init(1, &ring, 0);
if (ret) {
fprintf(stderr, "child: ring setup failed: %d\n", ret);
return 1;
}
- memset(&act, 0, sizeof(act));
- act.sa_handler = sig_alrm;
- act.sa_flags = SA_RESTART;
- sigaction(SIGALRM, &act, NULL);
- alarm(1);
-
sqe = io_uring_get_sqe(&ring);
if (!sqe) {
fprintf(stderr, "get sqe failed\n");
--
2.38.1
next prev parent reply other threads:[~2022-11-23 11:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 11:35 [PATCH liburing 0/3] test poll missing events Pavel Begunkov
2022-11-23 11:35 ` Pavel Begunkov [this message]
2022-11-23 11:35 ` [PATCH liburing 2/3] tests: refactor poll.c Pavel Begunkov
2022-11-23 11:35 ` [PATCH liburing 3/3] tests: check for missing multipoll events Pavel Begunkov
2022-11-23 17:51 ` [PATCH liburing 0/3] test poll missing events 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=cb1f7add1ede0a1f9526b53ba8ff337fd9a754c6.1669079092.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