summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-05-20Add test/eventfd-disable.c test caseStefano Garzarella
This new test checks if the mechanism to enable/disable notifications through eventfd when a request is completed works correctly. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-20test: use config.local for runtests.shJens Axboe
Add it to .gitignore as well. This makes it easier to have a local configuration that isn't overwritten by resetting the git tree, or pulling changes. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-20Add test case for SQPOLL -EBUSY bugJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19test/runtests.sh: check if configured test files existJens Axboe
Helps to catch early if you're missing a module load or filesystem mount. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19test/fadvise: support configured test filesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19test/madvise: support configured test filesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19test/read-write: support configured test filesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19test/iopoll: add buf_select test caseJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19test/iopoll: add polled IO test caseJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19test: add option to run with defined test files / devicesJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-19test: add potential argument, ignore if unusedJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-17splice/tee/tests: test len=0 splice/teePavel Begunkov
Check zero-length splice() and tee(). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-17tee/test: add test for tee(2)Pavel Begunkov
Add tee() tests with pipe data validation Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-17splice/test: improve splice testsPavel Begunkov
Split and test functionality separately, better cover registered files cases, and validate file\pipe actual data. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-15test/open-close: fix race with closing ring itselfJens Axboe
Depending on timing, we can get -EBADF from the waiting on a completion. This is fine, as we've closed the ring itself, so we cannot rely the completion coming in, it'll depend completely on the timing of events. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-01test/sfr: basic test for sync_file_rangePavel Begunkov
Just call it and check that it doesn't hang and returns success. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-30test/link-timeout: FASTPOLL kernels can cancel successfullyJens Axboe
We expect -EALREADY since an async worker was previously holding this request, but for kernels with FASTPOLL (5.7+), we can successfully cancel from the timeout. Allow -ETIME as well for the return value of the linked timeout. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-27test/statx: add test case for AT_EMPTY_PATH + valid fdJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-24Fix 32-bit warnings on compileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-24test: use mmap() directly in syzbot generated codeJens Axboe
Guillem reports that some new 32-bit architectures like armel and armhf don't have mmap, just mmap2. Just use mmap() and let libc deal with it, there's no reason why we need to call the specific mmap() system call. Reported-by: Guillem Jover <guillem@hadrons.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-09configure: check for struct statxJens Axboe
If not there, don't build the test program test/statx Fixes: https://github.com/axboe/liburing/issues/101 Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-08test/lfs-openat-write: return the correct errorJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-08Coding style cleanupsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-08test/lfs-openat-write: test LFS writes with OPENAT fileJens Axboe
Heavily based on test case from Dmitry Kadashev <dkadashev@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-08test/lfs-openat: unlink the right fileJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-04-08Add LFS openat testJens Axboe
Heavily based on test case from Dmitry Kadashev <dkadashev@gmail.com> Link: https://lore.kernel.org/io-uring/cc076d44-8cd0-1f19-2e79-45d2f0c5ace3@kernel.dk/T/#m894080c2370f51dd31cba85276d19b2720bc92a1 Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-23test/read-write: skip IOSQE_ASYNC if not supportedJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-20test/read-write: add RLIMIT_SIZE test caseJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-20test/fallocate: add test case for exceeding RLIMIT_FSIZEJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-14test/link-timeout: accept -ECANCELED for bad address write as wellJens Axboe
We just check for -EFAULT, but -ECANCELED is also OK and will happen on later kernels since we check earlier there for prep and defer. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-14test/read-write: add test case for links with async/drainJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-13test/test/sq-space_left: test kernel vs liburing side sync on short submitJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-11Change 'gid' to 'bgid' for providing buffersJens Axboe
This makes it clear it's a buffer group ID, and not some variant of a credential related group ID. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-10test/read-write: add more buffer select testsJens Axboe
Test both vectored and non-vectored reads, and also add two test cases for vectored and non-vectored short reads. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-08Fix warnings when compiling testsTaylor
On certain architectures, like ppc64, __u64 is a typedef of unsigned long rather than unsigned long long, which causes warnings when compiling tests that use the %llu printf specifier. If __SANE_USERSPACE_TYPES__ is defined before including <linux/types.h>, __u64 will instead be a typedef of unsigned long long.
2020-03-02test/send_recvmsg: cleanup on abortJens Axboe
If we don't have PROVIDE_BUFFERS, then ensure we free the ring, and (more importantly) up the mutex so we don't hang. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-02test/splice: don't use memfdJens Axboe
The previous include is not enough, some older distros don't have the memfd_create() in libc. Just get rid of it and open a regular file instead. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-02test/splice: include <linux/memfd.h>Jens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-29test/across-fork: have child wait for write finishJens Axboe
If we don't wait for the writes to finish, then the child exit could cause those writes to get canceled. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-29test/send_recvmsg: ensure that we get -ENOBUFS for no buffersJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-28test/send_recvmsg: add missing socket closeJens Axboe
This is especially important as we're now running two tests, and we don't want to leave one lingering and interfering. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-28test/read-write: ensure SQPOLL for non-root just warnsJens Axboe
Don't fail the test. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-27test/send_recvmsg: add support for BUF_SELECTJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-26test/poll-link: don't error out on connect failureJens Axboe
Just ignore the failure, it seems to trigger spuriously (like 1 in a 100 runs). Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-25test/read-write: fix non-root failureJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-25test/link: fix typoJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-25test/read-write: add test case for selectable buffersJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-25test/sq-poll-kthread: include grace period before thread checkJens Axboe
Files can be put async, which means that it may very well be that the thread is alive the instant after io_uring_queue_exit() has returned. Add a 1 second grace period before checking, hopefully that's enough to remove false positives from this test. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-24test/splice: fix-up test case on kernels not supporting spliceJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-24test/splice: add basic splice testsPavel Begunkov
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Minor edits/fixes Signed-off-by: Jens Axboe <axboe@kernel.dk>