forked from pool/liburing
- Disable timeout.t on Leap 15.6/15.7 - Disable read-inc-file.t and timeout.t on Leap 16.0 - Add upstream patch to fix test on aarch64: * 923961c.patch - Update to 2.9: * Add support for ring resizing * Add support for registered waits * Test additions and improvements * Fix bug with certain ring setups with SQE128 set not fully closing the ring after io_uring_queue_exit(3) had been called. * Various man page fixes and updates - Remove upstreamed patches: * 0001-test-init-mem-zero-the-ringbuf-memory.patch * 0001-test-rsrc_tags-use-correct-buffer-index-for-test.patch OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liburing?expand=0&rev=70
54 lines
1.5 KiB
Diff
54 lines
1.5 KiB
Diff
From 923961c84c0acb166163a1e33bac127ab0559be6 Mon Sep 17 00:00:00 2001
|
|
From: Jens Axboe <axboe@kernel.dk>
|
|
Date: Thu, 3 Apr 2025 09:51:23 -0600
|
|
Subject: [PATCH] test/pipe-bug: ignore -ENOMEM on ring creation
|
|
|
|
Since this test case sets up and tears down a ton of rings, this can
|
|
result in the deferred freeing/unaccounting causing spurious -ENOMEM
|
|
returns. This is expected if the system is configured to be tight on
|
|
locked memory (ulimit -l). If this happens, inject a small delay and
|
|
just have it retry.
|
|
|
|
Link: https://github.com/axboe/liburing/issues/1377
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
---
|
|
test/pipe-bug.c | 16 +++++++++++-----
|
|
1 file changed, 11 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/test/pipe-bug.c b/test/pipe-bug.c
|
|
index 49e4a9412..c76134486 100644
|
|
--- a/test/pipe-bug.c
|
|
+++ b/test/pipe-bug.c
|
|
@@ -24,20 +24,26 @@ do { \
|
|
|
|
static int pipe_bug(void)
|
|
{
|
|
- struct io_uring_params p;
|
|
struct io_uring ring;
|
|
struct io_uring_sqe *sqe;
|
|
struct io_uring_cqe *cqe;
|
|
char buf[1024];
|
|
- int fds[2];
|
|
+ int ret, fds[2];
|
|
struct __kernel_timespec to = {
|
|
.tv_sec = 1
|
|
};
|
|
|
|
- CHECK(pipe(fds) == 0);
|
|
+ ret = io_uring_queue_init(8, &ring, 0);
|
|
+ /* can hit -ENOMEM due to repeated ring creation and teardowns */
|
|
+ if (ret == -ENOMEM) {
|
|
+ usleep(1000);
|
|
+ return 0;
|
|
+ } else if (ret) {
|
|
+ fprintf(stderr, "ring_init: %d\n", ret);
|
|
+ return 1;
|
|
+ }
|
|
|
|
- memset(&p, 0, sizeof(p));
|
|
- CHECK(t_create_ring_params(8, &ring, &p) == 0);
|
|
+ CHECK(pipe(fds) == 0);
|
|
|
|
/* WRITE */
|
|
sqe = io_uring_get_sqe(&ring);
|