diff --git a/test/task-restrictions.c b/test/task-restrictions.c index 5a9170b4..4d4b457c 100644 --- a/test/task-restrictions.c +++ b/test/task-restrictions.c @@ -92,6 +92,12 @@ static int test_restrictions(int should_work) static void *thread_fn(void *unused) { int ret; + struct io_uring_task_restriction *res = + calloc(1, sizeof(*res) + 1 * sizeof(struct io_uring_restriction)); + res->restrictions[1].opcode = IORING_RESTRICTION_SQE_OP; + res->restrictions[1].sqe_op = IORING_OP_FUTEX_WAIT; + res->nr_res = 1; + res->flags = IORING_REG_RESTRICTIONS_MASK; ret = test_restrictions(0); if (ret) { @@ -99,6 +105,7 @@ static void *thread_fn(void *unused) return (void *) (uintptr_t) ret; } + ret = io_uring_register_task_restrictions(res); ret = io_uring_register_task_restrictions(NULL); if (!ret) { fprintf(stderr, "thread restrictions unregister worked?!\n");