diff mbox series

[liburing,4/4] skip poll-mshot-overflow on old kernels

Message ID 20220721144229.1224141-5-dylany@fb.com (mailing list archive)
State New
Headers show
Series tests updates | expand

Commit Message

Dylan Yudaken July 21, 2022, 2:42 p.m. UTC
Older kernels have slightly different behaviour, so rather skip the test
on them.

Reported-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Dylan Yudaken <dylany@fb.com>
---
 test/poll-mshot-overflow.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Ammar Faizi July 21, 2022, 2:57 p.m. UTC | #1
On 7/21/22 9:42 PM, Dylan Yudaken wrote:
> Older kernels have slightly different behaviour, so rather skip the test
> on them.
> 
> Reported-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
> Signed-off-by: Dylan Yudaken <dylany@fb.com>

Tested-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>

Thanks!
diff mbox series

Patch

diff --git a/test/poll-mshot-overflow.c b/test/poll-mshot-overflow.c
index 17039f585a77..360df65d2b15 100644
--- a/test/poll-mshot-overflow.c
+++ b/test/poll-mshot-overflow.c
@@ -59,15 +59,16 @@  int main(int argc, char *argv[])
 	}
 
 	struct io_uring_params params = {
-		.flags = IORING_SETUP_CQSIZE,
+		/* cheat using SINGLE_ISSUER existence to know if this behaviour
+		 * is updated
+		 */
+		.flags = IORING_SETUP_CQSIZE | IORING_SETUP_SINGLE_ISSUER,
 		.cq_entries = 2
 	};
 
 	ret = io_uring_queue_init_params(2, &ring, &params);
-	if (ret) {
-		fprintf(stderr, "ring setup failed: %d\n", ret);
-		return T_EXIT_FAIL;
-	}
+	if (ret)
+		return T_EXIT_SKIP;
 
 	sqe = io_uring_get_sqe(&ring);
 	if (!sqe) {