Age | Commit message (Collapse) | Author |
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
_ANY will match any request, no keys needed. Allows canceling any
request on the ring.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Have two different files active, cancel each set separately and
check we get the expected results.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Not complete yet, but tests the basic functionality of canceling based
on a file descriptor and canceling all requests pending with just a
single cancelation request.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
This sets up the cancelation request to be fd based.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Pull test fixes from Ammar Faizi:
- Two fixes for `-Wunused-but-set-variable` warning from clang-15.
- Fix the wrong assertion condition and testfile cleanup in
test/submit_reuse.
Link: https://github.com/axboe/liburing/pull/567
* tag 'test-fixes-2022-04-15' of https://github.com/ammarfaizi2/liburing:
test/submit-reuse: Fix `-Wunused-but-set-variable` warning from clang-15
test/35fa71a030ca: Fix `-Wunused-but-set-variable` warning from clang-15
test/rw_merge_test: Fix the wrong assertion condition and unlink testfile
|
|
clang-15 correctly warns:
```
submit-reuse.c:29:6: error: variable 'i' set but not used \
[-Werror,-Wunused-but-set-variable]
int i = 0;
^
1 error generated.
make[1]: *** [Makefile:210: submit-reuse.t] Error 1
```
Remove the i variable here, it's not used.
Fixes: ad543701a816d0d84383a8aafb1ce27ee2f93053 ("Add test case for -EFAULT triggered by iov reuse")
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
|
|
clang-15 correctly warns:
```
35fa71a030ca.c:241:7: error: variable 'iter' set but not used \
[-Werror,-Wunused-but-set-variable]
int iter;
^
1 error generated.
make[1]: *** [Makefile:210: 35fa71a030ca.t] Error 1
```
Remove the iter variable here, it's not used.
Fixes: 78f59df3339191a500d9a27e2fe9d2eea888a2e0 ("Add regression test cases for three recent issues")
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
|
|
The following code:
```
ret = pipe(pipe1);
assert(!ret);
fd = open("testfile", O_RDWR | O_CREAT, 0644);
assert(ret >= 0); // wrong assertion condition here
```
is wrong, we should check the @fd after open(), not @ret.
While in there, add unlink("testfile") to make the "git status" clean
after running this test.
Fixes: d731f67819523f76520994b8408a76da4ec30309 ("add test case for 5.4 io merge regression logic")
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
|
|
The man page was missing IORING_FEAT_CQE_SKIP and IORING_FEAT_LINKED_FILE,
add an explanation for them.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
If this is set in features, applications can rely on file assignments
being done sanely in deferred execution setups (like links, or drain).
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
This reverts commit 9236f53a8ffe96cc2430f7131bbcba5756b97bc2.
"make install DESTDIR=..." specifies a root directory where files are
installed. For example, includedir=/usr/include DESTDIR=/a should
install header files into /a/usr/include.
Commit 9236f53a8ffe removed the includedir=, etc arguments on the make
command-line in ./Makefile, leaving only prefix=$(DESTDIR)$(prefix). It
claimed "prefix suffice for setting *dir variables in src/Makefile" but
this is incorrect. "make install DESTDIR=..." now has no effect and
files are not installed with a DESTDIR prefix.
The GNU make manual 9.5 Overriding Variables says:
all ordinary assignments of the same variable in the makefile are
ignored; we say they have been overridden by the command line
argument.
This explains why it was necessary to set includedir=, etc on the make
command-line in ./Makefile. We need to override these variables with
DESTDIR from the command-line so they are not clobbered in src/Makefile
when config-host.mak is included.
Cc: Paymon MARANDI <darwinskernel@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://lore.kernel.org/r/20220414063651.81341-1-stefanha@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
A previous commit renamed all test targets to foo.t, but didn't update
the timeout test case. Hence it now tries to exec something that isn't
there and rightfully complains about it:
Running test timeout.t Can't find exec-target, skipping
Update the test to use the right target.
Fixes: f200b5bba701 ("test/Makefile: Append `.t` to the test binary")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
This isn't important to liburing itself, but may be to users that do
odd things like include this file. And it makes it consistent with
the exported header.
Fixes: https://github.com/axboe/liburing/issues/560
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Threaded applications can use this optimization, but they cannot use it
if they share any given ring between multiple threads.
Link: https://github.com/axboe/liburing/issues/559
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
* 'changes-3' of https://github.com/ewyler/liburing:
Review and update .3 and .7 man pages
|
|
- Use of "consumed" vs "processed" was inconsistent - "consumed" was
more common, so I changed the few instances of "processed" to that. It
was non-obvious to me if consumption was different from processing, so
this removes that ambiguity.
- Fixed a few comma splices and typos in both function names and
descriptions.
Signed-off-by: Eric Wyler <ewyler@gmail.com>
|
|
https://github.com/dankamongmen/liburing
* 'dankamongmen/remove-double-cast' of https://github.com/dankamongmen/liburing:
remove double casts
|
|
Signed-off-by: nick black <nickblack@linux.com>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
statx target is now statx.t, make sure it's correct in all_targets.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
When adding a new test, we often forget to add the new test binary to
`.gitignore`. Append `.t` to the test binary filename, this way we can
use a wildcard matching "test/*.t" in `.gitignore` to ignore all
test binary files.
Goals:
- Make the .gitignore simpler.
- Avoid the burden of adding a new test to .gitignore.
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Link: https://lore.kernel.org/r/20220403182200.259937-4-ammarfaizi2@gnuweeb.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Instead of overriding LDFLAGS one by one for tests that need pthread,
append -lpthread to LDFLAGS for all tests. This makes the Makefile
script simpler. It also saves some hassle when we add a new test
that does use pthread.
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Link: https://lore.kernel.org/r/20220403182200.259937-3-ammarfaizi2@gnuweeb.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Simplify the test filename.
mv -v test/232c93d07b74-test.c test/232c93d07b74.c
mv -v test/35fa71a030ca-test.c test/35fa71a030ca.c
mv -v test/500f9fbadef8-test.c test/500f9fbadef8.c
mv -v test/7ad0e4b2f83c-test.c test/7ad0e4b2f83c.c
mv -v test/8a9973408177-test.c test/8a9973408177.c
mv -v test/917257daa0fe-test.c test/917257daa0fe.c
mv -v test/a0908ae19763-test.c test/a0908ae19763.c
mv -v test/a4c0b3decb33-test.c test/a4c0b3decb33.c
mv -v test/b19062a56726-test.c test/b19062a56726.c
mv -v test/b5837bd5311d-test.c test/b5837bd5311d.c
mv -v test/ce593a6c480a-test.c test/ce593a6c480a.c
mv -v test/d4ae271dfaae-test.c test/d4ae271dfaae.c
mv -v test/d77a67ed5f27-test.c test/d77a67ed5f27.c
mv -v test/eeed8b54e0df-test.c test/eeed8b54e0df.c
mv -v test/fc2a85cb02ef-test.c test/fc2a85cb02ef.c
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Link: https://lore.kernel.org/r/20220403182200.259937-2-ammarfaizi2@gnuweeb.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Link: https://lore.kernel.org/r/20220403095602.133862-2-ammarfaizi2@gnuweeb.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Pull a configure script fix from Ammar Faizi:
- Allow the configure script to fail with a non-zero exit code.
Link: https://github.com/axboe/liburing/pull/553
Link: https://github.com/axboe/liburing/pull/554
* tag 'liburing-2022-05-01' of https://github.com/ammarfaizi2/liburing:
configure: Allow the configure script to fail with a non-zero exit code
|
|
For poorly configured environments, configure may fail but will still
exit with code 0. This, in turn, causes cryptic build errors later.
Fix this by adding "set -e". Also, append "|| true" to prevent the
`expr` command breaks because it will return a non-zero exit code if
the regex doesn't match.
Closes: https://github.com/axboe/liburing/pull/553
Co-authored-by: Roman Gershman <romange@gmail.com>
Signed-off-by: Roman Gershman <romange@gmail.com>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
|
|
If we do:
<open fileX into slot 0>
<open fileY into slot 0><read slot 0><close slot 0>
this should be consistent with not having opened fileX first, and the
read should be satisfied from fileY.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
We need it dropped at prep time, don't assume that read prep will
validate the fd.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
We need it dropped at prep time, don't assume that read prep will
validate the fd.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
This just limits us to a newer kernel, and we use SKIP in testing it
anyway.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Test that it works with both LINK and DRAIN.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
* 'master' of https://github.com/rojkov/liburing:
Add SECURITY.md
|
|
Define an initial security policy in the file SECURITY.md.
The content of the file will become the content of the
page https://github.com/axboe/liburing/security/policy.
Fixes: https://github.com/axboe/liburing/issues/534
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Add tests for accept that queues multiple accepts and then ensures the
correct things happen.
Check that when connections arrive one at a time that only one CQE is
posted (in blocking and nonblocking sockets), as well as make sure that
closing the accept socket & cancellation all work as expected.
This relies on a kernel with [1] for the tests to pass.
[1]: https://lore.kernel.org/io-uring/20220325093755.4123343-1-dylany@fb.com/
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220325094013.4132496-1-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Add tests for accept sockets with O_NONBLOCK. Add a test for queueing the
accept both before and after connect(), which tests slightly different
code paths. After connect() has always worked, but before required changes
to the kernel.
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220324143547.2882041-1-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Remove it from the io_uring_prep_msg_ring.3 man page as it's no longer
being set by the kernel, and remove the definition and comment from the
kernel header.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
It's not strictly needed, just don't test for it. We validate the
user_data being passed.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Not using nonblocking sockets here anymore, so just kill it.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Submit two separate writes, and a receiver that asks for the combined
length should receive the combined length, not half of it.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
We should expect just half of the requested amount for a DGRAM socket.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|