vendor/liburing/test/reg-fd-only.c in uringmachine-0.3 vs vendor/liburing/test/reg-fd-only.c in uringmachine-0.4

- old
+ new

@@ -47,18 +47,19 @@ } while (nr_nops); return T_EXIT_PASS; } -static int test(int nentries) +static int test(int nentries, int ring_flags) { struct io_uring ring; unsigned values[2]; int ret; ret = io_uring_queue_init(nentries, &ring, - IORING_SETUP_REGISTERED_FD_ONLY | IORING_SETUP_NO_MMAP); + IORING_SETUP_REGISTERED_FD_ONLY | IORING_SETUP_NO_MMAP | + ring_flags); if (ret == -EINVAL) { no_mmap = 1; return T_EXIT_SKIP; } else if (ret == -ENOMEM) { fprintf(stdout, "Enable huge pages to test big rings\n"); @@ -108,19 +109,28 @@ if (argc > 1) return T_EXIT_SKIP; /* test single normal page */ - ret = test(NORMAL_PAGE_ENTRIES); + ret = test(NORMAL_PAGE_ENTRIES, 0); if (ret == T_EXIT_SKIP || no_mmap) { return T_EXIT_SKIP; } else if (ret != T_EXIT_PASS) { fprintf(stderr, "test 8 failed\n"); return T_EXIT_FAIL; } + /* test single normal page */ + ret = test(NORMAL_PAGE_ENTRIES, IORING_SETUP_SQPOLL); + if (ret == T_EXIT_SKIP || no_mmap) { + return T_EXIT_SKIP; + } else if (ret != T_EXIT_PASS) { + fprintf(stderr, "test 8 failed\n"); + return T_EXIT_FAIL; + } + /* test with entries requiring a huge page */ - ret = test(HUGE_PAGE_ENTRIES); + ret = test(HUGE_PAGE_ENTRIES, 0); if (ret == T_EXIT_SKIP) { return T_EXIT_SKIP; } else if (ret != T_EXIT_PASS) { fprintf(stderr, "test 512 failed\n"); return T_EXIT_FAIL;