Accepting request 987907 from home:dirkmueller:Factory
- add handle-eintr.patch, enable tests everywhere OBS-URL: https://build.opensuse.org/request/show/987907 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liburing?expand=0&rev=18
This commit is contained in:
parent
478137a537
commit
51027e9971
52
handle-eintr.patch
Normal file
52
handle-eintr.patch
Normal file
@ -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;
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 8 12:40:13 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add handle-eintr.patch, enable tests everywhere
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 29 11:28:10 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
Wed Jun 29 11:28:10 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -25,6 +25,10 @@ License: (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
|
|||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
URL: https://git.kernel.dk/cgit/liburing
|
URL: https://git.kernel.dk/cgit/liburing
|
||||||
Source: https://git.kernel.dk/cgit/liburing/snapshot/%{name}-%{version}.tar.bz2
|
Source: https://git.kernel.dk/cgit/liburing/snapshot/%{name}-%{version}.tar.bz2
|
||||||
|
# PATCH-FIX-UPSTREAM: has been accepted upstream
|
||||||
|
# [1/1] Handle EINTR in tests
|
||||||
|
# commit: fa67f6aedcfdaffc14cbf0b631253477b2565ef0
|
||||||
|
Patch2: handle-eintr.patch
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: procps
|
BuildRequires: procps
|
||||||
@ -56,7 +60,7 @@ This package provides header files to include and libraries to link with
|
|||||||
for the Linux-native io_uring.
|
for the Linux-native io_uring.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# not autotools, so configure macro doesn't work
|
# not autotools, so configure macro doesn't work
|
||||||
@ -69,10 +73,7 @@ sh ./configure --prefix=%{_prefix} \
|
|||||||
%make_build -C src
|
%make_build -C src
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# tests are broken on ppc64 due to bsc#1200564
|
|
||||||
%ifnarch ppc64le
|
|
||||||
/usr/bin/make runtests
|
/usr/bin/make runtests
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
Loading…
Reference in New Issue
Block a user