[PATCH liburing 1/3] tests: remove sigalarm from poll.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Test loop handles timeouting and killing stuck tests, no need to have a
separate sigalarm in poll.c

Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux