Sha256: 11faa703f14f5f3f8d56c6823d4d9b8135f9b431d14956acc3406ff13cde16cf

Contents?: true

Size: 888 Bytes

Versions: 8

Compression:

Stored size: 888 Bytes

Contents

/* SPDX-License-Identifier: MIT */
/*
 * Test if entering with nothing to submit/wait for SQPOLL returns an error.
 */
#include <stdio.h>
#include <errno.h>
#include <string.h>

#include "liburing.h"
#include "helpers.h"
#include "../src/syscall.h"

int main(int argc, char *argv[])
{
	struct io_uring_params p = {};
	struct io_uring ring;
	int ret;

	if (argc > 1)
		return 0;

	p.flags = IORING_SETUP_SQPOLL;
	p.sq_thread_idle = 100;

	ret = t_create_ring_params(1, &ring, &p);
	if (ret == T_SETUP_SKIP)
		return 0;
	else if (ret < 0)
		goto err;

	ret = __sys_io_uring_enter(ring.ring_fd, 0, 0, 0, NULL);
	if (ret < 0) {
		int __e = errno;

		if (__e == EOWNERDEAD)
			fprintf(stderr, "sqe submit unexpected failure due old kernel bug: %s\n", strerror(__e));
		else
			fprintf(stderr, "sqe submit unexpected failure: %s\n", strerror(__e));
		goto err;
	}

	return 0;
err:
	return 1;
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
polyphony-0.94 vendor/liburing/test/empty-eownerdead.c
polyphony-0.93 vendor/liburing/test/empty-eownerdead.c
polyphony-0.92 vendor/liburing/test/empty-eownerdead.c
polyphony-0.91 vendor/liburing/test/empty-eownerdead.c
polyphony-0.90 vendor/liburing/test/empty-eownerdead.c
polyphony-0.89 vendor/liburing/test/empty-eownerdead.c
polyphony-0.87 vendor/liburing/test/empty-eownerdead.c
polyphony-0.86 vendor/liburing/test/empty-eownerdead.c