aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2025-02-21 13:15:16 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2025-02-21 13:36:13 +0300
commita4e53fc5cc0c64cd0c54aa050e82cab26e258b7f (patch)
tree4a11071a8b2c78a978064585a2583afb14f6a99d /contrib/libs
parentc1fa17d4daa4633b45d839e44f84d16eacfb82b8 (diff)
downloadydb-a4e53fc5cc0c64cd0c54aa050e82cab26e258b7f.tar.gz
Update contrib/libs/liburing to 2.9
commit_hash:88f21b0567edce8f03258355bcc0e4029ea2085b
Diffstat (limited to 'contrib/libs')
-rw-r--r--contrib/libs/liburing/.yandex_meta/devtools.licenses.report21
-rw-r--r--contrib/libs/liburing/.yandex_meta/override.nix4
-rw-r--r--contrib/libs/liburing/CHANGELOG10
-rw-r--r--contrib/libs/liburing/README5
-rw-r--r--contrib/libs/liburing/src/include/liburing.h23
-rw-r--r--contrib/libs/liburing/src/include/liburing/io_uring.h78
-rw-r--r--contrib/libs/liburing/src/include/liburing/io_uring_version.h2
-rw-r--r--contrib/libs/liburing/src/liburing.map105
-rw-r--r--contrib/libs/liburing/src/queue.c23
-rw-r--r--contrib/libs/liburing/src/register.c76
-rw-r--r--contrib/libs/liburing/src/setup.c31
-rw-r--r--contrib/libs/liburing/src/setup.h6
-rw-r--r--contrib/libs/liburing/test/232c93d07b74.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/35fa71a030ca.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/500f9fbadef8.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/7ad0e4b2f83c.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/8a9973408177.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/917257daa0fe.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/a0908ae19763.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/a4c0b3decb33.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/accept-link.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/accept-non-empty.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/accept-reuse.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/accept-test.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/accept.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/across-fork.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/b19062a56726.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/b5837bd5311d.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/bind-listen.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/buf-ring-nommap.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/buf-ring-put.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/buf-ring.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/ce593a6c480a.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/close-opath.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/cmd-discard.c24
-rw-r--r--contrib/libs/liburing/test/cmd-discard.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/connect-rep.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/connect.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/coredump.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/cq-full.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/cq-overflow.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/cq-peek-batch.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/cq-ready.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/cq-size.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/d4ae271dfaae.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/d77a67ed5f27.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/defer-taskrun.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/defer-tw-timeout.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/defer.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/double-poll-crash.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/drop-submit.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/eeed8b54e0df.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/empty-eownerdead.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/eploop.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/eventfd-disable.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/eventfd-reg.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/eventfd-ring.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/eventfd.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/evloop.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/exec-target.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/exit-no-cleanup.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fadvise.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fallocate.c2
-rw-r--r--contrib/libs/liburing/test/fallocate.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fc2a85cb02ef.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fd-install.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fd-pass.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fdinfo.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fifo-nonblock-read.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/file-exit-unreg.c49
-rw-r--r--contrib/libs/liburing/test/file-exit-unreg.t/ya.make35
-rw-r--r--contrib/libs/liburing/test/file-register.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/file-update.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/file-verify.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/files-exit-hang-poll.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/files-exit-hang-timeout.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fixed-buf-iter.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fixed-buf-merge.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fixed-hugepage.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fixed-link.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fixed-reuse.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fpos.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/fsync.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/futex.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/hardlink.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/ignore-single-mmap.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/init-mem.c2
-rw-r--r--contrib/libs/liburing/test/init-mem.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/io-cancel.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/io_uring_enter.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/io_uring_passthrough.c14
-rw-r--r--contrib/libs/liburing/test/io_uring_passthrough.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/io_uring_register.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/io_uring_setup.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/iopoll-leak.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/iopoll-overflow.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/iopoll.c30
-rw-r--r--contrib/libs/liburing/test/iopoll.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/kallsyms.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/lfs-openat-write.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/lfs-openat.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/link-timeout.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/link.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/link_drain.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/linked-defer-close.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/madvise.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/min-timeout-wait.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/min-timeout.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/mkdir.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/msg-ring-fd.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/msg-ring-flags.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/msg-ring-overflow.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/msg-ring.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/multicqes_drain.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/napi-test.c2
-rw-r--r--contrib/libs/liburing/test/napi-test.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/no-mmap-inval.c2
-rw-r--r--contrib/libs/liburing/test/no-mmap-inval.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/nolibc.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/nop-all-sizes.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/nop.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/ooo-file-unreg.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/open-close.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/open-direct-link.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/open-direct-pick.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/openat2.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/personality.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/pipe-bug.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/pipe-eof.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/pipe-reuse.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-cancel-all.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-cancel-ton.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-cancel.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-link.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-many.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-mshot-overflow.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-mshot-update.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-race-mshot.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-race.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-ring.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll-v-poll.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/poll.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/pollfree.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/probe.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/read-before-exit.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/read-inc-file.c151
-rw-r--r--contrib/libs/liburing/test/read-inc-file.t/ya.make35
-rw-r--r--contrib/libs/liburing/test/read-mshot-empty.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/read-mshot-stdin.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/read-mshot.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/read-write.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/recv-msgall-stream.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/recv-msgall.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/recv-multishot.c4
-rw-r--r--contrib/libs/liburing/test/recv-multishot.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/recvsend_bundle-inc.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/recvsend_bundle.c4
-rw-r--r--contrib/libs/liburing/test/recvsend_bundle.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/reg-fd-only.c2
-rw-r--r--contrib/libs/liburing/test/reg-fd-only.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/reg-hint.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/reg-reg-ring.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/reg-wait.c578
-rw-r--r--contrib/libs/liburing/test/reg-wait.t/ya.make35
-rw-r--r--contrib/libs/liburing/test/regbuf-clone.c398
-rw-r--r--contrib/libs/liburing/test/regbuf-clone.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/regbuf-merge.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/register-restrictions.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/rename.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/resize-rings.c658
-rw-r--r--contrib/libs/liburing/test/resize-rings.t/ya.make35
-rw-r--r--contrib/libs/liburing/test/ring-leak.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/ring-leak2.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/ringbuf-read.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/ringbuf-status.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/rsrc_tags.c2
-rw-r--r--contrib/libs/liburing/test/rsrc_tags.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/rw_merge_test.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/self.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/send-zerocopy.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/send_recv.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/send_recvmsg.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/shared-wq.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/short-read.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/shutdown.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sigfd-deadlock.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/single-issuer.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/skip-cqe.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/socket-getsetsock-cmd.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/socket-io-cmd.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/socket-nb.c159
-rw-r--r--contrib/libs/liburing/test/socket-nb.t/ya.make35
-rw-r--r--contrib/libs/liburing/test/socket-rw-eagain.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/socket-rw-offset.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/socket-rw.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/socket.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/splice.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sq-full-cpp.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sq-full.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sq-poll-dup.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sq-poll-kthread.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sq-poll-share.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sq-space_left.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sqpoll-disable-exit.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sqpoll-exec.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sqpoll-exit-hang.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sqpoll-sleep.c47
-rw-r--r--contrib/libs/liburing/test/sqpoll-sleep.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sqwait.c20
-rw-r--r--contrib/libs/liburing/test/sqwait.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/stdout.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/submit-and-wait.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/submit-link-fail.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/submit-reuse.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/symlink.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/sync-cancel.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/teardowns.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/thread-exit.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/timeout-new.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/timeout.c216
-rw-r--r--contrib/libs/liburing/test/timeout.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/truncate.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/tty-write-dpoll.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/unlink.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/uring_cmd_ublk.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/version.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/wait-timeout.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/waitid.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/wakeup-hang.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/wq-aff.t/ya.make2
-rw-r--r--contrib/libs/liburing/test/xattr.t/ya.make2
-rw-r--r--contrib/libs/liburing/ya.make9
232 files changed, 2927 insertions, 393 deletions
diff --git a/contrib/libs/liburing/.yandex_meta/devtools.licenses.report b/contrib/libs/liburing/.yandex_meta/devtools.licenses.report
index 5677bdabba..be82063881 100644
--- a/contrib/libs/liburing/.yandex_meta/devtools.licenses.report
+++ b/contrib/libs/liburing/.yandex_meta/devtools.licenses.report
@@ -52,21 +52,21 @@ BELONGS ya.make
Match type : REFERENCE
Links : https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown-license-reference.LICENSE
Files with this license:
- README [103:103]
+ README [108:108]
Scancode info:
Original SPDX id: GPL-1.0-or-later
Score : 50.00
Match type : REFERENCE
Links : http://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html, https://spdx.org/licenses/GPL-1.0-or-later
Files with this license:
- README [103:103]
+ README [108:108]
Scancode info:
Original SPDX id: Linux-syscall-note
Score : 50.00
Match type : REFERENCE
Links : https://spdx.org/licenses/Linux-syscall-note
Files with this license:
- README [103:103]
+ README [108:108]
KEEP MIT 1eaf467c6d00edd4a5876ad437b67edf
BELONGS ya.make
@@ -151,6 +151,7 @@ BELONGS ya.make
test/fd-pass.c [2:2]
test/fdinfo.c [2:2]
test/fifo-nonblock-read.c [2:2]
+ test/file-exit-unreg.c [2:2]
test/file-register.c [2:2]
test/file-update.c [2:2]
test/file-verify.c [2:2]
@@ -221,6 +222,7 @@ BELONGS ya.make
test/pollfree.c [2:2]
test/probe.c [2:2]
test/read-before-exit.c [2:2]
+ test/read-inc-file.c [2:2]
test/read-mshot-empty.c [2:2]
test/read-mshot-stdin.c [2:2]
test/read-mshot.c [2:2]
@@ -232,10 +234,12 @@ BELONGS ya.make
test/reg-fd-only.c [2:2]
test/reg-hint.c [2:2]
test/reg-reg-ring.c [2:2]
+ test/reg-wait.c [2:2]
test/regbuf-clone.c [2:2]
test/regbuf-merge.c [2:2]
test/register-restrictions.c [2:2]
test/rename.c [2:2]
+ test/resize-rings.c [2:2]
test/ring-leak.c [2:2]
test/ring-leak2.c [2:2]
test/ringbuf-read.c [2:2]
@@ -254,6 +258,7 @@ BELONGS ya.make
test/skip-cqe.c [2:2]
test/socket-getsetsock-cmd.c [2:2]
test/socket-io-cmd.c [2:2]
+ test/socket-nb.c [2:2]
test/socket-rw-eagain.c [2:2]
test/socket-rw-offset.c [2:2]
test/socket-rw.c [2:2]
@@ -364,7 +369,7 @@ BELONGS ya.make
KEEP "(GPL-2.0-only WITH Linux-syscall-note OR MIT)" 9566044df50ee1c37e39ed99e7926750
BELONGS ya.make
-FILE_INCLUDE COPYING.GPL found in files: README at line 104
+FILE_INCLUDE COPYING.GPL found in files: README at line 109
License text:
COPYING.GPL and <https://spdx.org/licenses/Linux-syscall-note.html>.
Scancode info:
@@ -373,14 +378,14 @@ FILE_INCLUDE COPYING.GPL found in files: README at line 104
Match type : REFERENCE
Links : http://www.gnu.org/licenses/old-licenses/gpl-1.0-standalone.html, https://spdx.org/licenses/GPL-1.0-or-later
Files with this license:
- README [104:104]
+ README [109:109]
Scancode info:
Original SPDX id: Linux-syscall-note
Score : 95.00
Match type : REFERENCE
Links : https://spdx.org/licenses/Linux-syscall-note
Files with this license:
- README [104:104]
+ README [109:109]
KEEP "(LGPL-2.1-only OR MIT)" 9d1d95673c01a94e06648bf72ecda12d
BELONGS ya.make
@@ -409,11 +414,11 @@ BELONGS ya.make
Match type : REFERENCE
Links : https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown-license-reference.LICENSE
Files with this license:
- README [101:101]
+ README [106:106]
Scancode info:
Original SPDX id: LGPL-2.0-or-later
Score : 75.00
Match type : REFERENCE
Links : http://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html, http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html, https://spdx.org/licenses/LGPL-2.0-or-later
Files with this license:
- README [101:101]
+ README [106:106]
diff --git a/contrib/libs/liburing/.yandex_meta/override.nix b/contrib/libs/liburing/.yandex_meta/override.nix
index 7118b3c759..c52484fc13 100644
--- a/contrib/libs/liburing/.yandex_meta/override.nix
+++ b/contrib/libs/liburing/.yandex_meta/override.nix
@@ -1,12 +1,12 @@
pkgs: attrs: with pkgs; with attrs; rec {
name = "liburing";
- version = "2.8";
+ version = "2.9";
src = fetchFromGitHub {
owner = "axboe";
repo = "liburing";
rev = "liburing-${version}";
- hash = "sha256-10zmoMDzO41oNRVXE/6FzDGPVRVJTJTARVUmc1b7f+o=";
+ hash = "sha256-zOC53i52YJsH3AQIy4afjTGlX/IvVnW2QnYOppFxKiI=";
};
buildPhase = ''
diff --git a/contrib/libs/liburing/CHANGELOG b/contrib/libs/liburing/CHANGELOG
index ca1056ed4f..ce8015f22d 100644
--- a/contrib/libs/liburing/CHANGELOG
+++ b/contrib/libs/liburing/CHANGELOG
@@ -1,4 +1,14 @@
+liburing-2.9 release
+
+- Add support for ring resizing
+- Add support for registered waits
+- Test additions and improvements
+- Fix bug with certain ring setups with SQE128 set not fully closing
+ the ring after io_uring_queue_exit(3) had been called.
+- Various man page fixes and updates
+
liburing-2.8 release
+
- Add support for incrementally/partially consumed provided buffers,
usable with the provided buffer ring support.
- Add support for foo_and_wait_min_timeout(), where it's possible to
diff --git a/contrib/libs/liburing/README b/contrib/libs/liburing/README
index 3e41a8f78d..e14fed890c 100644
--- a/contrib/libs/liburing/README
+++ b/contrib/libs/liburing/README
@@ -64,6 +64,11 @@ Building liburing
make -j$(nproc);
#
+ # Build liburing.pc
+ #
+ make liburing.pc
+
+ #
# Install liburing (headers, shared/static libs, and manpage).
#
sudo make install;
diff --git a/contrib/libs/liburing/src/include/liburing.h b/contrib/libs/liburing/src/include/liburing.h
index 6eae138975..49b4edf437 100644
--- a/contrib/libs/liburing/src/include/liburing.h
+++ b/contrib/libs/liburing/src/include/liburing.h
@@ -196,7 +196,16 @@ int io_uring_submit_and_wait_min_timeout(struct io_uring *ring,
struct __kernel_timespec *ts,
unsigned min_wait,
sigset_t *sigmask);
-
+int io_uring_submit_and_wait_reg(struct io_uring *ring,
+ struct io_uring_cqe **cqe_ptr, unsigned wait_nr,
+ int reg_index);
+
+int io_uring_register_wait_reg(struct io_uring *ring,
+ struct io_uring_reg_wait *reg, int nr);
+int io_uring_resize_rings(struct io_uring *ring, struct io_uring_params *p);
+int io_uring_clone_buffers_offset(struct io_uring *dst, struct io_uring *src,
+ unsigned int dst_off, unsigned int src_off,
+ unsigned int nr, unsigned int flags);
int io_uring_clone_buffers(struct io_uring *dst, struct io_uring *src);
int io_uring_register_buffers(struct io_uring *ring, const struct iovec *iovecs,
unsigned nr_iovecs);
@@ -276,6 +285,12 @@ int io_uring_register(unsigned int fd, unsigned int opcode, const void *arg,
unsigned int nr_args);
/*
+ * Mapped/registered regions
+ */
+int io_uring_register_region(struct io_uring *ring,
+ struct io_uring_mem_region_reg *reg);
+
+/*
* Mapped buffer ring alloc/register + unregister/free helpers
*/
struct io_uring_buf_ring *io_uring_setup_buf_ring(struct io_uring *ring,
@@ -394,6 +409,12 @@ IOURINGINLINE void io_uring_sqe_set_flags(struct io_uring_sqe *sqe,
sqe->flags = (__u8) flags;
}
+IOURINGINLINE void io_uring_sqe_set_buf_group(struct io_uring_sqe *sqe,
+ int bgid)
+{
+ sqe->buf_group = (__u16) bgid;
+}
+
IOURINGINLINE void __io_uring_set_target_fixed_file(struct io_uring_sqe *sqe,
unsigned int file_index)
{
diff --git a/contrib/libs/liburing/src/include/liburing/io_uring.h b/contrib/libs/liburing/src/include/liburing/io_uring.h
index 4ac13f7327..765919883c 100644
--- a/contrib/libs/liburing/src/include/liburing/io_uring.h
+++ b/contrib/libs/liburing/src/include/liburing/io_uring.h
@@ -200,6 +200,9 @@ enum io_uring_sqe_flags_bit {
*/
#define IORING_SETUP_NO_SQARRAY (1U << 16)
+/* Use hybrid poll in iopoll process */
+#define IORING_SETUP_HYBRID_IOPOLL (1U << 17)
+
enum io_uring_op {
IORING_OP_NOP,
IORING_OP_READV,
@@ -518,6 +521,7 @@ struct io_cqring_offsets {
#define IORING_ENTER_EXT_ARG (1U << 3)
#define IORING_ENTER_REGISTERED_RING (1U << 4)
#define IORING_ENTER_ABS_TIMER (1U << 5)
+#define IORING_ENTER_EXT_ARG_REG (1U << 6)
/*
* Passed in for io_uring_setup(2). Copied back with updated info on success
@@ -612,6 +616,10 @@ enum io_uring_register_op {
/* clone registered buffers from source ring to current ring */
IORING_REGISTER_CLONE_BUFFERS = 30,
+ IORING_REGISTER_RESIZE_RINGS = 33,
+
+ IORING_REGISTER_MEM_REGION = 34,
+
/* this goes last */
IORING_REGISTER_LAST,
@@ -632,6 +640,31 @@ struct io_uring_files_update {
__aligned_u64 /* __s32 * */ fds;
};
+enum {
+ /* initialise with user provided memory pointed by user_addr */
+ IORING_MEM_REGION_TYPE_USER = 1,
+};
+
+struct io_uring_region_desc {
+ __u64 user_addr;
+ __u64 size;
+ __u32 flags;
+ __u32 id;
+ __u64 mmap_offset;
+ __u64 __resv[4];
+};
+
+enum {
+ /* expose the region as registered wait arguments */
+ IORING_MEM_REGION_REG_WAIT_ARG = 1,
+};
+
+struct io_uring_mem_region_reg {
+ __u64 region_uptr; /* struct io_uring_region_desc * */
+ __u64 flags;
+ __u64 __resv[2];
+};
+
/*
* Register a fully sparse file space, rather than pass in an array of all
* -1 file descriptors.
@@ -698,13 +731,17 @@ struct io_uring_clock_register {
};
enum {
- IORING_REGISTER_SRC_REGISTERED = 1,
+ IORING_REGISTER_SRC_REGISTERED = (1U << 0),
+ IORING_REGISTER_DST_REPLACE = (1U << 1),
};
struct io_uring_clone_buffers {
__u32 src_fd;
__u32 flags;
- __u32 pad[6];
+ __u32 src_off;
+ __u32 dst_off;
+ __u32 nr;
+ __u32 pad[3];
};
struct io_uring_buf {
@@ -795,6 +832,43 @@ enum io_uring_register_restriction_op {
IORING_RESTRICTION_LAST
};
+enum {
+ IORING_REG_WAIT_TS = (1U << 0),
+};
+
+/*
+ * Argument for IORING_REGISTER_CQWAIT_REG, registering a region of
+ * struct io_uring_reg_wait that can be indexed when io_uring_enter(2) is
+ * called rather than pass in a wait argument structure separately.
+ */
+struct io_uring_cqwait_reg_arg {
+ __u32 flags;
+ __u32 struct_size;
+ __u32 nr_entries;
+ __u32 pad;
+ __u64 user_addr;
+ __u64 pad2[3];
+};
+
+/*
+ * Argument for io_uring_enter(2) with
+ * IORING_GETEVENTS | IORING_ENTER_EXT_ARG_REG set, where the actual argument
+ * is an index into a previously registered fixed wait region described by
+ * the below structure.
+ */
+struct io_uring_reg_wait {
+ struct __kernel_timespec ts;
+ __u32 min_wait_usec;
+ __u32 flags;
+ __u64 sigmask;
+ __u32 sigmask_sz;
+ __u32 pad[3];
+ __u64 pad2[2];
+};
+
+/*
+ * Argument for io_uring_enter(2) with IORING_GETEVENTS | IORING_ENTER_EXT_ARG
+ */
struct io_uring_getevents_arg {
__u64 sigmask;
__u32 sigmask_sz;
diff --git a/contrib/libs/liburing/src/include/liburing/io_uring_version.h b/contrib/libs/liburing/src/include/liburing/io_uring_version.h
index 6705e52610..f31d92539f 100644
--- a/contrib/libs/liburing/src/include/liburing/io_uring_version.h
+++ b/contrib/libs/liburing/src/include/liburing/io_uring_version.h
@@ -3,6 +3,6 @@
#define LIBURING_VERSION_H
#define IO_URING_VERSION_MAJOR 2
-#define IO_URING_VERSION_MINOR 8
+#define IO_URING_VERSION_MINOR 9
#endif
diff --git a/contrib/libs/liburing/src/liburing.map b/contrib/libs/liburing/src/liburing.map
deleted file mode 100644
index c13cd36ece..0000000000
--- a/contrib/libs/liburing/src/liburing.map
+++ /dev/null
@@ -1,105 +0,0 @@
-LIBURING_2.0 {
- global:
- io_uring_get_probe;
- io_uring_get_probe_ring;
- io_uring_free_probe;
- io_uring_get_sqe;
- io_uring_peek_batch_cqe;
- io_uring_queue_exit;
- io_uring_queue_init;
- io_uring_queue_init_params;
- io_uring_queue_mmap;
- io_uring_register_buffers;
- io_uring_register_eventfd;
- io_uring_register_eventfd_async;
- io_uring_register_files;
- io_uring_register_files_update;
- io_uring_register_personality;
- io_uring_register_probe;
- io_uring_ring_dontfork;
- io_uring_submit;
- io_uring_submit_and_wait;
- io_uring_unregister_buffers;
- io_uring_unregister_eventfd;
- io_uring_unregister_files;
- io_uring_unregister_personality;
- io_uring_wait_cqe_timeout;
- io_uring_wait_cqes;
-
- __io_uring_get_cqe;
- __io_uring_sqring_wait;
- local:
- *;
-};
-
-LIBURING_2.1 {
- global:
- io_uring_mlock_size_params;
- io_uring_mlock_size;
- io_uring_register_buffers_tags;
- io_uring_register_buffers_update_tag;
- io_uring_register_files_tags;
- io_uring_register_files_update_tag;
- io_uring_register_iowq_aff;
- io_uring_unregister_iowq_aff;
- io_uring_register_iowq_max_workers;
-} LIBURING_2.0;
-
-LIBURING_2.2 {
- global:
- io_uring_submit_and_wait_timeout;
- io_uring_register_ring_fd;
- io_uring_unregister_ring_fd;
- io_uring_register_files_sparse;
- io_uring_register_buffers_sparse;
- io_uring_register_buf_ring;
- io_uring_unregister_buf_ring;
-} LIBURING_2.1;
-
-LIBURING_2.3 {
- global:
- io_uring_register_sync_cancel;
- io_uring_register_file_alloc_range;
- io_uring_enter;
- io_uring_enter2;
- io_uring_setup;
- io_uring_register;
- io_uring_get_events;
- io_uring_submit_and_get_events;
-} LIBURING_2.2;
-
-LIBURING_2.4 {
- global:
- io_uring_major_version;
- io_uring_minor_version;
- io_uring_check_version;
-
- io_uring_close_ring_fd;
- io_uring_enable_rings;
- io_uring_register_restrictions;
- io_uring_setup_buf_ring;
- io_uring_free_buf_ring;
-} LIBURING_2.3;
-
-LIBURING_2.5 {
- global:
- io_uring_queue_init_mem;
-} LIBURING_2.4;
-
-LIBURING_2.6 {
- global:
- io_uring_buf_ring_head;
- io_uring_register_napi;
- io_uring_unregister_napi;
-} LIBURING_2.5;
-
-LIBURING_2.7 {
-} LIBURING_2.6;
-
-LIBURING_2.8 {
- global:
- io_uring_register_clock;
- io_uring_submit_and_wait_min_timeout;
- io_uring_wait_cqes_min_timeout;
- io_uring_clone_buffers;
-} LIBURING_2.7;
diff --git a/contrib/libs/liburing/src/queue.c b/contrib/libs/liburing/src/queue.c
index 6e855a2d3d..835815d7e0 100644
--- a/contrib/libs/liburing/src/queue.c
+++ b/contrib/libs/liburing/src/queue.c
@@ -7,7 +7,6 @@
#include "liburing.h"
#include "int_flags.h"
#include "liburing/sanitize.h"
-#include "liburing/compat.h"
#include "liburing/io_uring.h"
/*
@@ -322,6 +321,28 @@ int io_uring_wait_cqes_min_timeout(struct io_uring *ring,
sigmask);
}
+int io_uring_submit_and_wait_reg(struct io_uring *ring,
+ struct io_uring_cqe **cqe_ptr,
+ unsigned wait_nr, int reg_index)
+{
+ unsigned long offset = reg_index * sizeof(struct io_uring_reg_wait);
+
+ struct get_data data = {
+ .submit = __io_uring_flush_sq(ring),
+ .wait_nr = wait_nr,
+ .get_flags = IORING_ENTER_EXT_ARG |
+ IORING_ENTER_EXT_ARG_REG,
+ .sz = sizeof(struct io_uring_reg_wait),
+ .has_ts = true,
+ .arg = (void *) (uintptr_t) offset,
+ };
+
+ if (!(ring->features & IORING_FEAT_EXT_ARG))
+ return -EINVAL;
+
+ return _io_uring_get_cqe(ring, cqe_ptr, &data);
+}
+
static int __io_uring_submit_and_wait_timeout(struct io_uring *ring,
struct io_uring_cqe **cqe_ptr, unsigned wait_nr,
struct __kernel_timespec *ts,
diff --git a/contrib/libs/liburing/src/register.c b/contrib/libs/liburing/src/register.c
index c215da7f21..7ee92adb06 100644
--- a/contrib/libs/liburing/src/register.c
+++ b/contrib/libs/liburing/src/register.c
@@ -5,8 +5,8 @@
#include "lib.h"
#include "syscall.h"
#include "liburing.h"
+#include "setup.h"
#include "int_flags.h"
-#include "liburing/compat.h"
#include "liburing/io_uring.h"
#include "liburing/sanitize.h"
@@ -396,16 +396,84 @@ int io_uring_register_clock(struct io_uring *ring,
return do_register(ring, IORING_REGISTER_CLOCK, arg, 0);
}
-int io_uring_clone_buffers(struct io_uring *dst, struct io_uring *src)
+int io_uring_clone_buffers_offset(struct io_uring *dst, struct io_uring *src,
+ unsigned int dst_off, unsigned int src_off,
+ unsigned int nr, unsigned int flags)
{
- struct io_uring_clone_buffers buf = { .src_fd = src->ring_fd, };
+ struct io_uring_clone_buffers buf = {
+ .src_fd = src->ring_fd,
+ .flags = flags,
+ .src_off = src_off,
+ .dst_off = dst_off,
+ .nr = nr,
+ };
if (src->int_flags & INT_FLAG_REG_REG_RING) {
buf.src_fd = src->enter_ring_fd;
- buf.flags = IORING_REGISTER_SRC_REGISTERED;
+ buf.flags |= IORING_REGISTER_SRC_REGISTERED;
} else {
buf.src_fd = src->ring_fd;
}
return do_register(dst, IORING_REGISTER_CLONE_BUFFERS, &buf, 1);
}
+
+int io_uring_clone_buffers(struct io_uring *dst, struct io_uring *src)
+{
+ return io_uring_clone_buffers_offset(dst, src, 0, 0, 0, 0);
+}
+
+int io_uring_resize_rings(struct io_uring *ring, struct io_uring_params *p)
+{
+ unsigned sq_head, sq_tail;
+ int ret;
+
+ if (ring->flags & IORING_SETUP_NO_MMAP)
+ return -EINVAL;
+
+ memset(&p->sq_off, 0, sizeof(p->sq_off));
+ memset(&p->cq_off, 0, sizeof(p->cq_off));
+
+ ret = do_register(ring, IORING_REGISTER_RESIZE_RINGS, p, 1);
+ if (ret < 0)
+ goto out;
+
+ sq_head = ring->sq.sqe_head;
+ sq_tail = ring->sq.sqe_tail;
+ io_uring_unmap_rings(&ring->sq, &ring->cq);
+ memset(&ring->sq, 0, sizeof(ring->sq));
+ memset(&ring->cq, 0, sizeof(ring->cq));
+ ret = io_uring_mmap(ring->ring_fd, p, &ring->sq, &ring->cq);
+ if (ret)
+ goto out;
+
+ ring->sq.sqe_head = sq_head;
+ ring->sq.sqe_tail = sq_tail;
+
+ /*
+ * Directly map SQ slots to SQEs
+ */
+ if (!(p->flags & IORING_SETUP_NO_SQARRAY)) {
+ unsigned index;
+
+ for (index = 0; index < p->sq_entries; index++)
+ ring->sq.array[index] = index;
+ }
+
+ /* clear for next use */
+out:
+ p->flags = 0;
+ return ret;
+}
+
+int io_uring_register_wait_reg(struct io_uring *ring,
+ struct io_uring_reg_wait *reg, int nr)
+{
+ return -EINVAL;
+}
+
+int io_uring_register_region(struct io_uring *ring,
+ struct io_uring_mem_region_reg *reg)
+{
+ return do_register(ring, IORING_REGISTER_MEM_REGION, reg, 1);
+}
diff --git a/contrib/libs/liburing/src/setup.c b/contrib/libs/liburing/src/setup.c
index fef92dbd48..de7ef44d5f 100644
--- a/contrib/libs/liburing/src/setup.c
+++ b/contrib/libs/liburing/src/setup.c
@@ -7,7 +7,6 @@
#include "liburing.h"
#include "int_flags.h"
#include "setup.h"
-#include "liburing/compat.h"
#include "liburing/io_uring.h"
#define KERN_MAX_ENTRIES 32768
@@ -60,7 +59,7 @@ static int get_sq_cq_entries(unsigned entries, struct io_uring_params *p,
return 0;
}
-static void io_uring_unmap_rings(struct io_uring_sq *sq, struct io_uring_cq *cq)
+void io_uring_unmap_rings(struct io_uring_sq *sq, struct io_uring_cq *cq)
{
if (sq->ring_sz)
__sys_munmap(sq->ring_ptr, sq->ring_sz);
@@ -68,9 +67,9 @@ static void io_uring_unmap_rings(struct io_uring_sq *sq, struct io_uring_cq *cq)
__sys_munmap(cq->ring_ptr, cq->ring_sz);
}
-static void io_uring_setup_ring_pointers(struct io_uring_params *p,
- struct io_uring_sq *sq,
- struct io_uring_cq *cq)
+void io_uring_setup_ring_pointers(struct io_uring_params *p,
+ struct io_uring_sq *sq,
+ struct io_uring_cq *cq)
{
sq->khead = sq->ring_ptr + p->sq_off.head;
sq->ktail = sq->ring_ptr + p->sq_off.tail;
@@ -96,8 +95,8 @@ static void io_uring_setup_ring_pointers(struct io_uring_params *p,
cq->ring_entries = *cq->kring_entries;
}
-static int io_uring_mmap(int fd, struct io_uring_params *p,
- struct io_uring_sq *sq, struct io_uring_cq *cq)
+int io_uring_mmap(int fd, struct io_uring_params *p, struct io_uring_sq *sq,
+ struct io_uring_cq *cq)
{
size_t size;
int ret;
@@ -211,7 +210,7 @@ static int io_uring_alloc_huge(unsigned entries, struct io_uring_params *p,
{
unsigned long page_size = get_page_size();
unsigned sq_entries, cq_entries;
- size_t ring_mem, sqes_mem, cqes_mem;
+ size_t ring_mem, sqes_mem, cqes_mem, sqe_size;
unsigned long mem_used = 0;
void *ptr;
int ret;
@@ -222,7 +221,10 @@ static int io_uring_alloc_huge(unsigned entries, struct io_uring_params *p,
ring_mem = KRING_SIZE;
- sqes_mem = sq_entries * sizeof(struct io_uring_sqe);
+ sqe_size = sizeof(struct io_uring_sqe);
+ if (p->flags & IORING_SETUP_SQE128)
+ sqe_size <<= 1;
+ sqes_mem = sq_entries * sqe_size;
if (!(p->flags & IORING_SETUP_NO_SQARRAY))
sqes_mem += sq_entries * sizeof(unsigned);
sqes_mem = (sqes_mem + page_size - 1) & ~(page_size - 1);
@@ -432,18 +434,17 @@ __cold void io_uring_queue_exit(struct io_uring *ring)
{
struct io_uring_sq *sq = &ring->sq;
struct io_uring_cq *cq = &ring->cq;
- size_t sqe_size;
+ size_t sqe_size = sizeof(struct io_uring_sqe);
+
+ if (ring->flags & IORING_SETUP_SQE128)
+ sqe_size <<= 1;
if (!sq->ring_sz && !(ring->int_flags & INT_FLAG_APP_MEM)) {
- sqe_size = sizeof(struct io_uring_sqe);
- if (ring->flags & IORING_SETUP_SQE128)
- sqe_size += 64;
__sys_munmap(sq->sqes, sqe_size * sq->ring_entries);
io_uring_unmap_rings(sq, cq);
} else {
if (!(ring->int_flags & INT_FLAG_APP_MEM)) {
- __sys_munmap(sq->sqes,
- *sq->kring_entries * sizeof(struct io_uring_sqe));
+ __sys_munmap(sq->sqes, *sq->kring_entries * sqe_size);
io_uring_unmap_rings(sq, cq);
}
}
diff --git a/contrib/libs/liburing/src/setup.h b/contrib/libs/liburing/src/setup.h
index ae44314cbe..5a18a7d829 100644
--- a/contrib/libs/liburing/src/setup.h
+++ b/contrib/libs/liburing/src/setup.h
@@ -5,5 +5,11 @@
int __io_uring_queue_init_params(unsigned entries, struct io_uring *ring,
struct io_uring_params *p, void *buf,
size_t buf_size);
+void io_uring_unmap_rings(struct io_uring_sq *sq, struct io_uring_cq *cq);
+int io_uring_mmap(int fd, struct io_uring_params *p, struct io_uring_sq *sq,
+ struct io_uring_cq *cq);
+void io_uring_setup_ring_pointers(struct io_uring_params *p,
+ struct io_uring_sq *sq,
+ struct io_uring_cq *cq);
#endif
diff --git a/contrib/libs/liburing/test/232c93d07b74.t/ya.make b/contrib/libs/liburing/test/232c93d07b74.t/ya.make
index c8a2631965..422052f469 100644
--- a/contrib/libs/liburing/test/232c93d07b74.t/ya.make
+++ b/contrib/libs/liburing/test/232c93d07b74.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/35fa71a030ca.t/ya.make b/contrib/libs/liburing/test/35fa71a030ca.t/ya.make
index 158d478ea4..b1766aa262 100644
--- a/contrib/libs/liburing/test/35fa71a030ca.t/ya.make
+++ b/contrib/libs/liburing/test/35fa71a030ca.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/500f9fbadef8.t/ya.make b/contrib/libs/liburing/test/500f9fbadef8.t/ya.make
index fd66f1bf0b..2d5a6eedb5 100644
--- a/contrib/libs/liburing/test/500f9fbadef8.t/ya.make
+++ b/contrib/libs/liburing/test/500f9fbadef8.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/7ad0e4b2f83c.t/ya.make b/contrib/libs/liburing/test/7ad0e4b2f83c.t/ya.make
index fc918253a0..f01d63b831 100644
--- a/contrib/libs/liburing/test/7ad0e4b2f83c.t/ya.make
+++ b/contrib/libs/liburing/test/7ad0e4b2f83c.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/8a9973408177.t/ya.make b/contrib/libs/liburing/test/8a9973408177.t/ya.make
index 8ebec8a2a8..6c56221497 100644
--- a/contrib/libs/liburing/test/8a9973408177.t/ya.make
+++ b/contrib/libs/liburing/test/8a9973408177.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/917257daa0fe.t/ya.make b/contrib/libs/liburing/test/917257daa0fe.t/ya.make
index cc31d0b3fe..54defc2340 100644
--- a/contrib/libs/liburing/test/917257daa0fe.t/ya.make
+++ b/contrib/libs/liburing/test/917257daa0fe.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/a0908ae19763.t/ya.make b/contrib/libs/liburing/test/a0908ae19763.t/ya.make
index 1d5a693e2b..681bcdc926 100644
--- a/contrib/libs/liburing/test/a0908ae19763.t/ya.make
+++ b/contrib/libs/liburing/test/a0908ae19763.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/a4c0b3decb33.t/ya.make b/contrib/libs/liburing/test/a4c0b3decb33.t/ya.make
index 176165931b..997d19a0de 100644
--- a/contrib/libs/liburing/test/a4c0b3decb33.t/ya.make
+++ b/contrib/libs/liburing/test/a4c0b3decb33.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/accept-link.t/ya.make b/contrib/libs/liburing/test/accept-link.t/ya.make
index e110bf5975..d2749bab9d 100644
--- a/contrib/libs/liburing/test/accept-link.t/ya.make
+++ b/contrib/libs/liburing/test/accept-link.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/accept-non-empty.t/ya.make b/contrib/libs/liburing/test/accept-non-empty.t/ya.make
index 27ec536d0d..4b976e8a39 100644
--- a/contrib/libs/liburing/test/accept-non-empty.t/ya.make
+++ b/contrib/libs/liburing/test/accept-non-empty.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/accept-reuse.t/ya.make b/contrib/libs/liburing/test/accept-reuse.t/ya.make
index d2ef8e2bd6..9dfbad15b4 100644
--- a/contrib/libs/liburing/test/accept-reuse.t/ya.make
+++ b/contrib/libs/liburing/test/accept-reuse.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/accept-test.t/ya.make b/contrib/libs/liburing/test/accept-test.t/ya.make
index 26bf93d787..3165f1a166 100644
--- a/contrib/libs/liburing/test/accept-test.t/ya.make
+++ b/contrib/libs/liburing/test/accept-test.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/accept.t/ya.make b/contrib/libs/liburing/test/accept.t/ya.make
index 294a2c4213..84adf5fdc0 100644
--- a/contrib/libs/liburing/test/accept.t/ya.make
+++ b/contrib/libs/liburing/test/accept.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/across-fork.t/ya.make b/contrib/libs/liburing/test/across-fork.t/ya.make
index c233f57ffb..3a82af02fc 100644
--- a/contrib/libs/liburing/test/across-fork.t/ya.make
+++ b/contrib/libs/liburing/test/across-fork.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/b19062a56726.t/ya.make b/contrib/libs/liburing/test/b19062a56726.t/ya.make
index 5b5cad9153..0996d8cfd6 100644
--- a/contrib/libs/liburing/test/b19062a56726.t/ya.make
+++ b/contrib/libs/liburing/test/b19062a56726.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/b5837bd5311d.t/ya.make b/contrib/libs/liburing/test/b5837bd5311d.t/ya.make
index 9e44b2fbcd..e182d8bfc7 100644
--- a/contrib/libs/liburing/test/b5837bd5311d.t/ya.make
+++ b/contrib/libs/liburing/test/b5837bd5311d.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/bind-listen.t/ya.make b/contrib/libs/liburing/test/bind-listen.t/ya.make
index 25e4ebe79e..b802a04495 100644
--- a/contrib/libs/liburing/test/bind-listen.t/ya.make
+++ b/contrib/libs/liburing/test/bind-listen.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/buf-ring-nommap.t/ya.make b/contrib/libs/liburing/test/buf-ring-nommap.t/ya.make
index 645e84c91d..772c82dc7f 100644
--- a/contrib/libs/liburing/test/buf-ring-nommap.t/ya.make
+++ b/contrib/libs/liburing/test/buf-ring-nommap.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/buf-ring-put.t/ya.make b/contrib/libs/liburing/test/buf-ring-put.t/ya.make
index 5dba623a0a..c697ca81f0 100644
--- a/contrib/libs/liburing/test/buf-ring-put.t/ya.make
+++ b/contrib/libs/liburing/test/buf-ring-put.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/buf-ring.t/ya.make b/contrib/libs/liburing/test/buf-ring.t/ya.make
index 131f914b8b..796cccdf4d 100644
--- a/contrib/libs/liburing/test/buf-ring.t/ya.make
+++ b/contrib/libs/liburing/test/buf-ring.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/ce593a6c480a.t/ya.make b/contrib/libs/liburing/test/ce593a6c480a.t/ya.make
index ecb3520c84..3487189b53 100644
--- a/contrib/libs/liburing/test/ce593a6c480a.t/ya.make
+++ b/contrib/libs/liburing/test/ce593a6c480a.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/close-opath.t/ya.make b/contrib/libs/liburing/test/close-opath.t/ya.make
index 71f3acf824..44c111b3b0 100644
--- a/contrib/libs/liburing/test/close-opath.t/ya.make
+++ b/contrib/libs/liburing/test/close-opath.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/cmd-discard.c b/contrib/libs/liburing/test/cmd-discard.c
index 864791754c..c4346521bc 100644
--- a/contrib/libs/liburing/test/cmd-discard.c
+++ b/contrib/libs/liburing/test/cmd-discard.c
@@ -200,6 +200,8 @@ static int basic_cmd_test(struct io_uring *ring, int op)
fd = open(filename, O_DIRECT | O_RDWR | O_EXCL);
if (fd < 0) {
+ if (errno == EINVAL || errno == EBUSY)
+ return T_EXIT_SKIP;
fprintf(stderr, "open failed %i\n", errno);
return T_EXIT_FAIL;
}
@@ -247,6 +249,8 @@ static int test_fail_edge_cases(struct io_uring *ring, int op)
fd = open(filename, O_DIRECT | O_RDWR | O_EXCL);
if (fd < 0) {
+ if (errno == EINVAL || errno == EBUSY)
+ return T_EXIT_SKIP;
fprintf(stderr, "open failed %i\n", errno);
return T_EXIT_FAIL;
}
@@ -301,6 +305,8 @@ static int test_rdonly(struct io_uring *ring, int op)
fd = open(filename, O_DIRECT | O_RDONLY | O_EXCL);
if (fd < 0) {
+ if (errno == EINVAL || errno == EBUSY)
+ return T_EXIT_SKIP;
fprintf(stderr, "open failed %i\n", errno);
return T_EXIT_FAIL;
}
@@ -314,6 +320,8 @@ static int test_rdonly(struct io_uring *ring, int op)
fd = open(filename, O_DIRECT | O_RDWR | O_EXCL);
if (fd < 0) {
+ if (errno == EINVAL || errno == EBUSY)
+ return T_EXIT_SKIP;
fprintf(stderr, "open failed %i\n", errno);
return T_EXIT_FAIL;
}
@@ -353,6 +361,8 @@ int main(int argc, char *argv[])
fd = open(filename, O_DIRECT | O_RDONLY | O_EXCL);
if (fd < 0) {
+ if (errno == EINVAL || errno == EBUSY)
+ return T_EXIT_SKIP;
fprintf(stderr, "open failed %i\n", errno);
return T_EXIT_FAIL;
}
@@ -395,29 +405,29 @@ int main(int argc, char *argv[])
if (!opcodes[cmd_op].test)
continue;
ret = basic_cmd_test(&ring, cmd_op);
- if (ret) {
- if (ret == T_EXIT_SKIP)
- continue;
-
+ if (ret == T_EXIT_FAIL) {
fprintf(stderr, "basic_cmd_test() failed, cmd %i\n",
cmd_op);
return T_EXIT_FAIL;
}
ret = test_rdonly(&ring, cmd_op);
- if (ret) {
+ if (ret == T_EXIT_FAIL) {
fprintf(stderr, "test_rdonly() failed, cmd %i\n",
cmd_op);
return T_EXIT_FAIL;
}
ret = test_fail_edge_cases(&ring, cmd_op);
- if (ret) {
+ if (ret == T_EXIT_FAIL) {
fprintf(stderr, "test_fail_edge_cases() failed, cmd %i\n",
cmd_op);
return T_EXIT_FAIL;
}
- fret = T_EXIT_PASS;
+ if (ret == T_EXIT_SKIP)
+ fret = T_EXIT_SKIP;
+ else
+ fret = T_EXIT_PASS;
}
io_uring_queue_exit(&ring);
diff --git a/contrib/libs/liburing/test/cmd-discard.t/ya.make b/contrib/libs/liburing/test/cmd-discard.t/ya.make
index 4c39cb59bd..fd6a317471 100644
--- a/contrib/libs/liburing/test/cmd-discard.t/ya.make
+++ b/contrib/libs/liburing/test/cmd-discard.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/connect-rep.t/ya.make b/contrib/libs/liburing/test/connect-rep.t/ya.make
index bed485eb58..160c3730cd 100644
--- a/contrib/libs/liburing/test/connect-rep.t/ya.make
+++ b/contrib/libs/liburing/test/connect-rep.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/connect.t/ya.make b/contrib/libs/liburing/test/connect.t/ya.make
index 761dfdedbc..24cc05b583 100644
--- a/contrib/libs/liburing/test/connect.t/ya.make
+++ b/contrib/libs/liburing/test/connect.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/coredump.t/ya.make b/contrib/libs/liburing/test/coredump.t/ya.make
index f4df921c4a..3335fa0eca 100644
--- a/contrib/libs/liburing/test/coredump.t/ya.make
+++ b/contrib/libs/liburing/test/coredump.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/cq-full.t/ya.make b/contrib/libs/liburing/test/cq-full.t/ya.make
index b968925073..7fbacf91c4 100644
--- a/contrib/libs/liburing/test/cq-full.t/ya.make
+++ b/contrib/libs/liburing/test/cq-full.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/cq-overflow.t/ya.make b/contrib/libs/liburing/test/cq-overflow.t/ya.make
index d1ef4cab6f..f557c2967a 100644
--- a/contrib/libs/liburing/test/cq-overflow.t/ya.make
+++ b/contrib/libs/liburing/test/cq-overflow.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/cq-peek-batch.t/ya.make b/contrib/libs/liburing/test/cq-peek-batch.t/ya.make
index ce3845ab9e..053be9bc6c 100644
--- a/contrib/libs/liburing/test/cq-peek-batch.t/ya.make
+++ b/contrib/libs/liburing/test/cq-peek-batch.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/cq-ready.t/ya.make b/contrib/libs/liburing/test/cq-ready.t/ya.make
index 02f8f754b8..3de761b77c 100644
--- a/contrib/libs/liburing/test/cq-ready.t/ya.make
+++ b/contrib/libs/liburing/test/cq-ready.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/cq-size.t/ya.make b/contrib/libs/liburing/test/cq-size.t/ya.make
index 199bddbcd3..74cd4bc659 100644
--- a/contrib/libs/liburing/test/cq-size.t/ya.make
+++ b/contrib/libs/liburing/test/cq-size.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/d4ae271dfaae.t/ya.make b/contrib/libs/liburing/test/d4ae271dfaae.t/ya.make
index 28e901964b..cf05dadbe2 100644
--- a/contrib/libs/liburing/test/d4ae271dfaae.t/ya.make
+++ b/contrib/libs/liburing/test/d4ae271dfaae.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/d77a67ed5f27.t/ya.make b/contrib/libs/liburing/test/d77a67ed5f27.t/ya.make
index 6e1723d53f..d727fcd42a 100644
--- a/contrib/libs/liburing/test/d77a67ed5f27.t/ya.make
+++ b/contrib/libs/liburing/test/d77a67ed5f27.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/defer-taskrun.t/ya.make b/contrib/libs/liburing/test/defer-taskrun.t/ya.make
index 9ed40ffc04..0d82ea17ea 100644
--- a/contrib/libs/liburing/test/defer-taskrun.t/ya.make
+++ b/contrib/libs/liburing/test/defer-taskrun.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/defer-tw-timeout.t/ya.make b/contrib/libs/liburing/test/defer-tw-timeout.t/ya.make
index fd56a7f4b5..ad6a15d453 100644
--- a/contrib/libs/liburing/test/defer-tw-timeout.t/ya.make
+++ b/contrib/libs/liburing/test/defer-tw-timeout.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/defer.t/ya.make b/contrib/libs/liburing/test/defer.t/ya.make
index dd18ffdd04..8206b5eabd 100644
--- a/contrib/libs/liburing/test/defer.t/ya.make
+++ b/contrib/libs/liburing/test/defer.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/double-poll-crash.t/ya.make b/contrib/libs/liburing/test/double-poll-crash.t/ya.make
index d3480d8b17..aa7c476fc8 100644
--- a/contrib/libs/liburing/test/double-poll-crash.t/ya.make
+++ b/contrib/libs/liburing/test/double-poll-crash.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/drop-submit.t/ya.make b/contrib/libs/liburing/test/drop-submit.t/ya.make
index 829e75c6b7..a79011e3a4 100644
--- a/contrib/libs/liburing/test/drop-submit.t/ya.make
+++ b/contrib/libs/liburing/test/drop-submit.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/eeed8b54e0df.t/ya.make b/contrib/libs/liburing/test/eeed8b54e0df.t/ya.make
index 957ea0974b..50212266ea 100644
--- a/contrib/libs/liburing/test/eeed8b54e0df.t/ya.make
+++ b/contrib/libs/liburing/test/eeed8b54e0df.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/empty-eownerdead.t/ya.make b/contrib/libs/liburing/test/empty-eownerdead.t/ya.make
index 0a5793fc38..2e4327d769 100644
--- a/contrib/libs/liburing/test/empty-eownerdead.t/ya.make
+++ b/contrib/libs/liburing/test/empty-eownerdead.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/eploop.t/ya.make b/contrib/libs/liburing/test/eploop.t/ya.make
index 68badedcda..a3f2b7e5cb 100644
--- a/contrib/libs/liburing/test/eploop.t/ya.make
+++ b/contrib/libs/liburing/test/eploop.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/eventfd-disable.t/ya.make b/contrib/libs/liburing/test/eventfd-disable.t/ya.make
index c1a4ac6945..d19f348c6a 100644
--- a/contrib/libs/liburing/test/eventfd-disable.t/ya.make
+++ b/contrib/libs/liburing/test/eventfd-disable.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/eventfd-reg.t/ya.make b/contrib/libs/liburing/test/eventfd-reg.t/ya.make
index 8564f783bb..1632738753 100644
--- a/contrib/libs/liburing/test/eventfd-reg.t/ya.make
+++ b/contrib/libs/liburing/test/eventfd-reg.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/eventfd-ring.t/ya.make b/contrib/libs/liburing/test/eventfd-ring.t/ya.make
index fb4c4ffce2..da725a88c7 100644
--- a/contrib/libs/liburing/test/eventfd-ring.t/ya.make
+++ b/contrib/libs/liburing/test/eventfd-ring.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/eventfd.t/ya.make b/contrib/libs/liburing/test/eventfd.t/ya.make
index f8b1939032..a5427c014e 100644
--- a/contrib/libs/liburing/test/eventfd.t/ya.make
+++ b/contrib/libs/liburing/test/eventfd.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/evloop.t/ya.make b/contrib/libs/liburing/test/evloop.t/ya.make
index 084615c89e..17a236e335 100644
--- a/contrib/libs/liburing/test/evloop.t/ya.make
+++ b/contrib/libs/liburing/test/evloop.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/exec-target.t/ya.make b/contrib/libs/liburing/test/exec-target.t/ya.make
index bc92a41119..a25fa9820f 100644
--- a/contrib/libs/liburing/test/exec-target.t/ya.make
+++ b/contrib/libs/liburing/test/exec-target.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/exit-no-cleanup.t/ya.make b/contrib/libs/liburing/test/exit-no-cleanup.t/ya.make
index e068bc8fd0..b27f40a24e 100644
--- a/contrib/libs/liburing/test/exit-no-cleanup.t/ya.make
+++ b/contrib/libs/liburing/test/exit-no-cleanup.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fadvise.t/ya.make b/contrib/libs/liburing/test/fadvise.t/ya.make
index 38376037fd..b212fd3523 100644
--- a/contrib/libs/liburing/test/fadvise.t/ya.make
+++ b/contrib/libs/liburing/test/fadvise.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fallocate.c b/contrib/libs/liburing/test/fallocate.c
index cff01528fc..3ef155ee77 100644
--- a/contrib/libs/liburing/test/fallocate.c
+++ b/contrib/libs/liburing/test/fallocate.c
@@ -66,7 +66,7 @@ static int test_fallocate_rlimit(struct io_uring *ring)
goto err;
}
- if (cqe->res == -EINVAL) {
+ if (cqe->res == -EINVAL || cqe->res == -EOPNOTSUPP) {
fprintf(stdout, "Fallocate not supported, skipping\n");
no_fallocate = 1;
goto skip;
diff --git a/contrib/libs/liburing/test/fallocate.t/ya.make b/contrib/libs/liburing/test/fallocate.t/ya.make
index ecba017172..ea30ed68f8 100644
--- a/contrib/libs/liburing/test/fallocate.t/ya.make
+++ b/contrib/libs/liburing/test/fallocate.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fc2a85cb02ef.t/ya.make b/contrib/libs/liburing/test/fc2a85cb02ef.t/ya.make
index ab94c228da..1c2ee163ec 100644
--- a/contrib/libs/liburing/test/fc2a85cb02ef.t/ya.make
+++ b/contrib/libs/liburing/test/fc2a85cb02ef.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fd-install.t/ya.make b/contrib/libs/liburing/test/fd-install.t/ya.make
index 714c7d216c..af8af87826 100644
--- a/contrib/libs/liburing/test/fd-install.t/ya.make
+++ b/contrib/libs/liburing/test/fd-install.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fd-pass.t/ya.make b/contrib/libs/liburing/test/fd-pass.t/ya.make
index 913a1e7929..0e8b453973 100644
--- a/contrib/libs/liburing/test/fd-pass.t/ya.make
+++ b/contrib/libs/liburing/test/fd-pass.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fdinfo.t/ya.make b/contrib/libs/liburing/test/fdinfo.t/ya.make
index 6dc3cfe9e9..8e85e22188 100644
--- a/contrib/libs/liburing/test/fdinfo.t/ya.make
+++ b/contrib/libs/liburing/test/fdinfo.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fifo-nonblock-read.t/ya.make b/contrib/libs/liburing/test/fifo-nonblock-read.t/ya.make
index 497262e908..9642efdfdb 100644
--- a/contrib/libs/liburing/test/fifo-nonblock-read.t/ya.make
+++ b/contrib/libs/liburing/test/fifo-nonblock-read.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/file-exit-unreg.c b/contrib/libs/liburing/test/file-exit-unreg.c
new file mode 100644
index 0000000000..a24993c579
--- /dev/null
+++ b/contrib/libs/liburing/test/file-exit-unreg.c
@@ -0,0 +1,49 @@
+#include "../config-host.h"
+/* SPDX-License-Identifier: MIT */
+/*
+ * Description: test that a defer task_work file with tags unregistration
+ * doesn't trigger a lockdep violation
+ *
+ */
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "liburing.h"
+#include "helpers.h"
+
+int main(int argc, char *argv[])
+{
+ __u64 tags[2] = { 1, 2 };
+ struct io_uring ring;
+ int fds[2], ret;
+
+ if (argc > 1)
+ return T_EXIT_SKIP;
+
+ if (pipe(fds) < 0) {
+ perror("pipe");
+ return 1;
+ }
+
+ ret = io_uring_queue_init(4, &ring, IORING_SETUP_SINGLE_ISSUER|IORING_SETUP_DEFER_TASKRUN);
+ if (ret == -EINVAL) {
+ return T_EXIT_SKIP;
+ } else if (ret < 0) {
+ fprintf(stderr, "queue_init: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = io_uring_register_files_tags(&ring, fds, tags, 2);
+ if (ret == -EINVAL) {
+ return T_EXIT_SKIP;
+ } else if (ret < 0) {
+ fprintf(stderr, "file_register_init: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ io_uring_queue_exit(&ring);
+ sleep(1);
+ return 0;
+}
diff --git a/contrib/libs/liburing/test/file-exit-unreg.t/ya.make b/contrib/libs/liburing/test/file-exit-unreg.t/ya.make
new file mode 100644
index 0000000000..3a7dda0210
--- /dev/null
+++ b/contrib/libs/liburing/test/file-exit-unreg.t/ya.make
@@ -0,0 +1,35 @@
+# Generated by devtools/yamaker.
+
+PROGRAM()
+
+WITHOUT_LICENSE_TEXTS()
+
+VERSION(2.9)
+
+LICENSE(MIT)
+
+PEERDIR(
+ contrib/libs/liburing
+)
+
+ADDINCL(
+ contrib/libs/liburing/src/include
+)
+
+NO_COMPILER_WARNINGS()
+
+NO_RUNTIME()
+
+CFLAGS(
+ -DLIBURING_BUILD_TEST
+ -D__SANE_USERSPACE_TYPES__
+)
+
+SRCDIR(contrib/libs/liburing/test)
+
+SRCS(
+ file-exit-unreg.c
+ helpers.c
+)
+
+END()
diff --git a/contrib/libs/liburing/test/file-register.t/ya.make b/contrib/libs/liburing/test/file-register.t/ya.make
index 4961fbeb84..2a891968fc 100644
--- a/contrib/libs/liburing/test/file-register.t/ya.make
+++ b/contrib/libs/liburing/test/file-register.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/file-update.t/ya.make b/contrib/libs/liburing/test/file-update.t/ya.make
index 3c305603b6..4312a935d5 100644
--- a/contrib/libs/liburing/test/file-update.t/ya.make
+++ b/contrib/libs/liburing/test/file-update.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/file-verify.t/ya.make b/contrib/libs/liburing/test/file-verify.t/ya.make
index 0d3a52d017..470238c04a 100644
--- a/contrib/libs/liburing/test/file-verify.t/ya.make
+++ b/contrib/libs/liburing/test/file-verify.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/files-exit-hang-poll.t/ya.make b/contrib/libs/liburing/test/files-exit-hang-poll.t/ya.make
index 499443de7f..d8012004af 100644
--- a/contrib/libs/liburing/test/files-exit-hang-poll.t/ya.make
+++ b/contrib/libs/liburing/test/files-exit-hang-poll.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/files-exit-hang-timeout.t/ya.make b/contrib/libs/liburing/test/files-exit-hang-timeout.t/ya.make
index 96e4f2eb03..1562fce649 100644
--- a/contrib/libs/liburing/test/files-exit-hang-timeout.t/ya.make
+++ b/contrib/libs/liburing/test/files-exit-hang-timeout.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fixed-buf-iter.t/ya.make b/contrib/libs/liburing/test/fixed-buf-iter.t/ya.make
index bf3a2a7618..80721dca93 100644
--- a/contrib/libs/liburing/test/fixed-buf-iter.t/ya.make
+++ b/contrib/libs/liburing/test/fixed-buf-iter.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fixed-buf-merge.t/ya.make b/contrib/libs/liburing/test/fixed-buf-merge.t/ya.make
index ad58a01cf8..e5beda8f74 100644
--- a/contrib/libs/liburing/test/fixed-buf-merge.t/ya.make
+++ b/contrib/libs/liburing/test/fixed-buf-merge.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fixed-hugepage.t/ya.make b/contrib/libs/liburing/test/fixed-hugepage.t/ya.make
index ad560a9a58..1fdcb325bd 100644
--- a/contrib/libs/liburing/test/fixed-hugepage.t/ya.make
+++ b/contrib/libs/liburing/test/fixed-hugepage.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fixed-link.t/ya.make b/contrib/libs/liburing/test/fixed-link.t/ya.make
index 1e788313a8..5b04652770 100644
--- a/contrib/libs/liburing/test/fixed-link.t/ya.make
+++ b/contrib/libs/liburing/test/fixed-link.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fixed-reuse.t/ya.make b/contrib/libs/liburing/test/fixed-reuse.t/ya.make
index d0379a8966..a39524d5fa 100644
--- a/contrib/libs/liburing/test/fixed-reuse.t/ya.make
+++ b/contrib/libs/liburing/test/fixed-reuse.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fpos.t/ya.make b/contrib/libs/liburing/test/fpos.t/ya.make
index 2ad48f2c07..f804ff00bb 100644
--- a/contrib/libs/liburing/test/fpos.t/ya.make
+++ b/contrib/libs/liburing/test/fpos.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/fsync.t/ya.make b/contrib/libs/liburing/test/fsync.t/ya.make
index 5c383794b0..457436c387 100644
--- a/contrib/libs/liburing/test/fsync.t/ya.make
+++ b/contrib/libs/liburing/test/fsync.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/futex.t/ya.make b/contrib/libs/liburing/test/futex.t/ya.make
index 6dcd421f49..053aee21cb 100644
--- a/contrib/libs/liburing/test/futex.t/ya.make
+++ b/contrib/libs/liburing/test/futex.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/hardlink.t/ya.make b/contrib/libs/liburing/test/hardlink.t/ya.make
index 0c4c74ed38..164861108a 100644
--- a/contrib/libs/liburing/test/hardlink.t/ya.make
+++ b/contrib/libs/liburing/test/hardlink.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/ignore-single-mmap.t/ya.make b/contrib/libs/liburing/test/ignore-single-mmap.t/ya.make
index 82fc501ee6..ffb93a67e3 100644
--- a/contrib/libs/liburing/test/ignore-single-mmap.t/ya.make
+++ b/contrib/libs/liburing/test/ignore-single-mmap.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/init-mem.c b/contrib/libs/liburing/test/init-mem.c
index ad71e8278b..c899d74c99 100644
--- a/contrib/libs/liburing/test/init-mem.c
+++ b/contrib/libs/liburing/test/init-mem.c
@@ -42,6 +42,8 @@ static int setup_ctx(struct ctx *ctx, struct q_entries *q)
if (posix_memalign(&ctx->mem, 4096, 2*1024*1024))
return T_EXIT_FAIL;
+ memset(ctx->mem, 0, 2*1024*1024);
+
ctx->pre = ctx->mem + 4096 - sizeof(unsigned long long);
*ctx->pre = PRE_RED;
diff --git a/contrib/libs/liburing/test/init-mem.t/ya.make b/contrib/libs/liburing/test/init-mem.t/ya.make
index 0cd8d18352..a11542b38c 100644
--- a/contrib/libs/liburing/test/init-mem.t/ya.make
+++ b/contrib/libs/liburing/test/init-mem.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/io-cancel.t/ya.make b/contrib/libs/liburing/test/io-cancel.t/ya.make
index ef2974bef4..ee8a27360d 100644
--- a/contrib/libs/liburing/test/io-cancel.t/ya.make
+++ b/contrib/libs/liburing/test/io-cancel.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/io_uring_enter.t/ya.make b/contrib/libs/liburing/test/io_uring_enter.t/ya.make
index ea11807c30..bb441b172b 100644
--- a/contrib/libs/liburing/test/io_uring_enter.t/ya.make
+++ b/contrib/libs/liburing/test/io_uring_enter.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/io_uring_passthrough.c b/contrib/libs/liburing/test/io_uring_passthrough.c
index e08b220d88..f217f1fd9d 100644
--- a/contrib/libs/liburing/test/io_uring_passthrough.c
+++ b/contrib/libs/liburing/test/io_uring_passthrough.c
@@ -255,7 +255,7 @@ err:
}
static int test_io(const char *file, int tc, int read, int sqthread,
- int fixed, int nonvec)
+ int fixed, int nonvec, int hybrid)
{
struct io_uring ring;
int ret, ring_flags = 0;
@@ -266,6 +266,9 @@ static int test_io(const char *file, int tc, int read, int sqthread,
if (sqthread)
ring_flags |= IORING_SETUP_SQPOLL;
+ if (hybrid)
+ ring_flags |= IORING_SETUP_IOPOLL | IORING_SETUP_HYBRID_IOPOLL;
+
ret = t_create_ring(64, &ring, ring_flags);
if (ret == T_SETUP_SKIP)
return 0;
@@ -450,18 +453,19 @@ int main(int argc, char *argv[])
vecs = t_create_buffers(BUFFERS, BS);
- for (i = 0; i < 16; i++) {
+ for (i = 0; i < 32; i++) {
int read = (i & 1) != 0;
int sqthread = (i & 2) != 0;
int fixed = (i & 4) != 0;
int nonvec = (i & 8) != 0;
+ int hybrid = (i & 16) != 0;
- ret = test_io(fname, i, read, sqthread, fixed, nonvec);
+ ret = test_io(fname, i, read, sqthread, fixed, nonvec, hybrid);
if (no_pt)
break;
if (ret) {
- fprintf(stderr, "test_io failed %d/%d/%d/%d\n",
- read, sqthread, fixed, nonvec);
+ fprintf(stderr, "test_io failed %d/%d/%d/%d/%d\n",
+ read, sqthread, fixed, nonvec, hybrid);
goto err;
}
}
diff --git a/contrib/libs/liburing/test/io_uring_passthrough.t/ya.make b/contrib/libs/liburing/test/io_uring_passthrough.t/ya.make
index 5e3b4fc961..347d3851a3 100644
--- a/contrib/libs/liburing/test/io_uring_passthrough.t/ya.make
+++ b/contrib/libs/liburing/test/io_uring_passthrough.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/io_uring_register.t/ya.make b/contrib/libs/liburing/test/io_uring_register.t/ya.make
index ab97e7faba..38186beaed 100644
--- a/contrib/libs/liburing/test/io_uring_register.t/ya.make
+++ b/contrib/libs/liburing/test/io_uring_register.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/io_uring_setup.t/ya.make b/contrib/libs/liburing/test/io_uring_setup.t/ya.make
index 04d49debbc..36ca80d764 100644
--- a/contrib/libs/liburing/test/io_uring_setup.t/ya.make
+++ b/contrib/libs/liburing/test/io_uring_setup.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/iopoll-leak.t/ya.make b/contrib/libs/liburing/test/iopoll-leak.t/ya.make
index 6d067a1f63..643d98913c 100644
--- a/contrib/libs/liburing/test/iopoll-leak.t/ya.make
+++ b/contrib/libs/liburing/test/iopoll-leak.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/iopoll-overflow.t/ya.make b/contrib/libs/liburing/test/iopoll-overflow.t/ya.make
index f363fa5cb2..613e922390 100644
--- a/contrib/libs/liburing/test/iopoll-overflow.t/ya.make
+++ b/contrib/libs/liburing/test/iopoll-overflow.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/iopoll.c b/contrib/libs/liburing/test/iopoll.c
index 6de0e9b78b..d5cd3a10c6 100644
--- a/contrib/libs/liburing/test/iopoll.c
+++ b/contrib/libs/liburing/test/iopoll.c
@@ -24,6 +24,7 @@
static struct iovec *vecs;
static int no_buf_select;
static int no_iopoll;
+static int no_hybrid;
static int provide_buffers(struct io_uring *ring)
{
@@ -352,7 +353,7 @@ ok:
}
static int test_io(const char *file, int write, int sqthread, int fixed,
- int buf_select, int defer)
+ int hybrid, int buf_select, int defer)
{
struct io_uring ring;
int ret, ring_flags = IORING_SETUP_IOPOLL;
@@ -364,10 +365,18 @@ static int test_io(const char *file, int write, int sqthread, int fixed,
ring_flags |= IORING_SETUP_SINGLE_ISSUER |
IORING_SETUP_DEFER_TASKRUN;
+ if (hybrid)
+ ring_flags |= IORING_SETUP_HYBRID_IOPOLL;
+
ret = t_create_ring(64, &ring, ring_flags);
- if (ret == T_SETUP_SKIP)
+ if (ret == T_SETUP_SKIP) {
return 0;
+ }
if (ret != T_SETUP_OK) {
+ if (ring_flags & IORING_SETUP_HYBRID_IOPOLL) {
+ no_hybrid = 1;
+ return 0;
+ }
fprintf(stderr, "ring create failed: %d\n", ret);
return 1;
}
@@ -419,22 +428,23 @@ int main(int argc, char *argv[])
vecs = t_create_buffers(BUFFERS, BS);
- nr = 32;
+ nr = 64;
if (no_buf_select)
- nr = 8;
- else if (!t_probe_defer_taskrun())
nr = 16;
+ else if (!t_probe_defer_taskrun())
+ nr = 32;
for (i = 0; i < nr; i++) {
int write = (i & 1) != 0;
int sqthread = (i & 2) != 0;
int fixed = (i & 4) != 0;
- int buf_select = (i & 8) != 0;
- int defer = (i & 16) != 0;
+ int hybrid = (i & 8) != 0;
+ int buf_select = (i & 16) != 0;
+ int defer = (i & 32) != 0;
- ret = test_io(fname, write, sqthread, fixed, buf_select, defer);
+ ret = test_io(fname, write, sqthread, fixed, hybrid, buf_select, defer);
if (ret) {
- fprintf(stderr, "test_io failed %d/%d/%d/%d/%d\n",
- write, sqthread, fixed, buf_select, defer);
+ fprintf(stderr, "test_io failed %d/%d/%d/%d/%d/%d\n",
+ write, sqthread, fixed, hybrid, buf_select, defer);
goto err;
}
if (no_iopoll)
diff --git a/contrib/libs/liburing/test/iopoll.t/ya.make b/contrib/libs/liburing/test/iopoll.t/ya.make
index dadb9691e0..3c1a4085b7 100644
--- a/contrib/libs/liburing/test/iopoll.t/ya.make
+++ b/contrib/libs/liburing/test/iopoll.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/kallsyms.t/ya.make b/contrib/libs/liburing/test/kallsyms.t/ya.make
index 03d83ab90c..1b7517d938 100644
--- a/contrib/libs/liburing/test/kallsyms.t/ya.make
+++ b/contrib/libs/liburing/test/kallsyms.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/lfs-openat-write.t/ya.make b/contrib/libs/liburing/test/lfs-openat-write.t/ya.make
index ce246ac97a..5d27e3943a 100644
--- a/contrib/libs/liburing/test/lfs-openat-write.t/ya.make
+++ b/contrib/libs/liburing/test/lfs-openat-write.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/lfs-openat.t/ya.make b/contrib/libs/liburing/test/lfs-openat.t/ya.make
index 1e110f9554..d4c65f5188 100644
--- a/contrib/libs/liburing/test/lfs-openat.t/ya.make
+++ b/contrib/libs/liburing/test/lfs-openat.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/link-timeout.t/ya.make b/contrib/libs/liburing/test/link-timeout.t/ya.make
index 947a3f1e2c..defbccb3a4 100644
--- a/contrib/libs/liburing/test/link-timeout.t/ya.make
+++ b/contrib/libs/liburing/test/link-timeout.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/link.t/ya.make b/contrib/libs/liburing/test/link.t/ya.make
index 783e8bed46..6740de042b 100644
--- a/contrib/libs/liburing/test/link.t/ya.make
+++ b/contrib/libs/liburing/test/link.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/link_drain.t/ya.make b/contrib/libs/liburing/test/link_drain.t/ya.make
index 3f1d96ca1a..ab9591b177 100644
--- a/contrib/libs/liburing/test/link_drain.t/ya.make
+++ b/contrib/libs/liburing/test/link_drain.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/linked-defer-close.t/ya.make b/contrib/libs/liburing/test/linked-defer-close.t/ya.make
index 810d4104ea..95d12c614d 100644
--- a/contrib/libs/liburing/test/linked-defer-close.t/ya.make
+++ b/contrib/libs/liburing/test/linked-defer-close.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/madvise.t/ya.make b/contrib/libs/liburing/test/madvise.t/ya.make
index d007a067eb..29cafef6fc 100644
--- a/contrib/libs/liburing/test/madvise.t/ya.make
+++ b/contrib/libs/liburing/test/madvise.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/min-timeout-wait.t/ya.make b/contrib/libs/liburing/test/min-timeout-wait.t/ya.make
index ec59ad065d..7d1a842661 100644
--- a/contrib/libs/liburing/test/min-timeout-wait.t/ya.make
+++ b/contrib/libs/liburing/test/min-timeout-wait.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/min-timeout.t/ya.make b/contrib/libs/liburing/test/min-timeout.t/ya.make
index 344cff1526..712d3e686d 100644
--- a/contrib/libs/liburing/test/min-timeout.t/ya.make
+++ b/contrib/libs/liburing/test/min-timeout.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/mkdir.t/ya.make b/contrib/libs/liburing/test/mkdir.t/ya.make
index 2c5a72cd17..cf561d4379 100644
--- a/contrib/libs/liburing/test/mkdir.t/ya.make
+++ b/contrib/libs/liburing/test/mkdir.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/msg-ring-fd.t/ya.make b/contrib/libs/liburing/test/msg-ring-fd.t/ya.make
index 103941320c..8f9684e286 100644
--- a/contrib/libs/liburing/test/msg-ring-fd.t/ya.make
+++ b/contrib/libs/liburing/test/msg-ring-fd.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/msg-ring-flags.t/ya.make b/contrib/libs/liburing/test/msg-ring-flags.t/ya.make
index 75337d35df..95a68ba345 100644
--- a/contrib/libs/liburing/test/msg-ring-flags.t/ya.make
+++ b/contrib/libs/liburing/test/msg-ring-flags.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/msg-ring-overflow.t/ya.make b/contrib/libs/liburing/test/msg-ring-overflow.t/ya.make
index b92b8004e9..4d3258903d 100644
--- a/contrib/libs/liburing/test/msg-ring-overflow.t/ya.make
+++ b/contrib/libs/liburing/test/msg-ring-overflow.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/msg-ring.t/ya.make b/contrib/libs/liburing/test/msg-ring.t/ya.make
index f2c1ed0c82..af52ecac27 100644
--- a/contrib/libs/liburing/test/msg-ring.t/ya.make
+++ b/contrib/libs/liburing/test/msg-ring.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/multicqes_drain.t/ya.make b/contrib/libs/liburing/test/multicqes_drain.t/ya.make
index 604fb73e84..e43adb14af 100644
--- a/contrib/libs/liburing/test/multicqes_drain.t/ya.make
+++ b/contrib/libs/liburing/test/multicqes_drain.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/napi-test.c b/contrib/libs/liburing/test/napi-test.c
index 00a7204618..23c38c5a06 100644
--- a/contrib/libs/liburing/test/napi-test.c
+++ b/contrib/libs/liburing/test/napi-test.c
@@ -148,7 +148,7 @@ static int receiver(int queue_flags)
io_uring_prep_recv(sqe, fd, buffer, BUF_SIZE, 0);
ret = io_uring_submit(&ring);
- if (ret != 1) {
+ if (ret < 0) {
fprintf(stderr, "io_uring_submit: %i\n", ret);
return 1;
}
diff --git a/contrib/libs/liburing/test/napi-test.t/ya.make b/contrib/libs/liburing/test/napi-test.t/ya.make
index dd4a327f04..1754456c93 100644
--- a/contrib/libs/liburing/test/napi-test.t/ya.make
+++ b/contrib/libs/liburing/test/napi-test.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/no-mmap-inval.c b/contrib/libs/liburing/test/no-mmap-inval.c
index 1d31688b27..535bce5ae3 100644
--- a/contrib/libs/liburing/test/no-mmap-inval.c
+++ b/contrib/libs/liburing/test/no-mmap-inval.c
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
p.cq_off.user_addr = (unsigned long long) (uintptr_t) addr;
ret = io_uring_queue_init_params(2, &ring, &p);
- if (ret == -EINVAL) {
+ if (ret == -EINVAL || ret == -ENOENT) {
/* kernel doesn't support SETUP_NO_MMAP */
free(addr);
return T_EXIT_SKIP;
diff --git a/contrib/libs/liburing/test/no-mmap-inval.t/ya.make b/contrib/libs/liburing/test/no-mmap-inval.t/ya.make
index 5b03396796..d0977411b5 100644
--- a/contrib/libs/liburing/test/no-mmap-inval.t/ya.make
+++ b/contrib/libs/liburing/test/no-mmap-inval.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/nolibc.t/ya.make b/contrib/libs/liburing/test/nolibc.t/ya.make
index 17806776d3..07e41cf0ac 100644
--- a/contrib/libs/liburing/test/nolibc.t/ya.make
+++ b/contrib/libs/liburing/test/nolibc.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/nop-all-sizes.t/ya.make b/contrib/libs/liburing/test/nop-all-sizes.t/ya.make
index 5b8e16ec68..034f965c09 100644
--- a/contrib/libs/liburing/test/nop-all-sizes.t/ya.make
+++ b/contrib/libs/liburing/test/nop-all-sizes.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/nop.t/ya.make b/contrib/libs/liburing/test/nop.t/ya.make
index 71170256b6..d688022b30 100644
--- a/contrib/libs/liburing/test/nop.t/ya.make
+++ b/contrib/libs/liburing/test/nop.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/ooo-file-unreg.t/ya.make b/contrib/libs/liburing/test/ooo-file-unreg.t/ya.make
index 1e28dabbaa..d0890d7325 100644
--- a/contrib/libs/liburing/test/ooo-file-unreg.t/ya.make
+++ b/contrib/libs/liburing/test/ooo-file-unreg.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/open-close.t/ya.make b/contrib/libs/liburing/test/open-close.t/ya.make
index 306ecf4323..f279feb03e 100644
--- a/contrib/libs/liburing/test/open-close.t/ya.make
+++ b/contrib/libs/liburing/test/open-close.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/open-direct-link.t/ya.make b/contrib/libs/liburing/test/open-direct-link.t/ya.make
index ef284c507a..ba3217ad32 100644
--- a/contrib/libs/liburing/test/open-direct-link.t/ya.make
+++ b/contrib/libs/liburing/test/open-direct-link.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/open-direct-pick.t/ya.make b/contrib/libs/liburing/test/open-direct-pick.t/ya.make
index 2c3e6f496f..1699e7497f 100644
--- a/contrib/libs/liburing/test/open-direct-pick.t/ya.make
+++ b/contrib/libs/liburing/test/open-direct-pick.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/openat2.t/ya.make b/contrib/libs/liburing/test/openat2.t/ya.make
index f6755732e2..efa8bf51f4 100644
--- a/contrib/libs/liburing/test/openat2.t/ya.make
+++ b/contrib/libs/liburing/test/openat2.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/personality.t/ya.make b/contrib/libs/liburing/test/personality.t/ya.make
index 3a58beb172..3e6bfd8d24 100644
--- a/contrib/libs/liburing/test/personality.t/ya.make
+++ b/contrib/libs/liburing/test/personality.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/pipe-bug.t/ya.make b/contrib/libs/liburing/test/pipe-bug.t/ya.make
index 8b44cb7a62..494b7eb949 100644
--- a/contrib/libs/liburing/test/pipe-bug.t/ya.make
+++ b/contrib/libs/liburing/test/pipe-bug.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/pipe-eof.t/ya.make b/contrib/libs/liburing/test/pipe-eof.t/ya.make
index 27e716bc4f..637e508436 100644
--- a/contrib/libs/liburing/test/pipe-eof.t/ya.make
+++ b/contrib/libs/liburing/test/pipe-eof.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/pipe-reuse.t/ya.make b/contrib/libs/liburing/test/pipe-reuse.t/ya.make
index cb99dbb937..d6c8d4a0a5 100644
--- a/contrib/libs/liburing/test/pipe-reuse.t/ya.make
+++ b/contrib/libs/liburing/test/pipe-reuse.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-cancel-all.t/ya.make b/contrib/libs/liburing/test/poll-cancel-all.t/ya.make
index 817d72989f..2eb4ba8632 100644
--- a/contrib/libs/liburing/test/poll-cancel-all.t/ya.make
+++ b/contrib/libs/liburing/test/poll-cancel-all.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-cancel-ton.t/ya.make b/contrib/libs/liburing/test/poll-cancel-ton.t/ya.make
index 967cf70af1..efbaa7987f 100644
--- a/contrib/libs/liburing/test/poll-cancel-ton.t/ya.make
+++ b/contrib/libs/liburing/test/poll-cancel-ton.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-cancel.t/ya.make b/contrib/libs/liburing/test/poll-cancel.t/ya.make
index bb71bf99a0..fd0f374ad7 100644
--- a/contrib/libs/liburing/test/poll-cancel.t/ya.make
+++ b/contrib/libs/liburing/test/poll-cancel.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-link.t/ya.make b/contrib/libs/liburing/test/poll-link.t/ya.make
index 9e13c1959f..92101722f8 100644
--- a/contrib/libs/liburing/test/poll-link.t/ya.make
+++ b/contrib/libs/liburing/test/poll-link.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-many.t/ya.make b/contrib/libs/liburing/test/poll-many.t/ya.make
index 88050fbf26..87a34cae54 100644
--- a/contrib/libs/liburing/test/poll-many.t/ya.make
+++ b/contrib/libs/liburing/test/poll-many.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-mshot-overflow.t/ya.make b/contrib/libs/liburing/test/poll-mshot-overflow.t/ya.make
index a2a5ae3931..39e6c2c50a 100644
--- a/contrib/libs/liburing/test/poll-mshot-overflow.t/ya.make
+++ b/contrib/libs/liburing/test/poll-mshot-overflow.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-mshot-update.t/ya.make b/contrib/libs/liburing/test/poll-mshot-update.t/ya.make
index 87a58460d0..117e1902f0 100644
--- a/contrib/libs/liburing/test/poll-mshot-update.t/ya.make
+++ b/contrib/libs/liburing/test/poll-mshot-update.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-race-mshot.t/ya.make b/contrib/libs/liburing/test/poll-race-mshot.t/ya.make
index 130b4e495b..2811d15306 100644
--- a/contrib/libs/liburing/test/poll-race-mshot.t/ya.make
+++ b/contrib/libs/liburing/test/poll-race-mshot.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-race.t/ya.make b/contrib/libs/liburing/test/poll-race.t/ya.make
index decdc37fef..30fb2b2245 100644
--- a/contrib/libs/liburing/test/poll-race.t/ya.make
+++ b/contrib/libs/liburing/test/poll-race.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-ring.t/ya.make b/contrib/libs/liburing/test/poll-ring.t/ya.make
index 0b41888d72..7cbd83167c 100644
--- a/contrib/libs/liburing/test/poll-ring.t/ya.make
+++ b/contrib/libs/liburing/test/poll-ring.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll-v-poll.t/ya.make b/contrib/libs/liburing/test/poll-v-poll.t/ya.make
index 5f4c049f11..511f8be433 100644
--- a/contrib/libs/liburing/test/poll-v-poll.t/ya.make
+++ b/contrib/libs/liburing/test/poll-v-poll.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/poll.t/ya.make b/contrib/libs/liburing/test/poll.t/ya.make
index 5b2f985766..7ec5c254a0 100644
--- a/contrib/libs/liburing/test/poll.t/ya.make
+++ b/contrib/libs/liburing/test/poll.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/pollfree.t/ya.make b/contrib/libs/liburing/test/pollfree.t/ya.make
index 250c998824..de78acd241 100644
--- a/contrib/libs/liburing/test/pollfree.t/ya.make
+++ b/contrib/libs/liburing/test/pollfree.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/probe.t/ya.make b/contrib/libs/liburing/test/probe.t/ya.make
index 6ca9e5b012..e5b9bc9e33 100644
--- a/contrib/libs/liburing/test/probe.t/ya.make
+++ b/contrib/libs/liburing/test/probe.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/read-before-exit.t/ya.make b/contrib/libs/liburing/test/read-before-exit.t/ya.make
index e063ffe60c..f8720eddd5 100644
--- a/contrib/libs/liburing/test/read-before-exit.t/ya.make
+++ b/contrib/libs/liburing/test/read-before-exit.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/read-inc-file.c b/contrib/libs/liburing/test/read-inc-file.c
new file mode 100644
index 0000000000..75fa1a1f4b
--- /dev/null
+++ b/contrib/libs/liburing/test/read-inc-file.c
@@ -0,0 +1,151 @@
+#include "../config-host.h"
+/* SPDX-License-Identifier: MIT */
+/*
+ * Description: test reading a normal file with incremental buffer
+ * consumption. Some kernels had a bug where the initial part
+ * of the buffer got skipped, test for that.
+ *
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include "liburing.h"
+#include "helpers.h"
+
+#define BUF_BGID 4
+#define BUF_BID 8
+
+static void arm_read(struct io_uring *ring, int fd, int offset)
+{
+ struct io_uring_sqe *sqe;
+
+ sqe = io_uring_get_sqe(ring);
+ io_uring_prep_read(sqe, fd, NULL, 80, offset);
+ sqe->flags = IOSQE_BUFFER_SELECT;
+ sqe->buf_group = BUF_BGID;
+ io_uring_submit(ring);
+}
+
+static int create_test_file(const char *fname)
+{
+ char buf[80], c;
+ int fd, i, ret;
+
+ fd = open(fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ if (fd < 0) {
+ perror("open");
+ return T_EXIT_FAIL;
+ }
+
+ c = 'a';
+ for (i = 0; i < 8; i++) {
+ memset(buf, c, sizeof(buf));
+ ret = write(fd, buf, sizeof(buf));
+ if (ret < 0) {
+ perror("write");
+ unlink(fname);
+ return T_EXIT_FAIL;
+ } else if (ret != sizeof(buf)) {
+ fprintf(stderr, "Short write: %d\n", ret);
+ unlink(fname);
+ return T_EXIT_FAIL;
+ }
+ c++;
+ }
+
+ close(fd);
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ struct io_uring_buf_ring *br;
+ struct io_uring_params p = { };
+ struct io_uring_cqe *cqe;
+ struct io_uring ring;
+ int tret, ret, fd, i;
+ char fname[64];
+ char c = 'a';
+ char *buf;
+ void *ptr;
+
+ if (argc > 1)
+ return T_EXIT_SKIP;
+
+ sprintf(fname, ".buf-inc-file.%d", getpid());
+ if (create_test_file(fname))
+ return T_EXIT_FAIL;
+
+ fd = open(fname, O_RDONLY);
+ if (fd < 0) {
+ perror("open");
+ goto err;
+ }
+
+ ret = io_uring_queue_init_params(64, &ring, &p);
+ if (ret) {
+ fprintf(stderr, "ring setup failed: %d\n", ret);
+ goto err;
+ }
+
+ if (posix_memalign((void **) &buf, 4096, 65536))
+ goto err;
+
+ tret = T_EXIT_SKIP;
+ br = io_uring_setup_buf_ring(&ring, 32, BUF_BGID, IOU_PBUF_RING_INC, &ret);
+ if (!br) {
+ if (ret == -EINVAL)
+ goto out;
+ fprintf(stderr, "Buffer ring register failed %d\n", ret);
+ goto err;
+ }
+
+ tret = T_EXIT_PASS;
+ io_uring_buf_ring_add(br, buf, 65536, BUF_BID, 31, 0);
+ io_uring_buf_ring_advance(br, 1);
+
+ memset(buf, 0, 65536);
+
+ ptr = buf;
+ for (i = 0; i < 4; i++) {
+ int bid;
+
+ arm_read(&ring, fd, i * 80);
+ ret = io_uring_wait_cqe(&ring, &cqe);
+ if (ret) {
+ fprintf(stderr, "wait %d\n", ret);
+ goto err;
+ }
+ if (!(cqe->flags & IORING_CQE_F_BUFFER)) {
+ fprintf(stderr, "buffer not assigned\n");
+ goto err;
+ }
+ bid = cqe->flags >> IORING_CQE_BUFFER_SHIFT;
+ if (bid != BUF_BID) {
+ fprintf(stderr, "got wrong buffer bid %d\n", bid);
+ goto err;
+ }
+ if (cqe->res != 80) {
+ fprintf(stderr, "bad read size %d\n", ret);
+ goto err;
+ }
+ io_uring_cqe_seen(&ring, cqe);
+ if (!memchr(ptr, c, cqe->res)) {
+ fprintf(stderr, "fail buffer check loop %d\n", i);
+ goto err;
+ }
+ c++;
+ ptr += cqe->res;
+ }
+
+ io_uring_free_buf_ring(&ring, br, 32, BUF_BGID);
+ io_uring_queue_exit(&ring);
+out:
+ free(buf);
+ unlink(fname);
+ return tret;
+err:
+ unlink(fname);
+ return T_EXIT_FAIL;
+}
diff --git a/contrib/libs/liburing/test/read-inc-file.t/ya.make b/contrib/libs/liburing/test/read-inc-file.t/ya.make
new file mode 100644
index 0000000000..fb0befd4b0
--- /dev/null
+++ b/contrib/libs/liburing/test/read-inc-file.t/ya.make
@@ -0,0 +1,35 @@
+# Generated by devtools/yamaker.
+
+PROGRAM()
+
+WITHOUT_LICENSE_TEXTS()
+
+VERSION(2.9)
+
+LICENSE(MIT)
+
+PEERDIR(
+ contrib/libs/liburing
+)
+
+ADDINCL(
+ contrib/libs/liburing/src/include
+)
+
+NO_COMPILER_WARNINGS()
+
+NO_RUNTIME()
+
+CFLAGS(
+ -DLIBURING_BUILD_TEST
+ -D__SANE_USERSPACE_TYPES__
+)
+
+SRCDIR(contrib/libs/liburing/test)
+
+SRCS(
+ helpers.c
+ read-inc-file.c
+)
+
+END()
diff --git a/contrib/libs/liburing/test/read-mshot-empty.t/ya.make b/contrib/libs/liburing/test/read-mshot-empty.t/ya.make
index 5c846118f3..21cb589bb8 100644
--- a/contrib/libs/liburing/test/read-mshot-empty.t/ya.make
+++ b/contrib/libs/liburing/test/read-mshot-empty.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/read-mshot-stdin.t/ya.make b/contrib/libs/liburing/test/read-mshot-stdin.t/ya.make
index 66267bf515..4f9223a52c 100644
--- a/contrib/libs/liburing/test/read-mshot-stdin.t/ya.make
+++ b/contrib/libs/liburing/test/read-mshot-stdin.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/read-mshot.t/ya.make b/contrib/libs/liburing/test/read-mshot.t/ya.make
index 44f536e7bb..30d76efaa0 100644
--- a/contrib/libs/liburing/test/read-mshot.t/ya.make
+++ b/contrib/libs/liburing/test/read-mshot.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/read-write.t/ya.make b/contrib/libs/liburing/test/read-write.t/ya.make
index 7d887f6898..6b8cadf4fe 100644
--- a/contrib/libs/liburing/test/read-write.t/ya.make
+++ b/contrib/libs/liburing/test/read-write.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/recv-msgall-stream.t/ya.make b/contrib/libs/liburing/test/recv-msgall-stream.t/ya.make
index 414c410945..5eefb1ffb0 100644
--- a/contrib/libs/liburing/test/recv-msgall-stream.t/ya.make
+++ b/contrib/libs/liburing/test/recv-msgall-stream.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/recv-msgall.t/ya.make b/contrib/libs/liburing/test/recv-msgall.t/ya.make
index f8c6f883aa..f451853f70 100644
--- a/contrib/libs/liburing/test/recv-msgall.t/ya.make
+++ b/contrib/libs/liburing/test/recv-msgall.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/recv-multishot.c b/contrib/libs/liburing/test/recv-multishot.c
index de07809f0d..86bb6f7784 100644
--- a/contrib/libs/liburing/test/recv-multishot.c
+++ b/contrib/libs/liburing/test/recv-multishot.c
@@ -166,7 +166,7 @@ static int test(struct args *args)
io_uring_prep_recv_multishot(sqe, fds[0], NULL, 0, 0);
}
sqe->flags |= IOSQE_BUFFER_SELECT;
- sqe->buf_group = 7;
+ io_uring_sqe_set_buf_group(sqe, 7);
io_uring_sqe_set_data64(sqe, 1234);
io_uring_submit(&ring);
@@ -504,7 +504,7 @@ static int test_enobuf(void)
assert(sqe);
io_uring_prep_recv_multishot(sqe, fds[0], NULL, 0, 0);
io_uring_sqe_set_data64(sqe, 1);
- sqe->buf_group = 0;
+ io_uring_sqe_set_buf_group(sqe, 0);
sqe->flags |= IOSQE_BUFFER_SELECT;
ret = io_uring_submit(&ring);
diff --git a/contrib/libs/liburing/test/recv-multishot.t/ya.make b/contrib/libs/liburing/test/recv-multishot.t/ya.make
index 97c41c11e5..4a002859ad 100644
--- a/contrib/libs/liburing/test/recv-multishot.t/ya.make
+++ b/contrib/libs/liburing/test/recv-multishot.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/recvsend_bundle-inc.t/ya.make b/contrib/libs/liburing/test/recvsend_bundle-inc.t/ya.make
index 35c4f17c72..e66cb169fb 100644
--- a/contrib/libs/liburing/test/recvsend_bundle-inc.t/ya.make
+++ b/contrib/libs/liburing/test/recvsend_bundle-inc.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/recvsend_bundle.c b/contrib/libs/liburing/test/recvsend_bundle.c
index b1ed5b947a..664cc11821 100644
--- a/contrib/libs/liburing/test/recvsend_bundle.c
+++ b/contrib/libs/liburing/test/recvsend_bundle.c
@@ -292,7 +292,7 @@ static void *recv_fn(void *data)
goto err;
}
- if (posix_memalign(&buf, 4096, MSG_SIZE * RECV_BIDS))
+ if (posix_memalign(&buf, sysconf(_SC_PAGESIZE), MSG_SIZE * RECV_BIDS))
goto err;
if (!classic_buffers) {
@@ -454,7 +454,7 @@ static int do_send(struct recv_data *rd)
return 0;
}
- if (posix_memalign(&buf, 4096, MSG_SIZE * nr_msgs))
+ if (posix_memalign(&buf, sysconf(_SC_PAGESIZE), MSG_SIZE * nr_msgs))
return 1;
if (!classic_buffers) {
diff --git a/contrib/libs/liburing/test/recvsend_bundle.t/ya.make b/contrib/libs/liburing/test/recvsend_bundle.t/ya.make
index 81dadbb159..524e17e5b6 100644
--- a/contrib/libs/liburing/test/recvsend_bundle.t/ya.make
+++ b/contrib/libs/liburing/test/recvsend_bundle.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/reg-fd-only.c b/contrib/libs/liburing/test/reg-fd-only.c
index 1c795e316c..f0362c35f5 100644
--- a/contrib/libs/liburing/test/reg-fd-only.c
+++ b/contrib/libs/liburing/test/reg-fd-only.c
@@ -59,7 +59,7 @@ static int test(int nentries, int ring_flags)
ret = io_uring_queue_init(nentries, &ring,
IORING_SETUP_REGISTERED_FD_ONLY | IORING_SETUP_NO_MMAP |
ring_flags);
- if (ret == -EINVAL) {
+ if (ret == -EINVAL || ret == -ENOENT) {
no_mmap = 1;
return T_EXIT_SKIP;
} else if (ret == -ENOMEM) {
diff --git a/contrib/libs/liburing/test/reg-fd-only.t/ya.make b/contrib/libs/liburing/test/reg-fd-only.t/ya.make
index 3d84cb51e0..9076ade857 100644
--- a/contrib/libs/liburing/test/reg-fd-only.t/ya.make
+++ b/contrib/libs/liburing/test/reg-fd-only.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/reg-hint.t/ya.make b/contrib/libs/liburing/test/reg-hint.t/ya.make
index 1c4788b6fd..5f9afb6aff 100644
--- a/contrib/libs/liburing/test/reg-hint.t/ya.make
+++ b/contrib/libs/liburing/test/reg-hint.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/reg-reg-ring.t/ya.make b/contrib/libs/liburing/test/reg-reg-ring.t/ya.make
index 3eb7a743a1..f3af39de20 100644
--- a/contrib/libs/liburing/test/reg-reg-ring.t/ya.make
+++ b/contrib/libs/liburing/test/reg-reg-ring.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/reg-wait.c b/contrib/libs/liburing/test/reg-wait.c
new file mode 100644
index 0000000000..ef103d95e8
--- /dev/null
+++ b/contrib/libs/liburing/test/reg-wait.c
@@ -0,0 +1,578 @@
+#include "../config-host.h"
+/* SPDX-License-Identifier: MIT */
+/*
+ * Description: Test that registered waits work
+ */
+#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <linux/mman.h>
+
+#include "liburing.h"
+#include "helpers.h"
+#include "test.h"
+#include "../src/syscall.h"
+
+static const struct io_uring_reg_wait brief_wait = {
+ .flags = IORING_REG_WAIT_TS,
+ .ts.tv_sec = 0,
+ .ts.tv_nsec = 1000,
+};
+
+static bool has_kernel_regions;
+
+static int test_wait_reg_offset(struct io_uring *ring,
+ unsigned wait_nr, unsigned long offset)
+{
+ return __sys_io_uring_enter2(ring->ring_fd, 0, wait_nr,
+ IORING_ENTER_GETEVENTS |
+ IORING_ENTER_EXT_ARG |
+ IORING_ENTER_EXT_ARG_REG,
+ (void *)offset,
+ sizeof(struct io_uring_reg_wait));
+}
+
+static int __init_ring_with_region(struct io_uring *ring, unsigned ring_flags,
+ struct io_uring_mem_region_reg *pr,
+ bool disabled)
+{
+ int flags = disabled ? IORING_SETUP_R_DISABLED : 0;
+ int ret;
+
+ ret = io_uring_queue_init(8, ring, flags);
+ if (ret) {
+ if (ret != -EINVAL)
+ fprintf(stderr, "ring setup failed: %d\n", ret);
+ return ret;
+ }
+
+ ret = io_uring_register_region(ring, pr);
+ if (ret)
+ goto err;
+
+ if (disabled) {
+ ret = io_uring_enable_rings(ring);
+ if (ret) {
+ fprintf(stderr, "io_uring_enable_rings failure %i\n", ret);
+ goto err;
+ }
+ }
+ return 0;
+err:
+ io_uring_queue_exit(ring);
+ return ret;
+}
+
+static int page_size;
+static struct io_uring_reg_wait *reg;
+
+static int test_invalid_sig(struct io_uring *ring)
+{
+ struct io_uring_cqe *cqe;
+ sigset_t sig;
+ int ret;
+
+ memset(reg, 0, sizeof(*reg));
+ reg->ts.tv_sec = 1;
+ reg->ts.tv_nsec = 0;
+ reg->sigmask = (unsigned long) &sig;
+ reg->sigmask_sz = 1;
+
+ ret = io_uring_submit_and_wait_reg(ring, &cqe, 1, 0);
+ if (ret != -EINVAL) {
+ fprintf(stderr, "sigmask_sz failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ memset(reg, 0, sizeof(*reg));
+ reg->ts.tv_sec = 1;
+ reg->ts.tv_nsec = 0;
+ reg->sigmask = 100;
+ reg->sigmask_sz = 8;
+
+ ret = io_uring_submit_and_wait_reg(ring, &cqe, 1, 0);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "sigmask invalid failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ return T_EXIT_PASS;
+}
+
+static int test_offsets(struct io_uring *ring, struct io_uring_reg_wait *base,
+ size_t size, bool overallocated)
+{
+ struct io_uring_cqe *cqe;
+ int max_index = size / sizeof(struct io_uring_reg_wait);
+ struct io_uring_reg_wait *rw;
+ unsigned long offset;
+ int copy_size;
+ int ret;
+
+ rw = base;
+ memcpy(rw, &brief_wait, sizeof(brief_wait));
+ ret = io_uring_submit_and_wait_reg(ring, &cqe, 1, 0);
+ if (ret != -ETIME) {
+ fprintf(stderr, "0 index failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ if (overallocated) {
+ rw = base + max_index;
+ memcpy(rw, &brief_wait, sizeof(brief_wait));
+ }
+ ret = io_uring_submit_and_wait_reg(ring, &cqe, 1, max_index);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "max+1 index failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ rw = base + max_index - 1;
+ memcpy(rw, &brief_wait, sizeof(brief_wait));
+ ret = io_uring_submit_and_wait_reg(ring, &cqe, 1, max_index - 1);
+ if (ret != -ETIME) {
+ fprintf(stderr, "last index failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ offset = 0UL - sizeof(long);
+ ret = test_wait_reg_offset(ring, 1, offset);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "overflow offset failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ offset = size - sizeof(long);
+ rw = (void *)base + offset;
+ copy_size = overallocated ? sizeof(brief_wait) : sizeof(long);
+ memcpy(rw, &brief_wait, copy_size);
+
+ ret = test_wait_reg_offset(ring, 1, offset);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "OOB offset failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ offset = 1;
+ rw = (void *)base + offset;
+ memcpy(rw, &brief_wait, sizeof(brief_wait));
+ /* undefined behaviour, check the kernel doesn't crash */
+ (void)test_wait_reg_offset(ring, 1, offset);
+
+ return 0;
+}
+
+static int test_basic(struct io_uring *ring)
+{
+ struct io_uring_cqe *cqe;
+ struct timeval tv;
+ int ret;
+
+ memset(reg, 0, sizeof(*reg));
+ reg->ts.tv_sec = 1;
+ reg->ts.tv_nsec = 100000000ULL;
+ reg->flags = IORING_REG_WAIT_TS;
+
+ gettimeofday(&tv, NULL);
+ ret = io_uring_submit_and_wait_reg(ring, &cqe, 2, 0);
+ if (ret != -ETIME) {
+ fprintf(stderr, "submit_and_wait_reg: %d\n", ret);
+ goto err;
+ }
+ ret = mtime_since_now(&tv);
+ /* allow some slack, should be around 1.1s */
+ if (ret < 1000 || ret > 1200) {
+ fprintf(stderr, "wait too long or short: %d\n", ret);
+ goto err;
+ }
+ return T_EXIT_PASS;
+err:
+ return T_EXIT_FAIL;
+}
+
+static int test_wait_arg(void)
+{
+ struct io_uring_region_desc rd = {};
+ struct io_uring_mem_region_reg mr = {};
+ struct io_uring ring;
+ void *buffer;
+ int ret;
+
+ ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
+ if (ret) {
+ if (ret == -EINVAL) {
+ printf("IORING_SETUP_R_DISABLED not supported, skip\n");
+ return 0;
+ }
+ fprintf(stderr, "ring setup failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ buffer = aligned_alloc(page_size, page_size * 4);
+ if (!buffer) {
+ fprintf(stderr, "allocation failed\n");
+ return T_EXIT_FAIL;
+ }
+
+ rd.user_addr = (__u64)(unsigned long)buffer;
+ rd.size = page_size;
+ rd.flags = IORING_MEM_REGION_TYPE_USER;
+ mr.region_uptr = (__u64)(unsigned long)&rd;
+ mr.flags = IORING_MEM_REGION_REG_WAIT_ARG;
+
+ ret = io_uring_register_region(&ring, &mr);
+ if (ret) {
+ fprintf(stderr, "region reg failed %i\n", ret);
+ return 1;
+ }
+
+ ret = io_uring_enable_rings(&ring);
+ if (ret) {
+ fprintf(stderr, "io_uring_enable_rings failure %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ reg = buffer;
+
+ ret = test_basic(&ring);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test failed\n");
+ goto err;
+ }
+
+ ret = test_invalid_sig(&ring);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_invalid sig failed\n");
+ goto err;
+ }
+
+ ret = test_offsets(&ring, buffer, page_size, true);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_offsets failed\n");
+ goto err;
+ }
+err:
+ free(buffer);
+ io_uring_queue_exit(&ring);
+ return ret;
+}
+
+static int test_try_register_region(struct io_uring_mem_region_reg *pr,
+ bool disabled)
+{
+ struct io_uring ring;
+ int ret;
+
+ ret = __init_ring_with_region(&ring, 0, pr, disabled);
+ if (!ret)
+ io_uring_queue_exit(&ring);
+ return ret;
+}
+
+static int test_regions(void)
+{
+ struct io_uring_region_desc rd = {};
+ struct io_uring_mem_region_reg mr = {};
+ void *buffer;
+ int ret;
+
+ buffer = aligned_alloc(page_size, page_size * 4);
+ if (!buffer) {
+ fprintf(stderr, "allocation failed\n");
+ return T_EXIT_FAIL;
+ }
+
+ rd.user_addr = (__u64)(unsigned long)buffer;
+ rd.size = page_size;
+ rd.flags = IORING_MEM_REGION_TYPE_USER;
+
+ mr.region_uptr = (__u64)(unsigned long)&rd;
+ mr.flags = IORING_MEM_REGION_REG_WAIT_ARG;
+
+ ret = test_try_register_region(&mr, true);
+ if (ret == -EINVAL)
+ return T_EXIT_SKIP;
+ if (ret) {
+ fprintf(stderr, "region: register normal fail %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = test_try_register_region(&mr, false);
+ if (ret != -EINVAL) {
+ fprintf(stderr, "region: register with !R_DISABLED fail %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ rd.size = page_size * 4;
+ ret = test_try_register_region(&mr, true);
+ if (ret) {
+ fprintf(stderr, "test_try_register_region() 16KB fail %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+ rd.size = page_size;
+
+ rd.user_addr = 0;
+ ret = test_try_register_region(&mr, true);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "test_try_register_region() null uptr fail %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+ rd.user_addr = (__u64)(unsigned long)buffer;
+
+ rd.flags = 0;
+ ret = test_try_register_region(&mr, true);
+ if (!ret) {
+ fprintf(stderr, "test_try_register_region() kernel alloc with uptr fail %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+ rd.flags = IORING_MEM_REGION_TYPE_USER;
+
+ rd.size = 0;
+ ret = test_try_register_region(&mr, true);
+ if (!ret) {
+ fprintf(stderr, "test_try_register_region() 0-size fail %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+ rd.size = page_size;
+
+ mr.region_uptr = 0;
+ ret = test_try_register_region(&mr, true);
+ if (!ret) {
+ fprintf(stderr, "test_try_register_region() NULL region %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+ mr.region_uptr = (__u64)(unsigned long)&rd;
+
+ rd.user_addr += 16;
+ ret = test_try_register_region(&mr, true);
+ if (!ret) {
+ fprintf(stderr, "test_try_register_region() misaligned region %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ rd.user_addr = 0x1000;
+ ret = test_try_register_region(&mr, true);
+ if (!ret) {
+ fprintf(stderr, "test_try_register_region() bogus uptr %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+ rd.user_addr = (__u64)(unsigned long)buffer;
+ free(buffer);
+
+ buffer = mmap(NULL, page_size, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (buffer == MAP_FAILED) {
+ fprintf(stderr, "mmap alloc failed\n");
+ return 1;
+ }
+
+ rd.user_addr = (__u64)(unsigned long)buffer;
+ ret = test_try_register_region(&mr, true);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "test_try_register_region() RO uptr %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ rd.flags = 0;
+ rd.user_addr = 0;
+ ret = test_try_register_region(&mr, true);
+ if (ret == -EINVAL) {
+ has_kernel_regions = false;
+ goto out;
+ }
+ if (ret) {
+ fprintf(stderr, "test_try_register_region() failed kernel alloc %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ has_kernel_regions = true;
+ rd.flags = 0;
+ rd.user_addr = (__u64)(unsigned long)buffer;
+ ret = test_try_register_region(&mr, true);
+ if (!ret) {
+ fprintf(stderr, "test_try_register_region() failed uptr w kernel alloc %i\n", ret);
+ return T_EXIT_FAIL;
+ }
+out:
+ munmap(buffer, page_size);
+ return 0;
+}
+
+struct t_region {
+ void *ptr;
+ bool user_mem;
+ size_t size;
+};
+
+static void t_region_free(struct t_region *r)
+{
+ if (r->ptr)
+ munmap(r->ptr, r->size);
+}
+
+static int t_region_create_kernel(struct t_region *r,
+ struct io_uring *ring)
+{
+ struct io_uring_region_desc rd = { .size = r->size, };
+ struct io_uring_mem_region_reg mr = {
+ .region_uptr = (__u64)(unsigned long)&rd,
+ .flags = IORING_MEM_REGION_REG_WAIT_ARG,
+ };
+ void *p;
+ int ret;
+
+ ret = io_uring_register_region(ring, &mr);
+ if (ret)
+ return ret;
+
+ p = mmap(NULL, r->size, PROT_READ | PROT_WRITE,
+ MAP_SHARED | MAP_POPULATE, ring->ring_fd, rd.mmap_offset);
+ if (p == MAP_FAILED)
+ return -EFAULT;
+
+ r->ptr = p;
+ r->user_mem = false;
+ return 0;
+}
+
+static int t_region_create_user(struct t_region *r,
+ struct io_uring *ring,
+ bool huge)
+{
+ struct io_uring_region_desc rd = {};
+ struct io_uring_mem_region_reg mr = {};
+ int flags = MAP_PRIVATE | MAP_ANONYMOUS;
+ void *p;
+ int ret;
+
+ if (huge)
+ flags |= MAP_HUGETLB | MAP_HUGE_2MB;
+
+ p = mmap(NULL, r->size, PROT_READ | PROT_WRITE, flags, -1, 0);
+ if (p == MAP_FAILED)
+ return -ENOMEM;
+
+ mr.region_uptr = (__u64)(unsigned long)&rd;
+ mr.flags = IORING_MEM_REGION_REG_WAIT_ARG;
+ rd.user_addr = (__u64)(unsigned long)p;
+ rd.flags = IORING_MEM_REGION_TYPE_USER;
+ rd.size = r->size;
+
+ ret = io_uring_register_region(ring, &mr);
+ if (ret) {
+ munmap(p, r->size);
+ return ret;
+ }
+ r->ptr = p;
+ r->user_mem = true;
+ return 0;
+}
+
+struct test_param {
+ size_t size;
+ bool huge_page;
+ bool kern_buf;
+};
+
+static int test_region_buffer_types(void)
+{
+ const size_t huge_size = 1024 * 1024 * 2;
+ struct test_param params[] = {
+ { .size = page_size },
+ /* forcing vmap */
+ { .size = page_size * 2 },
+ { .size = page_size * 16 },
+ /* huge page w/o vmap */
+ { .size = huge_size, .huge_page = true },
+ /* huge page w/ vmap */
+ { .size = huge_size * 2, .huge_page = true },
+ { .size = page_size, .kern_buf = true },
+ /* likely to be a compound page */
+ { .size = page_size * 2, .kern_buf = true },
+ { .size = page_size * 8, .kern_buf = true },
+ /* kernel allocation + vmap */
+ { .size = page_size * 512, .kern_buf = true },
+ };
+ struct io_uring ring;
+ int i, ret;
+
+ for (i = 0; i < ARRAY_SIZE(params); i++) {
+ struct t_region r = { .size = params[i].size, };
+
+ ret = io_uring_queue_init(8, &ring, IORING_SETUP_R_DISABLED);
+ if (ret) {
+ fprintf(stderr, "ring setup failed: %d\n", ret);
+ return ret;
+ }
+
+ if (params[i].kern_buf)
+ ret = t_region_create_kernel(&r, &ring);
+ else
+ ret = t_region_create_user(&r, &ring, params[i].huge_page);
+ if (ret) {
+ io_uring_queue_exit(&ring);
+ if (ret == -ENOMEM || ret == -EINVAL)
+ continue;
+ fprintf(stderr, "t_region_create_user failed, idx %i\n", i);
+ return 1;
+ }
+
+ ret = io_uring_enable_rings(&ring);
+ if (ret) {
+ fprintf(stderr, "io_uring_enable_rings failure %i\n", ret);
+ return ret;
+ }
+
+ ret = test_offsets(&ring, r.ptr, r.size, false);
+ if (ret) {
+ fprintf(stderr, "test_offsets failed, idx %i\n", i);
+ return 1;
+ }
+
+ t_region_free(&r);
+ io_uring_queue_exit(&ring);
+ }
+
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ int ret;
+
+ if (argc > 1)
+ return 0;
+
+ page_size = sysconf(_SC_PAGESIZE);
+ if (page_size < 0) {
+ perror("sysconf(_SC_PAGESIZE)");
+ return 1;
+ }
+
+ ret = test_regions();
+ if (ret == T_EXIT_SKIP) {
+ printf("regions are not supported, skip\n");
+ return 0;
+ } else if (ret) {
+ fprintf(stderr, "test_region failed\n");
+ return 1;
+ }
+
+ ret = test_wait_arg();
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_wait_arg failed\n");
+ return 1;
+ }
+
+ ret = test_region_buffer_types();
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_region_buffer_types failed\n");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/contrib/libs/liburing/test/reg-wait.t/ya.make b/contrib/libs/liburing/test/reg-wait.t/ya.make
new file mode 100644
index 0000000000..827e85a841
--- /dev/null
+++ b/contrib/libs/liburing/test/reg-wait.t/ya.make
@@ -0,0 +1,35 @@
+# Generated by devtools/yamaker.
+
+PROGRAM()
+
+WITHOUT_LICENSE_TEXTS()
+
+VERSION(2.9)
+
+LICENSE(MIT)
+
+PEERDIR(
+ contrib/libs/liburing
+)
+
+ADDINCL(
+ contrib/libs/liburing/src/include
+)
+
+NO_COMPILER_WARNINGS()
+
+NO_RUNTIME()
+
+CFLAGS(
+ -DLIBURING_BUILD_TEST
+ -D__SANE_USERSPACE_TYPES__
+)
+
+SRCDIR(contrib/libs/liburing/test)
+
+SRCS(
+ helpers.c
+ reg-wait.c
+)
+
+END()
diff --git a/contrib/libs/liburing/test/regbuf-clone.c b/contrib/libs/liburing/test/regbuf-clone.c
index 9e49989554..2a3a86fa9d 100644
--- a/contrib/libs/liburing/test/regbuf-clone.c
+++ b/contrib/libs/liburing/test/regbuf-clone.c
@@ -9,6 +9,10 @@
#include <unistd.h>
#include <stdlib.h>
#include <sys/uio.h>
+#include <string.h>
+#include <limits.h>
+#include <sys/mman.h>
+#include <linux/mman.h>
#include "liburing.h"
#include "helpers.h"
@@ -17,6 +21,293 @@
#define BUF_SIZE 8192
static int no_buf_clone;
+static int no_buf_offset;
+
+static void fdinfo_read(struct io_uring *ring)
+{
+ char fd_name[128];
+ char *buf;
+ int fd;
+
+ buf = malloc(4096);
+
+ sprintf(fd_name, "/proc/self/fdinfo/%d", ring->ring_fd);
+ fd = open(fd_name, O_RDONLY);
+ if (fd < 0) {
+ perror("open");
+ return;
+ }
+
+ do {
+ int ret = read(fd, buf, 4096);
+
+ if (ret < 0) {
+ perror("fdinfo read");
+ break;
+ } else if (ret == 4096) {
+ continue;
+ }
+ break;
+ } while (1);
+
+ close(fd);
+ free(buf);
+}
+
+static int use_buf(struct io_uring *ring, void *addr, int index)
+{
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
+ char src_buf[32];
+ int fds[2], ret;
+
+ fdinfo_read(ring);
+
+ if (pipe(fds) < 0)
+ return -errno;
+
+ memset(src_buf, 0xbb, sizeof(src_buf));
+
+ sqe = io_uring_get_sqe(ring);
+ io_uring_prep_read_fixed(sqe, fds[0], addr, sizeof(src_buf), 0, index);
+ io_uring_submit(ring);
+
+ ret = write(fds[1], src_buf, sizeof(src_buf));
+ if (ret < 0)
+ return -errno;
+
+ ret = io_uring_wait_cqe(ring, &cqe);
+ if (ret) {
+ fprintf(stderr, "wait_cqe: %d\n", ret);
+ return ret;
+ }
+
+ ret = cqe->res;
+ io_uring_cqe_seen(ring, cqe);
+ if (ret < 0)
+ return ret;
+ close(fds[0]);
+ close(fds[1]);
+ return 0;
+}
+
+static int test_offsets(void)
+{
+ struct iovec vecs[NR_VECS];
+ struct io_uring src, dst;
+ unsigned int i, offset, nr;
+ int ret;
+
+ ret = io_uring_queue_init(1, &src, 0);
+ if (ret) {
+ fprintf(stderr, "ring_init: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ ret = io_uring_queue_init(1, &dst, 0);
+ if (ret) {
+ fprintf(stderr, "ring_init: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ for (i = 0; i < NR_VECS; i++) {
+ if (posix_memalign(&vecs[i].iov_base, 4096, BUF_SIZE))
+ return T_EXIT_FAIL;
+ vecs[i].iov_len = BUF_SIZE;
+ }
+
+ ret = io_uring_register_buffers(&src, vecs, NR_VECS);
+ if (ret < 0) {
+ if (ret == -ENOMEM)
+ return T_EXIT_SKIP;
+ return T_EXIT_FAIL;
+ }
+
+ /* clone half the buffers, src offset 0, but ask for too many */
+ offset = NR_VECS / 2;
+ nr = NR_VECS;
+ ret = io_uring_clone_buffers_offset(&dst, &src, 0, offset, nr, 0);
+ if (ret != -EOVERFLOW) {
+ if (ret == -EINVAL) {
+ no_buf_offset = 1;
+ return T_EXIT_SKIP;
+ }
+ fprintf(stderr, "Offset and too big total failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* ask for too many buffers */
+ nr = NR_VECS + 1;
+ ret = io_uring_clone_buffers_offset(&dst, &src, 0, 0, nr, 0);
+ if (ret != -EINVAL) {
+ fprintf(stderr, "Too many buffers total failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* clone half the buffers into start of src offset */
+ nr = NR_VECS / 2;
+ ret = io_uring_clone_buffers_offset(&dst, &src, 0, nr, nr, 0);
+ if (ret) {
+ fprintf(stderr, "Half clone with offset failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* 'nr' offset should be 0 on the src side */
+ ret = use_buf(&dst, vecs[nr].iov_base, 0);
+ if (ret) {
+ fprintf(stderr, "1 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = io_uring_unregister_buffers(&dst);
+ if (ret) {
+ fprintf(stderr, "Failed to unregister partial dst: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[0].iov_base, 0);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "2 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* clone half the buffers into middle of src offset */
+ nr = NR_VECS / 2;
+ ret = io_uring_clone_buffers_offset(&dst, &src, nr, nr, nr, 0);
+ if (ret) {
+ fprintf(stderr, "Half buffers and middle offset failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[0].iov_base, 0);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "3 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[nr].iov_base, nr);
+ if (ret) {
+ fprintf(stderr, "4 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = io_uring_unregister_buffers(&dst);
+ if (ret) {
+ fprintf(stderr, "Failed to unregister partial dst: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* clone buffers, but specify overflowing dst offset */
+ offset = UINT_MAX - 32;
+ nr = NR_VECS;
+ ret = io_uring_clone_buffers_offset(&dst, &src, 0, offset, nr, 0);
+ if (ret != -EOVERFLOW) {
+ fprintf(stderr, "Overflow dst offset failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* clone half the buffers into middle of src offset */
+ nr = NR_VECS / 2;
+ ret = io_uring_clone_buffers_offset(&dst, &src, nr, nr, nr, 0);
+ if (ret) {
+ fprintf(stderr, "Clone half middle src offset failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[nr].iov_base, nr);
+ if (ret) {
+ fprintf(stderr, "5 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[0].iov_base, 0);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "5 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* should get -EBUSY now, REPLACE not set */
+ nr = NR_VECS / 2;
+ ret = io_uring_clone_buffers_offset(&dst, &src, nr, nr, nr, 0);
+ if (ret != -EBUSY) {
+ fprintf(stderr, "Replace buffers failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* now replace the initial 0..n in dst (which are dummy nodes) */
+ ret = io_uring_clone_buffers_offset(&dst, &src, 0, 0, nr, IORING_REGISTER_DST_REPLACE);
+ if (ret) {
+ fprintf(stderr, "Buffer replace failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[0].iov_base, 0);
+ if (ret) {
+ fprintf(stderr, "6 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = io_uring_unregister_buffers(&dst);
+ if (ret) {
+ fprintf(stderr, "Failed to unregister partial dst: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = io_uring_register_buffers_sparse(&dst, NR_VECS);
+ if (ret) {
+ fprintf(stderr, "Register sparse buffers failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* dst has a full sparse table, replace first NR_VECS / 2 with bufs */
+ nr = NR_VECS / 2;
+ ret = io_uring_clone_buffers_offset(&dst, &src, 0, 0, nr, 0);
+ if (ret != -EBUSY) {
+ fprintf(stderr, "Buffer replace failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = io_uring_clone_buffers_offset(&dst, &src, 0, 0, nr, IORING_REGISTER_DST_REPLACE);
+ if (ret) {
+ fprintf(stderr, "Buffer replace failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[0].iov_base, 0);
+ if (ret) {
+ fprintf(stderr, "7 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* now expand existing dst table, from to NR_VECS + NR_VECS / 2 */
+ nr = NR_VECS;
+ offset = NR_VECS / 2;
+ ret = io_uring_clone_buffers_offset(&dst, &src, offset, 0, nr, IORING_REGISTER_DST_REPLACE);
+ if (ret) {
+ fprintf(stderr, "Buffer replace failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[0].iov_base, 0);
+ if (ret) {
+ fprintf(stderr, "8 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ offset = NR_VECS + (NR_VECS / 2) - 1;
+ ret = use_buf(&dst, vecs[NR_VECS - 1].iov_base, offset);
+ if (ret) {
+ fprintf(stderr, "8b use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[NR_VECS / 2].iov_base, NR_VECS);
+ if (ret) {
+ fprintf(stderr, "9 use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ return T_EXIT_PASS;
+}
static int test(int reg_src, int reg_dst)
{
@@ -77,6 +368,18 @@ static int test(int reg_src, int reg_dst)
return T_EXIT_FAIL;
}
+ ret = use_buf(&src, vecs[0].iov_base, 0);
+ if (ret) {
+ fprintf(stderr, "use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = use_buf(&dst, vecs[0].iov_base, 0);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
/* copy should work now */
ret = io_uring_clone_buffers(&dst, &src);
if (ret) {
@@ -84,6 +387,12 @@ static int test(int reg_src, int reg_dst)
return T_EXIT_FAIL;
}
+ ret = use_buf(&dst, vecs[NR_VECS / 2].iov_base, NR_VECS / 2);
+ if (ret) {
+ fprintf(stderr, "use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
/* try copy again, should get -EBUSY */
ret = io_uring_clone_buffers(&dst, &src);
if (ret != -EBUSY) {
@@ -97,18 +406,36 @@ static int test(int reg_src, int reg_dst)
return T_EXIT_FAIL;
}
+ ret = use_buf(&dst, vecs[NR_VECS / 2].iov_base, NR_VECS / 2);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
ret = io_uring_unregister_buffers(&dst);
if (ret != -ENXIO) {
fprintf(stderr, "dst unregister empty buffers: %d\n", ret);
return T_EXIT_FAIL;
}
+ ret = use_buf(&src, vecs[NR_VECS / 2].iov_base, NR_VECS / 2);
+ if (ret) {
+ fprintf(stderr, "use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
ret = io_uring_unregister_buffers(&src);
if (ret) {
fprintf(stderr, "src unregister buffers: %d\n", ret);
return T_EXIT_FAIL;
}
+ ret = use_buf(&src, vecs[NR_VECS / 2].iov_base, NR_VECS / 2);
+ if (ret != -EFAULT) {
+ fprintf(stderr, "use_buf=%d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
ret = io_uring_register_buffers(&dst, vecs, NR_VECS);
if (ret < 0) {
fprintf(stderr, "register buffers dst; %d\n", ret);
@@ -195,6 +522,61 @@ static int test_dummy(void)
return T_EXIT_PASS;
}
+/*
+ * Register sparse buffer table, then try updating that with a few huge
+ * page entries.
+ */
+static int test_merge(void)
+{
+ int ret, res = T_EXIT_SKIP;
+ struct iovec vecs[8];
+ struct io_uring ring;
+ __u64 tags[2];
+ void *p1;
+
+ p1 = mmap(NULL, 2*1024*1024, PROT_READ|PROT_WRITE,
+ MAP_PRIVATE|MAP_HUGETLB | MAP_HUGE_2MB | MAP_ANONYMOUS,
+ -1, 0);
+ if (p1 == MAP_FAILED)
+ return T_EXIT_SKIP;
+
+ ret = io_uring_queue_init(1, &ring, 0);
+ if (ret) {
+ fprintf(stderr, "ring_init: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ memset(vecs, 0, sizeof(vecs));
+
+ ret = io_uring_register_buffers(&ring, vecs, 8);
+ if (ret < 0) {
+ if (ret == -EINVAL)
+ goto skip;
+ fprintf(stderr, "failed to register initial buffers: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ vecs[0].iov_base = p1;
+ vecs[0].iov_len = 4096;
+ vecs[1].iov_base = p1 + 4096;
+ vecs[1].iov_len = 4096;
+
+ tags[0] = 1;
+ tags[1] = 2;
+ ret = io_uring_register_buffers_update_tag(&ring, 4, vecs, tags, 2);
+ if (ret < 0) {
+ if (ret == -EINVAL)
+ goto skip;
+ fprintf(stderr, "failed to register merge buffers: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ res = T_EXIT_PASS;
+skip:
+ munmap(p1, 2*1024*1024);
+ io_uring_queue_exit(&ring);
+ return res;
+}
+
int main(int argc, char *argv[])
{
int ret;
@@ -202,6 +584,12 @@ int main(int argc, char *argv[])
if (argc > 1)
return T_EXIT_SKIP;
+ ret = test_merge();
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_merge failed\n");
+ return T_EXIT_FAIL;
+ }
+
ret = test(0, 0);
if (ret == T_EXIT_SKIP) {
return T_EXIT_SKIP;
@@ -244,5 +632,15 @@ int main(int argc, char *argv[])
return T_EXIT_FAIL;
}
+ ret = test_offsets();
+ if (ret == T_EXIT_SKIP) {
+ return T_EXIT_PASS;
+ } else if (ret != T_EXIT_PASS) {
+ fprintf(stderr, "test_offset failed\n");
+ return T_EXIT_FAIL;
+ }
+ if (no_buf_offset)
+ return T_EXIT_PASS;
+
return T_EXIT_PASS;
}
diff --git a/contrib/libs/liburing/test/regbuf-clone.t/ya.make b/contrib/libs/liburing/test/regbuf-clone.t/ya.make
index 016640dcce..d9c137e818 100644
--- a/contrib/libs/liburing/test/regbuf-clone.t/ya.make
+++ b/contrib/libs/liburing/test/regbuf-clone.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/regbuf-merge.t/ya.make b/contrib/libs/liburing/test/regbuf-merge.t/ya.make
index ee4f314adc..105d3bcc40 100644
--- a/contrib/libs/liburing/test/regbuf-merge.t/ya.make
+++ b/contrib/libs/liburing/test/regbuf-merge.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/register-restrictions.t/ya.make b/contrib/libs/liburing/test/register-restrictions.t/ya.make
index cb64fc0194..5e13631301 100644
--- a/contrib/libs/liburing/test/register-restrictions.t/ya.make
+++ b/contrib/libs/liburing/test/register-restrictions.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/rename.t/ya.make b/contrib/libs/liburing/test/rename.t/ya.make
index eea4a265ae..21d7328815 100644
--- a/contrib/libs/liburing/test/rename.t/ya.make
+++ b/contrib/libs/liburing/test/rename.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/resize-rings.c b/contrib/libs/liburing/test/resize-rings.c
new file mode 100644
index 0000000000..16a75de84f
--- /dev/null
+++ b/contrib/libs/liburing/test/resize-rings.c
@@ -0,0 +1,658 @@
+#include "../config-host.h"
+/* SPDX-License-Identifier: MIT */
+/*
+ * Description: test sq/cq ring resizing
+ *
+ */
+#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <pthread.h>
+
+#include "liburing.h"
+#include "helpers.h"
+
+static bool only_defer, no_defer;
+
+#define NVECS 128
+
+#define min(a, b) ((a) < (b) ? (a) : (b))
+
+struct data {
+ pthread_t thread;
+ int fd;
+ int nr_writes;
+ int failed;
+};
+
+static void *thread_fn(void *__data)
+{
+ struct data *d = __data;
+ char buffer[8];
+ int to_write = d->nr_writes;
+
+ memset(buffer, 0x5a, sizeof(buffer));
+ usleep(10000);
+ while (to_write) {
+ int ret = write(d->fd, buffer, sizeof(buffer));
+
+ if (ret < 0) {
+ perror("write");
+ d->failed = 1;
+ break;
+ } else if (ret != sizeof(buffer)) {
+ printf("short write %d\n", ret);
+ }
+ to_write--;
+ usleep(5);
+ }
+ return NULL;
+}
+
+static int test_pipes(struct io_uring *ring, int async)
+{
+ struct io_uring_params p = { };
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
+ unsigned long ud = 0;
+ struct data d = { };
+ int ret, i, fds[2], to_read;
+ char buffer[8];
+ void *tret;
+
+ p.sq_entries = 128;
+ p.cq_entries = 128;
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret < 0) {
+ fprintf(stderr, "Failed to resize ring: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ if (pipe(fds) < 0) {
+ perror("pipe");
+ return T_EXIT_FAIL;
+ }
+
+ /*
+ * Put NVECS inflight, then resize while waiting. Repeat until
+ * 'to_read' has been read.
+ */
+ d.nr_writes = 4096;
+ d.fd = fds[1];
+ p.sq_entries = 64;
+ p.cq_entries = 256;
+
+ pthread_create(&d.thread, NULL, thread_fn, &d);
+
+ to_read = d.nr_writes - 128;
+ while (to_read && !d.failed) {
+ unsigned long start_ud = -1UL, end_ud;
+ int to_wait;
+
+ to_wait = NVECS;
+ if (to_wait > to_read)
+ to_wait = to_read;
+
+ for (i = 0; i < to_wait; i++) {
+ sqe = io_uring_get_sqe(ring);
+ /* resized smaller */
+ if (!sqe)
+ break;
+ io_uring_prep_read(sqe, fds[0], buffer, sizeof(buffer), 0);
+ if (async)
+ sqe->flags |= IOSQE_ASYNC;
+ if (start_ud == -1UL)
+ start_ud = ud;
+ sqe->user_data = ++ud;
+ to_read--;
+ }
+ end_ud = ud;
+ ret = io_uring_submit(ring);
+ if (ret != i) {
+ fprintf(stderr, "submitted; %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ to_wait = i;
+ for (i = 0; i < to_wait; i++) {
+ if (i == 0) {
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret < 0) {
+ if (ret != -EOVERFLOW) {
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ }
+ p.sq_entries = 32;
+ p.cq_entries = 128;
+ }
+ if (d.failed)
+ break;
+ ret = io_uring_wait_cqe(ring, &cqe);
+ if (ret) {
+ fprintf(stderr, "wait cqe: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ if (cqe->res < 0) {
+ fprintf(stderr, "cqe res %d\n", cqe->res);
+ return T_EXIT_FAIL;
+ }
+ if (cqe->user_data < start_ud ||
+ cqe->user_data > end_ud) {
+ fprintf(stderr, "use_data out-of-range: <%lu-%lu>: %lu\n",
+ start_ud, end_ud, (long) cqe->user_data);
+ return T_EXIT_FAIL;
+ }
+ io_uring_cqe_seen(ring, cqe);
+ if (!(i % 17)) {
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret < 0) {
+ if (ret == -EOVERFLOW)
+ continue;
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ if (p.sq_entries == 32)
+ p.sq_entries = 64;
+ else if (p.sq_entries == 64)
+ p.sq_entries = 16;
+ else
+ p.sq_entries = 32;
+ if (p.cq_entries == 128)
+ p.cq_entries = 256;
+ else
+ p.cq_entries = 128;
+ }
+ }
+ }
+
+ pthread_join(d.thread, &tret);
+ close(fds[0]);
+ close(fds[0]);
+ return 0;
+}
+
+static int test_reads(struct io_uring *ring, int fd, int async)
+{
+ struct io_uring_params p = { };
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
+ struct iovec vecs[NVECS];
+ unsigned long to_read;
+ unsigned long ud = 0;
+ unsigned long offset;
+ int ret, i;
+
+ if (fd == -1)
+ return T_EXIT_SKIP;
+
+ p.sq_entries = 128;
+ p.cq_entries = 128;
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret < 0) {
+ fprintf(stderr, "Failed to resize ring: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ for (i = 0; i < NVECS; i++) {
+ if (posix_memalign(&vecs[i].iov_base, 4096, 4096))
+ return T_EXIT_FAIL;
+ vecs[i].iov_len = 4096;
+ }
+
+ /*
+ * Put NVECS inflight, then resize while waiting. Repeat until
+ * 'to_read' has been read.
+ */
+ to_read = 64*1024*1024;
+ p.sq_entries = 64;
+ p.cq_entries = 256;
+ offset = 0;
+ while (to_read) {
+ unsigned long start_ud = -1UL, end_ud;
+ int to_wait;
+
+ for (i = 0; i < NVECS; i++) {
+ sqe = io_uring_get_sqe(ring);
+ /* resized smaller */
+ if (!sqe)
+ break;
+ io_uring_prep_read(sqe, fd, vecs[i].iov_base,
+ vecs[i].iov_len, offset);
+ if (async)
+ sqe->flags |= IOSQE_ASYNC;
+ offset += 8192;
+ if (start_ud == -1UL)
+ start_ud = ud;
+ sqe->user_data = ++ud;
+ }
+ end_ud = ud;
+ ret = io_uring_submit(ring);
+ if (ret != i) {
+ fprintf(stderr, "submitted; %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ to_wait = i;
+ for (i = 0; i < to_wait; i++) {
+ if (i == 0) {
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret < 0) {
+ if (ret != -EOVERFLOW) {
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ }
+ p.sq_entries = 32;
+ p.cq_entries = 128;
+ }
+ ret = io_uring_wait_cqe(ring, &cqe);
+ if (ret) {
+ fprintf(stderr, "wait cqe: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ if (cqe->res < 0) {
+ fprintf(stderr, "cqe res %d\n", cqe->res);
+ return T_EXIT_FAIL;
+ }
+ if (cqe->user_data < start_ud ||
+ cqe->user_data > end_ud) {
+ fprintf(stderr, "use_data out-of-range: <%lu-%lu>: %lu\n",
+ start_ud, end_ud, (long) cqe->user_data);
+ return T_EXIT_FAIL;
+ }
+ io_uring_cqe_seen(ring, cqe);
+ if (to_read)
+ to_read -= min(to_read, 4096);
+ if (!(i % 17)) {
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret < 0) {
+ if (ret == -EOVERFLOW)
+ continue;
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ if (p.sq_entries == 32)
+ p.sq_entries = 64;
+ else if (p.sq_entries == 64)
+ p.sq_entries = 16;
+ else
+ p.sq_entries = 32;
+ if (p.cq_entries == 128)
+ p.cq_entries = 256;
+ else
+ p.cq_entries = 128;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int test_basic(struct io_uring *ring, int async)
+{
+ struct io_uring_params p = { };
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
+ int i, ret;
+
+ sqe = io_uring_get_sqe(ring);
+ io_uring_prep_nop(sqe);
+ if (async)
+ sqe->flags |= IOSQE_ASYNC;
+ sqe->user_data = 1;
+ io_uring_submit(ring);
+
+ p.sq_entries = 32;
+ p.cq_entries = 64;
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret == -EINVAL)
+ return T_EXIT_SKIP;
+
+ sqe = io_uring_get_sqe(ring);
+ io_uring_prep_nop(sqe);
+ if (async)
+ sqe->flags |= IOSQE_ASYNC;
+ sqe->user_data = 2;
+ io_uring_submit(ring);
+
+ for (i = 0; i < 2; i++) {
+ ret = io_uring_wait_cqe(ring, &cqe);
+ if (ret) {
+ fprintf(stderr, "wait cqe %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ if (cqe->user_data != i + 1) {
+ fprintf(stderr, "bad user_data %ld\n", (long) cqe->user_data);
+ return T_EXIT_FAIL;
+ }
+ io_uring_cqe_seen(ring, cqe);
+ }
+
+ return T_EXIT_PASS;
+}
+
+static int test_all_copy(struct io_uring *ring)
+{
+ struct io_uring_params p = { };
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
+ unsigned head;
+ int i, ret;
+
+ p.sq_entries = 32;
+ p.cq_entries = 64;
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret) {
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ for (i = 0; i < 32; i++) {
+ sqe = io_uring_get_sqe(ring);
+ io_uring_prep_nop(sqe);
+ sqe->user_data = i + 1;
+ }
+
+ io_uring_submit(ring);
+
+ memset(&p, 0, sizeof(p));
+ p.sq_entries = 64;
+ p.cq_entries = 128;
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret) {
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ i = 1;
+ io_uring_for_each_cqe(ring, head, cqe) {
+ if (cqe->user_data != i) {
+ fprintf(stderr, "Found cqe at wrong offset\n");
+ return T_EXIT_FAIL;
+ }
+ i++;
+ }
+ io_uring_cq_advance(ring, 32);
+ return T_EXIT_PASS;
+}
+
+static int test_overflow(struct io_uring *ring)
+{
+ struct io_uring_params p = { };
+ struct io_uring_sqe *sqe;
+ int i, ret;
+
+ p.sq_entries = 32;
+ p.cq_entries = 64;
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret) {
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ for (i = 0; i < 32; i++) {
+ sqe = io_uring_get_sqe(ring);
+ io_uring_prep_nop(sqe);
+ sqe->user_data = i + 1;
+ }
+
+ io_uring_submit(ring);
+
+ /* have 32 CQEs pending, resize to CQ size 32 which should work */
+ memset(&p, 0, sizeof(p));
+ p.sq_entries = 32;
+ p.cq_entries = 32;
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret) {
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ /* now resize to CQ size 16, which should fail with -EOVERFLOW */
+ memset(&p, 0, sizeof(p));
+ p.sq_entries = 8;
+ p.cq_entries = 16;
+ ret = io_uring_resize_rings(ring, &p);
+ if (ret != -EOVERFLOW) {
+ fprintf(stderr, "Expected overflow, got %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ io_uring_cq_advance(ring, 32);
+ return T_EXIT_PASS;
+}
+
+static int test_same_resize(int flags)
+{
+ struct io_uring_params p = { };
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
+ struct io_uring ring;
+ int i, ret;
+
+ ret = io_uring_queue_init(32, &ring, flags);
+ if (ret)
+ return T_EXIT_FAIL;
+
+ p.sq_entries = 32;
+ p.cq_entries = 64;
+ ret = io_uring_resize_rings(&ring, &p);
+ if (ret) {
+ fprintf(stderr, "resize failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ for (i = 0; i < 32; i++) {
+ sqe = io_uring_get_sqe(&ring);
+ io_uring_prep_nop(sqe);
+ sqe->user_data = i + 1;
+ }
+
+ io_uring_submit(&ring);
+
+ for (i = 0; i < 32; i++) {
+ ret = io_uring_wait_cqe(&ring, &cqe);
+ if (ret) {
+ fprintf(stderr, "wait_cqe: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ if (cqe->user_data != i + 1) {
+ fprintf(stderr, "Found cqe at wrong offset\n");
+ return T_EXIT_FAIL;
+ }
+ io_uring_cqe_seen(&ring, cqe);
+ }
+
+ io_uring_queue_exit(&ring);
+ return T_EXIT_PASS;
+}
+
+static int mmap_child(struct io_uring *__ring, struct io_uring_params *__p)
+{
+ struct io_uring ring = *__ring;
+ struct timeval tv;
+ int ret;
+
+ gettimeofday(&tv, NULL);
+ do {
+ struct io_uring_params p = *__p;
+ void *sq_ptr, *cq_ptr;
+
+ ret = io_uring_queue_mmap(__ring->ring_fd, &p, &ring);
+ if (ret)
+ continue;
+
+ sq_ptr = ring.sq.ring_ptr + 2 * sizeof(__u32);
+ cq_ptr = ring.cq.ring_ptr + 2 * sizeof(__u32);
+ memset(sq_ptr, 0x5a, ring.sq.ring_sz - 2 * sizeof(__u32));
+ memset(cq_ptr, 0xa5, ring.cq.ring_sz - 2 * sizeof(__u32));
+ io_uring_unmap_rings(&ring.sq, &ring.cq);
+ } while (mtime_since_now(&tv) < 2500);
+
+ exit(T_EXIT_PASS);
+}
+
+static int test_mmap_race(struct io_uring *ring, struct io_uring_params *__p)
+{
+ unsigned long useless_sum;
+ int i, w, nr_children;
+ struct timeval tv;
+ pid_t pid;
+
+ nr_children = sysconf(_SC_NPROCESSORS_ONLN);
+ if (nr_children < 0)
+ nr_children = 4;
+
+ for (i = 0; i < nr_children; i++) {
+ pid = fork();
+ if (!pid) {
+ mmap_child(ring, __p);
+ return T_EXIT_PASS;
+ }
+ }
+
+ useless_sum = 0;
+ gettimeofday(&tv, NULL);
+ do {
+ struct io_uring_params p = { .sq_entries = 32, };
+ void *ptr;
+
+ io_uring_resize_rings(ring, &p);
+
+ ptr = memchr(ring->sq.ring_ptr, 0x5a, ring->sq.ring_sz);
+ if (ptr)
+ useless_sum += ptr - ring->sq.ring_ptr;
+
+ ptr = memchr(ring->cq.ring_ptr, 0xa5, ring->cq.ring_sz);
+ if (ptr)
+ useless_sum += ptr - ring->cq.ring_ptr;
+
+ p.sq_entries = 128;
+ io_uring_resize_rings(ring, &p);
+ } while (mtime_since_now(&tv) < 2500);
+
+ for (i = 0; i < nr_children; i++)
+ wait(&w);
+
+ if (useless_sum)
+ return T_EXIT_PASS;
+ return T_EXIT_PASS;
+}
+
+static int test(int flags, int fd, int async)
+{
+ struct io_uring_params p = {
+ .flags = flags,
+ };
+ struct io_uring ring;
+ int ret;
+
+ if (no_defer)
+ return T_EXIT_SKIP;
+ if (!(flags & IORING_SETUP_DEFER_TASKRUN) && only_defer)
+ return T_EXIT_SKIP;
+
+ ret = io_uring_queue_init_params(8, &ring, &p);
+ if (ret < 0) {
+ fprintf(stderr, "ring setup failed: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ret = test_basic(&ring, async);
+ if (ret == T_EXIT_SKIP) {
+ if (!(flags & IORING_SETUP_DEFER_TASKRUN)) {
+ io_uring_queue_exit(&ring);
+ only_defer = true;
+ } else {
+ no_defer = true;
+ }
+ return T_EXIT_SKIP;
+ } else if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_basic %x failed\n", flags);
+ return T_EXIT_FAIL;
+ }
+
+ ret = test_reads(&ring, fd, async);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_reads %x failed\n", flags);
+ return T_EXIT_FAIL;
+ }
+
+ ret = test_pipes(&ring, async);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_pipes %x failed\n", flags);
+ return T_EXIT_FAIL;
+ }
+
+ if (async)
+ return T_EXIT_PASS;
+
+ ret = test_all_copy(&ring);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_all_copy %x failed\n", flags);
+ return T_EXIT_FAIL;
+ }
+
+ ret = test_overflow(&ring);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_overflow %x failed\n", flags);
+ return T_EXIT_FAIL;
+ }
+
+ ret = test_same_resize(flags);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_same_resize %x failed\n", flags);
+ return T_EXIT_FAIL;
+ }
+
+ /* must go at the end, insert more tests above this one */
+ ret = test_mmap_race(&ring, &p);
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_mmap_race %x failed\n", flags);
+ return T_EXIT_FAIL;
+ }
+
+ io_uring_queue_exit(&ring);
+ return T_EXIT_PASS;
+}
+
+int main(int argc, char *argv[])
+{
+ int ret, fd = -1;
+
+ if (argc > 1)
+ fd = open("/dev/nvme0n1", O_RDONLY | O_DIRECT);
+
+ ret = test(0, fd, 0);
+ if (ret == T_EXIT_SKIP)
+ goto try_defer;
+ else if (ret == T_EXIT_FAIL)
+ return T_EXIT_FAIL;
+
+ ret = test(0, fd, 1);
+ if (ret == T_EXIT_FAIL)
+ return T_EXIT_FAIL;
+
+ ret = test(IORING_SETUP_SQPOLL, fd, 0);
+ if (ret == T_EXIT_FAIL)
+ return T_EXIT_FAIL;
+
+ ret = test(IORING_SETUP_SQPOLL, fd, 1);
+ if (ret == T_EXIT_FAIL)
+ return T_EXIT_FAIL;
+
+try_defer:
+ ret = test(IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_DEFER_TASKRUN, fd, 0);
+ if (ret == T_EXIT_FAIL)
+ return T_EXIT_FAIL;
+
+ ret = test(IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_DEFER_TASKRUN, fd, 1);
+ if (ret == T_EXIT_FAIL)
+ return T_EXIT_FAIL;
+
+ return T_EXIT_PASS;
+}
diff --git a/contrib/libs/liburing/test/resize-rings.t/ya.make b/contrib/libs/liburing/test/resize-rings.t/ya.make
new file mode 100644
index 0000000000..62e8c270a1
--- /dev/null
+++ b/contrib/libs/liburing/test/resize-rings.t/ya.make
@@ -0,0 +1,35 @@
+# Generated by devtools/yamaker.
+
+PROGRAM()
+
+WITHOUT_LICENSE_TEXTS()
+
+VERSION(2.9)
+
+LICENSE(MIT)
+
+PEERDIR(
+ contrib/libs/liburing
+)
+
+ADDINCL(
+ contrib/libs/liburing/src/include
+)
+
+NO_COMPILER_WARNINGS()
+
+NO_RUNTIME()
+
+CFLAGS(
+ -DLIBURING_BUILD_TEST
+ -D__SANE_USERSPACE_TYPES__
+)
+
+SRCDIR(contrib/libs/liburing/test)
+
+SRCS(
+ helpers.c
+ resize-rings.c
+)
+
+END()
diff --git a/contrib/libs/liburing/test/ring-leak.t/ya.make b/contrib/libs/liburing/test/ring-leak.t/ya.make
index c0230f3efa..4517cae545 100644
--- a/contrib/libs/liburing/test/ring-leak.t/ya.make
+++ b/contrib/libs/liburing/test/ring-leak.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/ring-leak2.t/ya.make b/contrib/libs/liburing/test/ring-leak2.t/ya.make
index e35f5e3c10..c848c99525 100644
--- a/contrib/libs/liburing/test/ring-leak2.t/ya.make
+++ b/contrib/libs/liburing/test/ring-leak2.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/ringbuf-read.t/ya.make b/contrib/libs/liburing/test/ringbuf-read.t/ya.make
index a04fed0d1a..c4bd132678 100644
--- a/contrib/libs/liburing/test/ringbuf-read.t/ya.make
+++ b/contrib/libs/liburing/test/ringbuf-read.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/ringbuf-status.t/ya.make b/contrib/libs/liburing/test/ringbuf-status.t/ya.make
index 854af2e2ae..8017a3f8fe 100644
--- a/contrib/libs/liburing/test/ringbuf-status.t/ya.make
+++ b/contrib/libs/liburing/test/ringbuf-status.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/rsrc_tags.c b/contrib/libs/liburing/test/rsrc_tags.c
index 8d3fe9307b..82d3a5bda3 100644
--- a/contrib/libs/liburing/test/rsrc_tags.c
+++ b/contrib/libs/liburing/test/rsrc_tags.c
@@ -185,7 +185,7 @@ static int test_buffers_update(void)
/* test that CQE is not emitted before we're done with a buffer */
sqe = io_uring_get_sqe(&ring);
- io_uring_prep_read_fixed(sqe, pipes[0], tmp_buf, 10, 0, 0);
+ io_uring_prep_read_fixed(sqe, pipes[0], tmp_buf, 10, 0, 1);
sqe->user_data = 100;
ret = io_uring_submit(&ring);
if (ret != 1) {
diff --git a/contrib/libs/liburing/test/rsrc_tags.t/ya.make b/contrib/libs/liburing/test/rsrc_tags.t/ya.make
index 58c661f865..86c8f01526 100644
--- a/contrib/libs/liburing/test/rsrc_tags.t/ya.make
+++ b/contrib/libs/liburing/test/rsrc_tags.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/rw_merge_test.t/ya.make b/contrib/libs/liburing/test/rw_merge_test.t/ya.make
index 25088065c8..e42aea36b4 100644
--- a/contrib/libs/liburing/test/rw_merge_test.t/ya.make
+++ b/contrib/libs/liburing/test/rw_merge_test.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/self.t/ya.make b/contrib/libs/liburing/test/self.t/ya.make
index fb2ee7c203..9fdc9ee983 100644
--- a/contrib/libs/liburing/test/self.t/ya.make
+++ b/contrib/libs/liburing/test/self.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/send-zerocopy.t/ya.make b/contrib/libs/liburing/test/send-zerocopy.t/ya.make
index d6af232525..ce31da6832 100644
--- a/contrib/libs/liburing/test/send-zerocopy.t/ya.make
+++ b/contrib/libs/liburing/test/send-zerocopy.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/send_recv.t/ya.make b/contrib/libs/liburing/test/send_recv.t/ya.make
index 45a35c05a2..14daa7b3bc 100644
--- a/contrib/libs/liburing/test/send_recv.t/ya.make
+++ b/contrib/libs/liburing/test/send_recv.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/send_recvmsg.t/ya.make b/contrib/libs/liburing/test/send_recvmsg.t/ya.make
index 91263afd59..f06db98a26 100644
--- a/contrib/libs/liburing/test/send_recvmsg.t/ya.make
+++ b/contrib/libs/liburing/test/send_recvmsg.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/shared-wq.t/ya.make b/contrib/libs/liburing/test/shared-wq.t/ya.make
index f1d0979e8e..9ff02909da 100644
--- a/contrib/libs/liburing/test/shared-wq.t/ya.make
+++ b/contrib/libs/liburing/test/shared-wq.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/short-read.t/ya.make b/contrib/libs/liburing/test/short-read.t/ya.make
index 254e93b6d3..2b98aa4ba0 100644
--- a/contrib/libs/liburing/test/short-read.t/ya.make
+++ b/contrib/libs/liburing/test/short-read.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/shutdown.t/ya.make b/contrib/libs/liburing/test/shutdown.t/ya.make
index 8ddc04ac60..a71fde5cf3 100644
--- a/contrib/libs/liburing/test/shutdown.t/ya.make
+++ b/contrib/libs/liburing/test/shutdown.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sigfd-deadlock.t/ya.make b/contrib/libs/liburing/test/sigfd-deadlock.t/ya.make
index 13f2a770f7..811a4011de 100644
--- a/contrib/libs/liburing/test/sigfd-deadlock.t/ya.make
+++ b/contrib/libs/liburing/test/sigfd-deadlock.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/single-issuer.t/ya.make b/contrib/libs/liburing/test/single-issuer.t/ya.make
index 1e84c75510..fba4742d4a 100644
--- a/contrib/libs/liburing/test/single-issuer.t/ya.make
+++ b/contrib/libs/liburing/test/single-issuer.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/skip-cqe.t/ya.make b/contrib/libs/liburing/test/skip-cqe.t/ya.make
index a4445c9e20..1287929671 100644
--- a/contrib/libs/liburing/test/skip-cqe.t/ya.make
+++ b/contrib/libs/liburing/test/skip-cqe.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/socket-getsetsock-cmd.t/ya.make b/contrib/libs/liburing/test/socket-getsetsock-cmd.t/ya.make
index dc3b688a0b..fc87c60a91 100644
--- a/contrib/libs/liburing/test/socket-getsetsock-cmd.t/ya.make
+++ b/contrib/libs/liburing/test/socket-getsetsock-cmd.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/socket-io-cmd.t/ya.make b/contrib/libs/liburing/test/socket-io-cmd.t/ya.make
index 83a0249549..8152c914a5 100644
--- a/contrib/libs/liburing/test/socket-io-cmd.t/ya.make
+++ b/contrib/libs/liburing/test/socket-io-cmd.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/socket-nb.c b/contrib/libs/liburing/test/socket-nb.c
new file mode 100644
index 0000000000..73ab7ee805
--- /dev/null
+++ b/contrib/libs/liburing/test/socket-nb.c
@@ -0,0 +1,159 @@
+#include "../config-host.h"
+/* SPDX-License-Identifier: MIT */
+/*
+ * Check that recv on an empty socket will bubble back -EAGAIN if
+ * MSG_DONTWAIT is set, regardless of whether or not O_NONBLOCK is set
+ * on the socket itself.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <assert.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <netinet/tcp.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include "liburing.h"
+#include "helpers.h"
+
+static int test(int o_nonblock, int msg_dontwait)
+{
+ int p_fd[2], ret, flags, recv_s0, val;
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
+ struct sockaddr_in addr;
+ struct io_uring ring;
+ char recv_buff[128];
+
+ recv_s0 = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP);
+
+ val = 1;
+ ret = setsockopt(recv_s0, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val));
+ assert(ret != -1);
+ ret = setsockopt(recv_s0, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
+ assert(ret != -1);
+
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+ ret = t_bind_ephemeral_port(recv_s0, &addr);
+ assert(!ret);
+ ret = listen(recv_s0, 128);
+ assert(ret != -1);
+
+ p_fd[1] = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP);
+
+ val = 1;
+ ret = setsockopt(p_fd[1], IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
+ assert(ret != -1);
+
+ flags = fcntl(p_fd[1], F_GETFL, 0);
+ assert(flags != -1);
+
+ flags |= O_NONBLOCK;
+ ret = fcntl(p_fd[1], F_SETFL, flags);
+ assert(ret != -1);
+
+ ret = connect(p_fd[1], (struct sockaddr *) &addr, sizeof(addr));
+ assert(ret == -1);
+
+ p_fd[0] = accept(recv_s0, NULL, NULL);
+ assert(p_fd[0] != -1);
+
+ if (o_nonblock) {
+ flags = fcntl(p_fd[0], F_GETFL, 0);
+ assert(flags != -1);
+
+ flags |= O_NONBLOCK;
+ ret = fcntl(p_fd[0], F_SETFL, flags);
+ assert(ret != -1);
+ }
+
+ while (1) {
+ int32_t code;
+ socklen_t code_len = sizeof(code);
+
+ ret = getsockopt(p_fd[1], SOL_SOCKET, SO_ERROR, &code, &code_len);
+ assert(ret != -1);
+
+ if (!code)
+ break;
+ }
+
+ ret = io_uring_queue_init(32, &ring, 0);
+ assert(ret >= 0);
+
+ flags = msg_dontwait ? MSG_DONTWAIT : 0;
+ sqe = io_uring_get_sqe(&ring);
+ io_uring_prep_recv(sqe, p_fd[0], recv_buff, sizeof(recv_buff), flags);
+ sqe->user_data = 1;
+ io_uring_submit(&ring);
+
+ ret = io_uring_peek_cqe(&ring, &cqe);
+ if (ret) {
+ if (ret != -EAGAIN) {
+ fprintf(stderr, "bad peek: %d\n", ret);
+ goto err;
+ }
+ if (msg_dontwait) {
+ fprintf(stderr, "Got -EAGAIN without MSG_DONTWAIT\n");
+ goto err;
+ }
+ } else {
+ if (!msg_dontwait) {
+ fprintf(stderr, "Unexpected completion\n");
+ goto err;
+ }
+ }
+
+ io_uring_queue_exit(&ring);
+ close(p_fd[0]);
+ close(p_fd[1]);
+ close(recv_s0);
+ return T_EXIT_PASS;
+err:
+ io_uring_queue_exit(&ring);
+ close(p_fd[0]);
+ close(p_fd[1]);
+ close(recv_s0);
+ return T_EXIT_FAIL;
+}
+
+int main(int argc, char *argv[])
+{
+ int ret;
+
+ if (argc > 1)
+ return T_EXIT_SKIP;
+
+ ret = test(0, 0);
+ if (ret) {
+ fprintf(stderr, "test 0 0 failed\n");
+ return T_EXIT_FAIL;
+ }
+
+ ret = test(0, 1);
+ if (ret) {
+ fprintf(stderr, "test 0 1 failed\n");
+ return T_EXIT_FAIL;
+ }
+
+ ret = test(1, 0);
+ if (ret) {
+ fprintf(stderr, "test 1 0 failed\n");
+ return T_EXIT_FAIL;
+ }
+
+ ret = test(1, 1);
+ if (ret) {
+ fprintf(stderr, "test 1 1 failed\n");
+ return T_EXIT_FAIL;
+ }
+
+ return T_EXIT_PASS;
+}
diff --git a/contrib/libs/liburing/test/socket-nb.t/ya.make b/contrib/libs/liburing/test/socket-nb.t/ya.make
new file mode 100644
index 0000000000..a1cc6f7119
--- /dev/null
+++ b/contrib/libs/liburing/test/socket-nb.t/ya.make
@@ -0,0 +1,35 @@
+# Generated by devtools/yamaker.
+
+PROGRAM()
+
+WITHOUT_LICENSE_TEXTS()
+
+VERSION(2.9)
+
+LICENSE(MIT)
+
+PEERDIR(
+ contrib/libs/liburing
+)
+
+ADDINCL(
+ contrib/libs/liburing/src/include
+)
+
+NO_COMPILER_WARNINGS()
+
+NO_RUNTIME()
+
+CFLAGS(
+ -DLIBURING_BUILD_TEST
+ -D__SANE_USERSPACE_TYPES__
+)
+
+SRCDIR(contrib/libs/liburing/test)
+
+SRCS(
+ helpers.c
+ socket-nb.c
+)
+
+END()
diff --git a/contrib/libs/liburing/test/socket-rw-eagain.t/ya.make b/contrib/libs/liburing/test/socket-rw-eagain.t/ya.make
index 420451f607..e8807c93e6 100644
--- a/contrib/libs/liburing/test/socket-rw-eagain.t/ya.make
+++ b/contrib/libs/liburing/test/socket-rw-eagain.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/socket-rw-offset.t/ya.make b/contrib/libs/liburing/test/socket-rw-offset.t/ya.make
index 814cb935b0..3b4a316dbd 100644
--- a/contrib/libs/liburing/test/socket-rw-offset.t/ya.make
+++ b/contrib/libs/liburing/test/socket-rw-offset.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/socket-rw.t/ya.make b/contrib/libs/liburing/test/socket-rw.t/ya.make
index 336701e98b..b753948a55 100644
--- a/contrib/libs/liburing/test/socket-rw.t/ya.make
+++ b/contrib/libs/liburing/test/socket-rw.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/socket.t/ya.make b/contrib/libs/liburing/test/socket.t/ya.make
index 54d72000a2..268aeca947 100644
--- a/contrib/libs/liburing/test/socket.t/ya.make
+++ b/contrib/libs/liburing/test/socket.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/splice.t/ya.make b/contrib/libs/liburing/test/splice.t/ya.make
index dad18f999b..1759f1f16d 100644
--- a/contrib/libs/liburing/test/splice.t/ya.make
+++ b/contrib/libs/liburing/test/splice.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sq-full-cpp.t/ya.make b/contrib/libs/liburing/test/sq-full-cpp.t/ya.make
index aa406abdee..33cf5ffc0d 100644
--- a/contrib/libs/liburing/test/sq-full-cpp.t/ya.make
+++ b/contrib/libs/liburing/test/sq-full-cpp.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sq-full.t/ya.make b/contrib/libs/liburing/test/sq-full.t/ya.make
index ecf9fa084b..3868bc1f88 100644
--- a/contrib/libs/liburing/test/sq-full.t/ya.make
+++ b/contrib/libs/liburing/test/sq-full.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sq-poll-dup.t/ya.make b/contrib/libs/liburing/test/sq-poll-dup.t/ya.make
index 1fcca15117..925d15a8d0 100644
--- a/contrib/libs/liburing/test/sq-poll-dup.t/ya.make
+++ b/contrib/libs/liburing/test/sq-poll-dup.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sq-poll-kthread.t/ya.make b/contrib/libs/liburing/test/sq-poll-kthread.t/ya.make
index 858b6ea987..3c3642fd14 100644
--- a/contrib/libs/liburing/test/sq-poll-kthread.t/ya.make
+++ b/contrib/libs/liburing/test/sq-poll-kthread.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sq-poll-share.t/ya.make b/contrib/libs/liburing/test/sq-poll-share.t/ya.make
index 8b7321b3f4..b9045da7d5 100644
--- a/contrib/libs/liburing/test/sq-poll-share.t/ya.make
+++ b/contrib/libs/liburing/test/sq-poll-share.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sq-space_left.t/ya.make b/contrib/libs/liburing/test/sq-space_left.t/ya.make
index 12f82d935b..bdfa423a48 100644
--- a/contrib/libs/liburing/test/sq-space_left.t/ya.make
+++ b/contrib/libs/liburing/test/sq-space_left.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sqpoll-disable-exit.t/ya.make b/contrib/libs/liburing/test/sqpoll-disable-exit.t/ya.make
index 8e7341edbf..7c9b2c3449 100644
--- a/contrib/libs/liburing/test/sqpoll-disable-exit.t/ya.make
+++ b/contrib/libs/liburing/test/sqpoll-disable-exit.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sqpoll-exec.t/ya.make b/contrib/libs/liburing/test/sqpoll-exec.t/ya.make
index 1ac9e2986e..44f1fb6a8a 100644
--- a/contrib/libs/liburing/test/sqpoll-exec.t/ya.make
+++ b/contrib/libs/liburing/test/sqpoll-exec.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sqpoll-exit-hang.t/ya.make b/contrib/libs/liburing/test/sqpoll-exit-hang.t/ya.make
index cb4611bda5..adfcb14baa 100644
--- a/contrib/libs/liburing/test/sqpoll-exit-hang.t/ya.make
+++ b/contrib/libs/liburing/test/sqpoll-exit-hang.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sqpoll-sleep.c b/contrib/libs/liburing/test/sqpoll-sleep.c
index 439a6fa148..c1dbd90884 100644
--- a/contrib/libs/liburing/test/sqpoll-sleep.c
+++ b/contrib/libs/liburing/test/sqpoll-sleep.c
@@ -15,12 +15,16 @@
int main(int argc, char *argv[])
{
struct io_uring_params p = {};
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
struct timeval tv;
struct io_uring ring;
+ unsigned long elapsed;
+ bool seen_wakeup;
int ret;
if (argc > 1)
- return 0;
+ return T_EXIT_SKIP;
p.flags = IORING_SETUP_SQPOLL;
p.sq_thread_idle = 100;
@@ -29,18 +33,45 @@ int main(int argc, char *argv[])
if (ret) {
if (geteuid()) {
printf("%s: skipped, not root\n", argv[0]);
- return 0;
+ return T_EXIT_SKIP;
}
fprintf(stderr, "queue_init=%d\n", ret);
- return 1;
+ return T_EXIT_FAIL;
}
+ sqe = io_uring_get_sqe(&ring);
+ io_uring_prep_nop(sqe);
+ io_uring_submit(&ring);
+
+ ret = io_uring_wait_cqe(&ring, &cqe);
+ if (ret) {
+ fprintf(stderr, "wait_cqe: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+ io_uring_cqe_seen(&ring, cqe);
+
+ elapsed = 0;
+ seen_wakeup = false;
gettimeofday(&tv, NULL);
do {
- usleep(1000);
- if ((*ring.sq.kflags) & IORING_SQ_NEED_WAKEUP)
- return 0;
- } while (mtime_since_now(&tv) < 1000);
+ usleep(100);
+ if (IO_URING_READ_ONCE(*ring.sq.kflags) & IORING_SQ_NEED_WAKEUP) {
+ seen_wakeup = true;
+ break;
+ }
+ elapsed = mtime_since_now(&tv);
+ } while (elapsed < 1000);
+
+ if (!seen_wakeup) {
+ fprintf(stderr, "SQPOLL didn't flag wakeup\n");
+ return T_EXIT_FAIL;
+ }
+
+ /* should be around 100 msec */
+ if (elapsed < 90 || elapsed > 110) {
+ fprintf(stderr, "SQPOLL wakeup timing off %lu\n", elapsed);
+ return T_EXIT_FAIL;
+ }
- return 1;
+ return T_EXIT_PASS;
}
diff --git a/contrib/libs/liburing/test/sqpoll-sleep.t/ya.make b/contrib/libs/liburing/test/sqpoll-sleep.t/ya.make
index 6ae9ae9827..b18b006f64 100644
--- a/contrib/libs/liburing/test/sqpoll-sleep.t/ya.make
+++ b/contrib/libs/liburing/test/sqpoll-sleep.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sqwait.c b/contrib/libs/liburing/test/sqwait.c
index 135b50be3a..edc5eb1ff1 100644
--- a/contrib/libs/liburing/test/sqwait.c
+++ b/contrib/libs/liburing/test/sqwait.c
@@ -61,6 +61,12 @@ int main(int argc, char *argv[])
}
fret = T_EXIT_SKIP;
+ for (i = 0; i < INFLIGHT; i++) {
+ if (posix_memalign(&iovs[i].iov_base, 4096, 4096))
+ goto err;
+ iovs[i].iov_len = 4096;
+ }
+
ret = io_uring_queue_init(8, &ring, IORING_SETUP_SQPOLL);
if (ret < 0) {
if (errno == EINVAL || errno == EPERM)
@@ -79,12 +85,6 @@ int main(int argc, char *argv[])
goto err;
}
- for (i = 0; i < INFLIGHT; i++) {
- if (posix_memalign(&iovs[i].iov_base, 4096, 4096))
- goto err;
- iovs[i].iov_len = 4096;
- }
-
iov_off = off = 0;
for (i = 0; i < NR_IOS; i++) {
struct iovec *iov = &iovs[iov_off];
@@ -122,16 +122,14 @@ int main(int argc, char *argv[])
}
}
- if (fd != -1)
- close(fd);
- if (fname != argv[1])
- unlink(fname);
io_uring_queue_exit(&ring);
- return T_EXIT_PASS;
+ fret = T_EXIT_PASS;
err:
if (fd != -1)
close(fd);
if (fname != argv[1])
unlink(fname);
+ for (i = 0; i < INFLIGHT; i++)
+ free(iovs[i].iov_base);
return fret;
}
diff --git a/contrib/libs/liburing/test/sqwait.t/ya.make b/contrib/libs/liburing/test/sqwait.t/ya.make
index 303a16afd2..f4158286c5 100644
--- a/contrib/libs/liburing/test/sqwait.t/ya.make
+++ b/contrib/libs/liburing/test/sqwait.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/stdout.t/ya.make b/contrib/libs/liburing/test/stdout.t/ya.make
index 275a46da01..8ac1adca9d 100644
--- a/contrib/libs/liburing/test/stdout.t/ya.make
+++ b/contrib/libs/liburing/test/stdout.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/submit-and-wait.t/ya.make b/contrib/libs/liburing/test/submit-and-wait.t/ya.make
index 478d642e10..be62fd74d5 100644
--- a/contrib/libs/liburing/test/submit-and-wait.t/ya.make
+++ b/contrib/libs/liburing/test/submit-and-wait.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/submit-link-fail.t/ya.make b/contrib/libs/liburing/test/submit-link-fail.t/ya.make
index b5c1118f59..4290c82a65 100644
--- a/contrib/libs/liburing/test/submit-link-fail.t/ya.make
+++ b/contrib/libs/liburing/test/submit-link-fail.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/submit-reuse.t/ya.make b/contrib/libs/liburing/test/submit-reuse.t/ya.make
index 43c5fe34fa..bf46c40f1f 100644
--- a/contrib/libs/liburing/test/submit-reuse.t/ya.make
+++ b/contrib/libs/liburing/test/submit-reuse.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/symlink.t/ya.make b/contrib/libs/liburing/test/symlink.t/ya.make
index e689152500..d3c57e3bf5 100644
--- a/contrib/libs/liburing/test/symlink.t/ya.make
+++ b/contrib/libs/liburing/test/symlink.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/sync-cancel.t/ya.make b/contrib/libs/liburing/test/sync-cancel.t/ya.make
index 253fe4f7a7..2b7b8e0756 100644
--- a/contrib/libs/liburing/test/sync-cancel.t/ya.make
+++ b/contrib/libs/liburing/test/sync-cancel.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/teardowns.t/ya.make b/contrib/libs/liburing/test/teardowns.t/ya.make
index 2899e8be17..b3cca56bcb 100644
--- a/contrib/libs/liburing/test/teardowns.t/ya.make
+++ b/contrib/libs/liburing/test/teardowns.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/thread-exit.t/ya.make b/contrib/libs/liburing/test/thread-exit.t/ya.make
index 5ce470b9e1..6f5e2e45b5 100644
--- a/contrib/libs/liburing/test/thread-exit.t/ya.make
+++ b/contrib/libs/liburing/test/thread-exit.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/timeout-new.t/ya.make b/contrib/libs/liburing/test/timeout-new.t/ya.make
index 9ee0e1870d..a59b5d1f37 100644
--- a/contrib/libs/liburing/test/timeout-new.t/ya.make
+++ b/contrib/libs/liburing/test/timeout-new.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/timeout.c b/contrib/libs/liburing/test/timeout.c
index 0eb67315ac..6a97245617 100644
--- a/contrib/libs/liburing/test/timeout.c
+++ b/contrib/libs/liburing/test/timeout.c
@@ -14,6 +14,7 @@
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/eventfd.h>
#include "helpers.h"
#include "liburing.h"
@@ -1063,6 +1064,150 @@ err:
return 1;
}
+static int test_update_multishot_timeouts(struct io_uring *ring, unsigned long ms)
+{
+ struct io_uring_sqe *sqe;
+ struct io_uring_cqe *cqe;
+ struct __kernel_timespec ts, ts_upd;
+ unsigned long long exp_ms, base_ms = 10000;
+ struct timeval tv1, tv2;
+ int ret, i, nr = 6;
+ __u32 mode = 0;
+
+ msec_to_ts(&ts, base_ms);
+
+ msec_to_ts(&ts_upd, ms);
+ gettimeofday(&tv1, NULL);
+ gettimeofday(&tv2, NULL);
+
+ sqe = io_uring_get_sqe(ring);
+ if (!sqe) {
+ fprintf(stderr, "%s: get sqe failed\n", __FUNCTION__);
+ goto err;
+ }
+
+ msec_to_ts(&ts, base_ms);
+ io_uring_prep_timeout(sqe, &ts, 0, IORING_TIMEOUT_MULTISHOT);
+ sqe->user_data = 1;
+
+ sqe = io_uring_get_sqe(ring);
+ if (!sqe) {
+ fprintf(stderr, "%s: get sqe failed\n", __FUNCTION__);
+ goto err;
+ }
+
+ io_uring_prep_timeout(sqe, &ts, 0, IORING_TIMEOUT_MULTISHOT);
+ sqe->user_data = 2;
+
+ sqe = io_uring_get_sqe(ring);
+ if (!sqe) {
+ fprintf(stderr, "%s: get sqe failed\n", __FUNCTION__);
+ goto err;
+ }
+
+ io_uring_prep_timeout_update(sqe, &ts_upd, 1, mode);
+ sqe->user_data = 3;
+
+ sqe = io_uring_get_sqe(ring);
+ if (!sqe) {
+ fprintf(stderr, "%s: get sqe failed\n", __FUNCTION__);
+ goto err;
+ }
+
+ io_uring_prep_timeout_update(sqe, &ts_upd, 2, mode);
+ sqe->user_data = 4;
+
+ ret = io_uring_submit(ring);
+ if (ret == 0) {
+ fprintf(stderr, "%s: sqe submit failed: %d\n", __FUNCTION__, ret);
+ goto err;
+ }
+
+ for (i = 0; i < nr; i++) {
+ ret = io_uring_wait_cqe(ring, &cqe);
+ if (ret < 0) {
+ fprintf(stderr, "%s: wait completion %d\n", __FUNCTION__, ret);
+ goto err;
+ }
+
+ switch (cqe->user_data) {
+ case 1:
+ if (cqe->res != -ETIME) {
+ fprintf(stderr, "%s: got %d, wanted %d\n",
+ __FUNCTION__, cqe->res, -ETIME);
+ goto err;
+ }
+ exp_ms = mtime_since_now(&tv1);
+ if (exp_ms > 1.05 * ms) {
+ fprintf(stderr, "too long, timeout wasn't updated (expired after %llu instead of %lu)\n", exp_ms, ms);
+ goto err;
+ }
+ gettimeofday(&tv1, NULL);
+
+ break;
+ case 2:
+ if (cqe->res != -ETIME) {
+ fprintf(stderr, "%s: got %d, wanted %d\n",
+ __FUNCTION__, cqe->res, -ETIME);
+ goto err;
+ }
+ exp_ms = mtime_since_now(&tv2);
+ if (exp_ms > 1.05 * ms) {
+ fprintf(stderr, "too long, timeout wasn't updated (expired after %llu instead of %lu)\n", exp_ms, ms);
+ goto err;
+ }
+ gettimeofday(&tv2, NULL);
+ break;
+ case 3:
+ case 4:
+ if (cqe->res != 0) {
+ fprintf(stderr, "%s: got %d, wanted %d\n",
+ __FUNCTION__, cqe->res, 0);
+ goto err;
+ }
+ break;
+ default:
+ goto err;
+ }
+ io_uring_cqe_seen(ring, cqe);
+ }
+
+ sqe = io_uring_get_sqe(ring);
+ if (!sqe) {
+ fprintf(stderr, "%s: get sqe failed\n", __FUNCTION__);
+ goto err;
+ }
+
+ io_uring_prep_timeout_remove(sqe, 1, 0);
+
+ sqe = io_uring_get_sqe(ring);
+ if (!sqe) {
+ fprintf(stderr, "%s: get sqe failed\n", __FUNCTION__);
+ goto err;
+ }
+
+ io_uring_prep_timeout_remove(sqe, 2, 0);
+
+ ret = io_uring_submit(ring);
+ if (ret != 2) {
+ fprintf(stderr, "%s: sqe submit failed: %d\n", __FUNCTION__, ret);
+ goto err;
+ }
+
+ for (i = 0; i < 2; i++) {
+ ret = io_uring_wait_cqe(ring, &cqe);
+ if (ret < 0) {
+ fprintf(stderr, "%s: wait completion %d\n", __FUNCTION__, ret);
+ goto err;
+ }
+ io_uring_cqe_seen(ring, cqe);
+ }
+
+ return 0;
+err:
+ return 1;
+}
+
static int test_update_nonexistent_timeout(struct io_uring *ring)
{
struct io_uring_sqe *sqe;
@@ -1229,14 +1374,19 @@ static int test_timeout_link_cancel(void)
exit(0);
}
- if (waitpid(p, &wstatus, 0) == (pid_t)-1) {
- perror("waitpid()");
- return 1;
- }
- if (!WIFEXITED(wstatus) || WEXITSTATUS(wstatus)) {
- fprintf(stderr, "child failed %i\n", WEXITSTATUS(wstatus));
- return 1;
- }
+ do {
+ if (waitpid(p, &wstatus, 0) == (pid_t)-1) {
+ perror("waitpid()");
+ return 1;
+ }
+ if (!WIFEXITED(wstatus))
+ continue;
+ if (WEXITSTATUS(wstatus)) {
+ fprintf(stderr, "child failed %i\n", WEXITSTATUS(wstatus));
+ return 1;
+ }
+ break;
+ } while (1);
for (i = 0; i < 2; ++i) {
ret = io_uring_wait_cqe(&ring, &cqe);
@@ -1555,6 +1705,44 @@ err:
return 1;
}
+static int test_eventfd(void)
+{
+ struct __kernel_timespec ts = { .tv_sec = 5, };
+ struct io_uring_sqe *sqe;
+ struct io_uring ring;
+ int ev, ret;
+
+ ret = io_uring_queue_init(2, &ring, IORING_SETUP_DEFER_TASKRUN |
+ IORING_SETUP_SINGLE_ISSUER);
+ if (ret == -EINVAL) {
+ return T_EXIT_SKIP;
+ } else if (ret < 0) {
+ fprintf(stderr, "queue_init: %d\n", ret);
+ return T_EXIT_FAIL;
+ }
+
+ ev = eventfd(0, 0);
+ if (ev < 0) {
+ perror("eventfd");
+ return T_EXIT_SKIP;
+ }
+
+ ret = io_uring_register_eventfd(&ring, ev);
+ if (ret) {
+ fprintf(stderr, "register_eventfd: %d\n", ret);
+ return ret;
+ }
+
+ sqe = io_uring_get_sqe(&ring);
+ io_uring_prep_timeout(sqe, &ts, 100, 0);
+ sqe->user_data = 0x1234;
+ sqe->flags |= IOSQE_ASYNC;
+ io_uring_submit(&ring);
+
+ io_uring_queue_exit(&ring);
+ close(ev);
+ return T_EXIT_PASS;
+}
int main(int argc, char *argv[])
{
@@ -1747,6 +1935,12 @@ int main(int argc, char *argv[])
return ret;
}
+ ret = test_update_multishot_timeouts(&ring, 200);
+ if (ret) {
+ fprintf(stderr, "test_update_multishot_timeouts linked failed\n");
+ return ret;
+ }
+
if (sqpoll) {
ret = test_update_timeout(&sqpoll_ring, 0, false, false,
false);
@@ -1758,6 +1952,12 @@ int main(int argc, char *argv[])
}
}
+ ret = test_eventfd();
+ if (ret == T_EXIT_FAIL) {
+ fprintf(stderr, "test_eventfd failed\n");
+ return ret;
+ }
+
/*
* this test must go last, it kills the ring
*/
diff --git a/contrib/libs/liburing/test/timeout.t/ya.make b/contrib/libs/liburing/test/timeout.t/ya.make
index a0d748a68e..6e22e145bd 100644
--- a/contrib/libs/liburing/test/timeout.t/ya.make
+++ b/contrib/libs/liburing/test/timeout.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/truncate.t/ya.make b/contrib/libs/liburing/test/truncate.t/ya.make
index 4adbaa862e..4308bbb829 100644
--- a/contrib/libs/liburing/test/truncate.t/ya.make
+++ b/contrib/libs/liburing/test/truncate.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/tty-write-dpoll.t/ya.make b/contrib/libs/liburing/test/tty-write-dpoll.t/ya.make
index 4ddf4e4f1b..f66dbca749 100644
--- a/contrib/libs/liburing/test/tty-write-dpoll.t/ya.make
+++ b/contrib/libs/liburing/test/tty-write-dpoll.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/unlink.t/ya.make b/contrib/libs/liburing/test/unlink.t/ya.make
index 78082b4401..c57a2f8725 100644
--- a/contrib/libs/liburing/test/unlink.t/ya.make
+++ b/contrib/libs/liburing/test/unlink.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/uring_cmd_ublk.t/ya.make b/contrib/libs/liburing/test/uring_cmd_ublk.t/ya.make
index edc9a36693..4850a39ac2 100644
--- a/contrib/libs/liburing/test/uring_cmd_ublk.t/ya.make
+++ b/contrib/libs/liburing/test/uring_cmd_ublk.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/version.t/ya.make b/contrib/libs/liburing/test/version.t/ya.make
index aca2c8b392..52f5a7570e 100644
--- a/contrib/libs/liburing/test/version.t/ya.make
+++ b/contrib/libs/liburing/test/version.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/wait-timeout.t/ya.make b/contrib/libs/liburing/test/wait-timeout.t/ya.make
index ac1b89877f..b9292cca49 100644
--- a/contrib/libs/liburing/test/wait-timeout.t/ya.make
+++ b/contrib/libs/liburing/test/wait-timeout.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/waitid.t/ya.make b/contrib/libs/liburing/test/waitid.t/ya.make
index e3b160a48b..220c6b4cd0 100644
--- a/contrib/libs/liburing/test/waitid.t/ya.make
+++ b/contrib/libs/liburing/test/waitid.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/wakeup-hang.t/ya.make b/contrib/libs/liburing/test/wakeup-hang.t/ya.make
index 0dbdefae8c..99958e1662 100644
--- a/contrib/libs/liburing/test/wakeup-hang.t/ya.make
+++ b/contrib/libs/liburing/test/wakeup-hang.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/wq-aff.t/ya.make b/contrib/libs/liburing/test/wq-aff.t/ya.make
index 28c8e06301..a7f801920f 100644
--- a/contrib/libs/liburing/test/wq-aff.t/ya.make
+++ b/contrib/libs/liburing/test/wq-aff.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/test/xattr.t/ya.make b/contrib/libs/liburing/test/xattr.t/ya.make
index 1ef224a2df..3ecfae29b6 100644
--- a/contrib/libs/liburing/test/xattr.t/ya.make
+++ b/contrib/libs/liburing/test/xattr.t/ya.make
@@ -4,7 +4,7 @@ PROGRAM()
WITHOUT_LICENSE_TEXTS()
-VERSION(2.8)
+VERSION(2.9)
LICENSE(MIT)
diff --git a/contrib/libs/liburing/ya.make b/contrib/libs/liburing/ya.make
index 776c355623..74f2dea418 100644
--- a/contrib/libs/liburing/ya.make
+++ b/contrib/libs/liburing/ya.make
@@ -2,9 +2,9 @@
LIBRARY()
-VERSION(2.8)
+VERSION(2.9)
-ORIGINAL_SOURCE(https://github.com/axboe/liburing/archive/liburing-2.8.tar.gz)
+ORIGINAL_SOURCE(https://github.com/axboe/liburing/archive/liburing-2.9.tar.gz)
LICENSE(
"(GPL-2.0-only WITH Linux-syscall-note OR MIT)" AND
@@ -93,6 +93,7 @@ RECURSE(
test/fd-pass.t
test/fdinfo.t
test/fifo-nonblock-read.t
+ test/file-exit-unreg.t
test/file-register.t
test/file-update.t
test/file-verify.t
@@ -162,6 +163,7 @@ RECURSE(
test/pollfree.t
test/probe.t
test/read-before-exit.t
+ test/read-inc-file.t
test/read-mshot-empty.t
test/read-mshot-stdin.t
test/read-mshot.t
@@ -174,10 +176,12 @@ RECURSE(
test/reg-fd-only.t
test/reg-hint.t
test/reg-reg-ring.t
+ test/reg-wait.t
test/regbuf-clone.t
test/regbuf-merge.t
test/register-restrictions.t
test/rename.t
+ test/resize-rings.t
test/ring-leak.t
test/ring-leak2.t
test/ringbuf-read.t
@@ -196,6 +200,7 @@ RECURSE(
test/skip-cqe.t
test/socket-getsetsock-cmd.t
test/socket-io-cmd.t
+ test/socket-nb.t
test/socket-rw-eagain.t
test/socket-rw-offset.t
test/socket-rw.t