[PATCH liburing 1/1] tests: don't sleep too much for rsrc tags

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

 



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 <asml.silence@xxxxxxxxx>
---
 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




[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