diff --git a/handle-eintr.patch b/handle-eintr.patch new file mode 100644 index 0000000..394b27f --- /dev/null +++ b/handle-eintr.patch @@ -0,0 +1,52 @@ +--- liburing-2.2/test/ce593a6c480a.c ++++ liburing-2.2/test/ce593a6c480a.c +@@ -111,15 +111,16 @@ + (void*) (intptr_t) other_fd); + + /* Wait on the event fd for an event to be ready */ +- ret = read(loop_fd, buf, 8); +- if (ret < 0) { +- perror("read"); +- return 1; +- } else if (ret != 8) { +- fprintf(stderr, "Odd-sized eventfd read: %d\n", ret); +- return 1; +- } +- ++ do { ++ ret = read(loop_fd, buf, 8); ++ if (ret < 0 && errno != EINTR) { ++ perror("read"); ++ return 1; ++ } else if (ret > 0 && ret != 8) { ++ fprintf(stderr, "Odd-sized eventfd read: %d\n", ret); ++ return 1; ++ } ++ } while (ret < 0); + + ret = io_uring_wait_cqe(&ring, &cqe); + if (ret) { +--- liburing-2.2/test/io-cancel.c ++++ liburing-2.2/test/io-cancel.c +@@ -366,10 +366,17 @@ + } else { + int wstatus; + +- if (waitpid(p, &wstatus, 0) == (pid_t)-1) { +- perror("waitpid()"); +- return 1; +- } ++ do { ++ if (waitpid(p, &wstatus, 0) == (pid_t)-1) { ++ if (errno == EINTR) { ++ continue; ++ } ++ perror("waitpid()"); ++ return 1; ++ } ++ break; ++ } while (1); ++ + if (!WIFEXITED(wstatus) || WEXITSTATUS(wstatus)) { + fprintf(stderr, "child failed %i\n", WEXITSTATUS(wstatus)); + return 1; diff --git a/liburing-2.1.tar.bz2 b/liburing-2.1.tar.bz2 deleted file mode 100644 index 94b1e6e..0000000 --- a/liburing-2.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df7c8fd05fd39da622b2814e06f815f11f1beb429487a4330eed64bb7f353dbf -size 120806 diff --git a/liburing-2.2.tar.bz2 b/liburing-2.2.tar.bz2 new file mode 100644 index 0000000..94c5db4 --- /dev/null +++ b/liburing-2.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fcd25dc1eb32cbeb534219f8e7fcfeadbd8dc2304aa447148e5ca8408076f22 +size 172733 diff --git a/liburing.changes b/liburing.changes index 0e5af2a..7ca7af8 100644 --- a/liburing.changes +++ b/liburing.changes @@ -1,7 +1,49 @@ +------------------------------------------------------------------- +Fri Jul 8 12:40:13 UTC 2022 - Dirk Müller + +- add handle-eintr.patch, enable tests everywhere + +------------------------------------------------------------------- +Wed Jun 29 11:28:10 UTC 2022 - Dirk Müller + +- enable tests for != ppc64le + +------------------------------------------------------------------- +Tue Jun 28 13:40:10 UTC 2022 - Dirk Müller + +- update to 2.2: + * Support non-libc builds. + * Optimized syscall handling for x86-64/x86/aarch64. + * Enable non-lib function calls for fast path functions. + * Add support for multishot accept. + * io_uring_register_files() will set RLIMIT_NOFILE if necessary. + * Add support for registered ring fds, io_uring_register_ring_fd(), + reducingthe overhead of an io_uring_enter() system call. + * Add support for the message ring opcode. + * Add support for newer request cancelation features. + * Add support for IORING_SETUP_COOP_TASKRUN, which can help reduce the + overhead of io_uring in general. Most applications should set this flag, + see the io_uring_setup.2 man page for details. + * Add support for registering a sparse buffer and file set. + * Add support for a new buffer provide scheme, see + io_uring_register_buf_ring.3 for details. + * Add io_uring_submit_and_wait_timeout() for submitting IO and waiting + for completions with a timeout. + * Add io_uring_prep_{read,write}v2 prep helpers. + * Add io_uring_prep_close_direct() helper. + * Add support for SQE128 and CQE32, which are doubly sized SQE and CQE + rings. This is needed for some cases of the new IORING_OP_URING_CMD, + notably for NVMe passthrough. + * ~5500 lines of man page additions, including adding ~90 new man pages. + * Synced with the 5.19 kernel release, supporting all the features of + 5.19 and earlier. + * 24 new regression test cases, and ~7000 lines of new tests in general. + * General optimizations and fixes. + ------------------------------------------------------------------- Fri Apr 29 06:53:08 UTC 2022 - Dirk Müller -- avoid requiring kernel-default (bsc#1193522) +- avoid requiring kernel-default (bsc#1193522) ------------------------------------------------------------------- Thu Feb 10 13:32:35 UTC 2022 - David Disseldorp diff --git a/liburing.spec b/liburing.spec index e03bfbf..7cc0405 100644 --- a/liburing.spec +++ b/liburing.spec @@ -18,15 +18,20 @@ %define lname liburing2 Name: liburing -Version: 2.1 +Version: 2.2 Release: 0 Summary: Linux-native io_uring I/O access library License: (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT Group: Development/Libraries/C and C++ URL: https://git.kernel.dk/cgit/liburing Source: https://git.kernel.dk/cgit/liburing/snapshot/%{name}-%{version}.tar.bz2 -BuildRequires: gcc +# PATCH-FIX-UPSTREAM: has been accepted upstream +# [1/1] Handle EINTR in tests +# commit: fa67f6aedcfdaffc14cbf0b631253477b2565ef0 +Patch2: handle-eintr.patch +BuildRequires: gcc-c++ BuildRequires: pkgconfig +BuildRequires: procps # Kernel part has landed in 5.1 Conflicts: kernel < 5.1 @@ -55,7 +60,7 @@ This package provides header files to include and libraries to link with for the Linux-native io_uring. %prep -%setup -q +%autosetup -p1 %build # not autotools, so configure macro doesn't work @@ -67,6 +72,9 @@ sh ./configure --prefix=%{_prefix} \ --datadir=%{_datadir} %make_build -C src +%check +/usr/bin/make runtests + %install %make_install rm -v %{buildroot}%{_libdir}/%{name}.a