summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-05Add IORING_OP_LINK_TIMEOUT test caseslink-timeoutJens Axboe
Tries to cover a wide variety of things that could go wrong. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-05barrier.h: add generic smp_mb implementationJeff Moyer
This missing define causes build failures on s390: src/include/liburing.h:298: undefined reference to `io_uring_smp_mb' Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-05spec: Fedora RPM cleanupsJeff Moyer
Cole Robinson and Fabio Valenti made a number of suggestions for the .spec file: https://bugzilla.redhat.com/show_bug.cgi?id=1766157 * Release should be Release: 1%{?dist} so the .fcXX bits get appended to the version string * Source: should be a pointer to the upstream URL that hosts the release. In this case I think it should be https://github.com/axboe/liburing/archive/... the ending weirdness is due to github renaming the archive strangely. You might need to pass '-n %{name}-%{name}-%{version}' to %setup/%autosetup to tell it what the extracted archive name is * The %defattr lines should be removed: https://pagure.io/packaging-committee/issue/77 * The Group: lines should be removed * All the BuildRoot and RPM_BUILD_ROOT lines should be removed. %clean should be removed * The ./configure line should be replaced with just %configure * The 'make' call should be %make_build * The 'make install' call should be %make_install * The %pre and %post sections can be entirely removed, ldconfig is done automatically: https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets * The devel package 'Requires: liburing' should instead be: Requires: %{name} = %{version}-%{release} * The devel package should also have Requires: pkgconfig * I think all the %attr usage can be entirely removed, unless they are doing something that the build system isn't doing. * The Provides: liburing.so.1 shouldn't be necessary, I'm pretty sure RPM automatically adds annotations like this * Replace %setup with %autosetup, which will automatically apply any listed Patch: in the spec if anything is backported in the future. It's a small maintenace optimization These changes work on Fedora 31 and openSUSE Leap 15.1. Therefore they are likely to work on other rpm-based distributions too. Acked-by: Jeff Moyer <jmoyer@redhat.com> Tested-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-05Makefile: add missing .pc dependency on .spec fileStefan Hajnoczi
The version number is extracted from the .spec file. Make .pc depend on .spec so that VERSION variable substitutions are always up-to-date. Acked-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-05spec: update RPM version number to 0.2Stefan Hajnoczi
Acked-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-04Printout correct failure locations in test/timeout.cHrvoje Zeba
Some printouts were misleading, probably a c/p bug. Signed-off-by: Hrvoje Zeba <zeba.hrvoje@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-04Use msec parameter instead of TIMEOUT_MSEC in msec_to_ts()Hrvoje Zeba
Small fix to make sure correct ts structure is filled with correct values. Signed-off-by: Hrvoje Zeba <zeba.hrvoje@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-11-04README: add io-uring@vger.kernel.org list infoJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-30__io_uring_flush_sq(): remove unnecessary checkKornilios Kourtis
submitted is always going to be non-zero, since we check if head and tail are different at the start of the function. Signed-off-by: Kornilios Kourtis <kornilios@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-30sq_ring_needs_enter(): force loading of kflagsKornilios Kourtis
ring->sq.kflags is set by the kernel. Ensure the compiler always loads the value from memory when doing the check. Signed-off-by: Kornilios Kourtis <kornilios@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-30liburing/test: fix build errorsJoseph Qi
Fix the following errors when make: error: ‘for’ loop initial declarations are only allowed in C99 mode error: redeclaration of ‘i’ with no linkage Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-29Add test/io-cancelJens Axboe
This tests normal reads and writes mixed with IO cancellations. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-29Add IORING_OP_ASYNC_CANCEL and prep helperJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-27Add read/write test that does various combinations of IOJens Axboe
Tests a mixed of buffered, direct, SQTHREAD, fixed buffers. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25test/file-register: add huge file set test caseJens Axboe
Add a test case that registers 8K files (sparse), then does a file set update of a random file late in the set and performs some IO to it to ensure it works. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25test/defer: Test deferring with drain and linksPavel Begunkov
1. test user_data integrity with cancelled links 2. test the whole link is cancelled by sq_thread 3. hunging io_uring based on koverflow and kdropped Be aware, that this test may leave unkillable user process, or unstopped actively polling kthread. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-24liburing-0.2liburing-0.2Jens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-24Add runtests-loop targetJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-24test/send_recvmsg: hopefully make it reliableJens Axboe
Split the recv part in prep, sync, then receive. This should make it more reliable, hopefully. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-24test/send_recvmsg: ensure we exitJens Axboe
We may never get the data from the socket read, and this requires someone to SIGINT the test. Let's quit after 1 second if we haven't received anything. If the test is actually hung, the alive worker detection will catch it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-24test/runtests.sh: only log first test to have alive workers on exitJens Axboe
We still collect all of them, but no point spewing during the run. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-24test/accept: add test to see if we cancel correctly on exitJens Axboe
This will exit with 0 in both the normal and failure case, but the failure case will leave workers idle once done. We check for that in runtests.sh now. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-24test/runtests.sh: check for remaining io_uring workers on exitJens Axboe
That usually indicates a hang issue where we don't properly exit. Log is as _maybe_ failed. Note that if you see maybe failed, then the last in the list is likely the culprit. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-23test/timeout: add multi timeout reqs test with different countzhangyi (F)
Add multi timeout reqs test case which want to test submitting timeout reqs with different count number, check the return sequence and the status of each req. Signed-off-by: zhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-23test/timeout: add multi timeout reqs test with different timeoutzhangyi (F)
Add multi timeout reqs test case which want to test submitting timeout reqs with different timeout value, check the return sequence and the status of each req. Signed-off-by: zhangyi (F) <yi.zhang@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-21Shorten timeout testsJens Axboe
We use 1s for a lot of testing, shrink it down to 200 msec to allow it to run a bit quicker. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-21Add test for overflow of timeout request's sequenceyangerkun
Before 5da0fb1ab34c ("io_uring: consider the overflow of sequence for timeout req"). We can meet some situation like below: 1. setup 2. prepare 4 timeout req which expected count is 1,1,2,UINT_MAX, and the sequence of this 4 requests will be 1,2,4,2, this 4 requests will not lead the change of cached_cq_tail and sq_dropped until the timeout really happened. So the tail_index in io_timeout will still be 0. 3. based on the above and before this patch, the order of timeout_list will be req1->req2->req4->req3, which the right order should be req1->req2->req3->req4. 4. setup two nop requests. And the timeout requests will return correctly with the patch. Add this testcase to cover it. Signed-off-by: yangerkun <yangerkun@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-18test/accept: fix a few errorsJens Axboe
- Don't re-init the io_uring - SQPOLL can fail with -EBADF or -EINVAL, depends on which path the sqe takes. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-18test/accept: test that we -EINVAL for accept with SQPOLLJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17Add simple IORING_OP_ACCEPT test caseJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17test/socket-rw.c: use TCP, not pipesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17Add io_uring_prep_accept() helperJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17Sync with kernel io_uring.h headerJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17Add deadlock socket read/write test caseJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17Un-DOSify test/232c93d07b74-test.cJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-17Add test case for non-blocking socket reads/writesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-16Add IORING_OP_TIMEOUT_REMOVEJens Axboe
Add the command opcode, and add two test cases for it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-16test/timeout: cleanup cqe seen and error printsJens Axboe
Use stderr always, and include the function name. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-15Make io_uring_prep_timeout() take timeout flagsJens Axboe
Not in a released version yet, plan for using the flags since we already have the IORING_TIMEOUT_ABS flag. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-15Add test case for absolute timeoutsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-14Add test case for skb/socket ref count issues with fully sparse file setJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-09Add regression test case for commit 8a9973408177Jens Axboe
Anything that causes an async punt after a fileset has been unregistered will cause a NULL pointer deref. Add a test case for that. We use fsync() since that will always need an async punt. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-08test/runtests.sh: distinguish between failed and OK timeoutsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-08test/cq-size: use 'ret', not 'errno' directlyJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-08b/test/file-register: convert to library functions and clean upJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-08Add io_uring_register_files_update()Jens Axboe
Interface to the new file set update functionality. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-08test/runtests.sh: check for root before using /dev/kmsgJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-07test/file-register: close/unlink test_shrink() filesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-07test/file-register: catch succeeding with too many fdsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-04Add test case for application specified cq ring sizeJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>