test/accept: don't be too verbose or fail if multishot not available
#define MAX_FDS 32
static int no_accept;
+static int no_accept_multi;
struct data {
char buf[128];
@@ -215,6 +216,9 @@ static int test_loop(struct io_uring *ring,
"%s %s Accept not supported, skipping\n",
fixed ? "Fixed" : "",
multishot ? "Multishot" : "");
+ if (multishot)
+ no_accept_multi = 1;
+ else
no_accept = 1;
goto out;
} else if (s_fd[i] < 0) {
@@ -443,6 +447,9 @@ static int test_accept_cancel(unsigned usecs, unsigned int nr, bool multishot)
struct io_uring_sqe *sqe;
int fd, i, ret;
+ if (multishot && no_accept_multi)
+ return 0;
+
ret = io_uring_queue_init(32, &m_io_uring, 0);
assert(ret >= 0);
@@ -534,6 +541,9 @@ static int test_multishot_accept(int count, bool before)
.extra_loops = count - 1
};
+ if (no_accept_multi)
+ return 0;
+
ret = io_uring_queue_init(MAX_FDS + 10, &m_io_uring, 0);
assert(ret >= 0);
ret = test(&m_io_uring, args);
@@ -621,6 +631,9 @@ static int test_multishot_fixed_accept(void)
.multishot = true
};
+ if (no_accept_multi)
+ return 0;
+
memset(fd, -1, sizeof(fd));
ret = io_uring_queue_init(MAX_FDS + 10, &m_io_uring, 0);
assert(ret >= 0);
