summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2020-03-04test/orc: soft fail if filename isn't givenfd-selectJens Axboe
Otherwise the test suite complains. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-04test/accept: add SOCK_SPECIFIC_FD test caseJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-04Add sample open-read-close chainJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
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>
2020-02-23test/accept-link: update for FAST_POLLJens Axboe
We can actually cancel more easily with fast poll, as we don't have to return -EALREADY if a thread is running the work. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-21test: add sq-poll-kthread test caseliburing-0.4Stefano Garzarella
sq-poll-kthread tests if the 'io_uring-sq' kthread is stopped when the userspace process ended with or without closing the io_uring fd. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-14test: Initialize the data struct to set stop member to 0Guillem Jover
The send_thread() will do an early return if the stop member is true, which can happen in case we do not initialize the memory. Otherwise we will then get a failure with -EALREADY instead of the expected -ECANCELED. Signed-off-by: Guillem Jover <guillem@hadrons.org>
2020-02-14test: Distinguish failure messages for accept-linkGuillem Jover
We are testing two modes, one with accept, the other with accept and connect, and having the same error message makes it harder to see what went wrong where. Signed-off-by: Guillem Jover <guillem@hadrons.org>
2020-02-14test: Expect fail values from io_uring calls to be -errno instead of -1Guillem Jover
On error these functions return -errno instead of -1, otherwise we will not catch these and the tests will segfault. Signed-off-by: Guillem Jover <guillem@hadrons.org>
2020-02-14test: Handle NULL sqe and cqe in testsGuillem Jover
We need to check the return values from io_uring_queue_init() and recv_prep() or we will be passing a NULL sqe to io_uring_get_sqe(), or a NULL cge to io_uring_wait_cqe(). Signed-off-by: Guillem Jover <guillem@hadrons.org>
2020-02-14test: Unify queue init failed error messageGuillem Jover
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2020-02-14test: Cleanup file artifacts on early exitsGuillem Jover
We should either unlink(2) the files after the first open in case we do not need them anymore, or when doing an early exit(2) to skip a test or from an error. Signed-off-by: Guillem Jover <guillem@hadrons.org>
2020-02-14test: Skip tests where the kernel lacks supportGuillem Jover
Signed-off-by: Guillem Jover <guillem@hadrons.org>
2020-02-13test/poll-cancel-ton: reap events after submitJens Axboe
If the polls complete, then we can have events immediately. Ensure we nowait reap to prevent overflows. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-12Correctly handle if __kernel_timespec is definedJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-11Add SPDX license identifiersJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-07Add relative path testingJens Axboe
This adds AT_FDCWD test cases for openat2 and open-close. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-06test/poll-v-poll: add variant that uses io_uring for epoll_ctl()Jens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-02Merge branch 'across-fork-test' of https://github.com/anarazel/liburingJens Axboe
* 'across-fork-test' of https://github.com/anarazel/liburing: Add test for sharing uring across fork Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-02Add circular eventfd test caseJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-02test/eventfd: skip on earlier kernelsJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-02Add test for sharing uring across forkAndres Freund
Signed-off-by: Andres Freund <andres@anarazel.de>
2020-02-01test/read-write: skip eventfd read if we know we don't have READJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-01Merge branch 'eventfd_test' of https://github.com/cor3ntin/liburingJens Axboe
* 'eventfd_test' of https://github.com/cor3ntin/liburing: Add a test for reading from eventfd
2020-02-01Use stderr consistently in test/ casesJens Axboe
This is a start, still some to go. The goal here is to ensure that we use stderr consistently for errors, and include the error value as well. Right now folks copy/paste test cases (which they should), but that also means they should be doing the right thing so we don't keep adding test cases that just use stdout for errors, or don't include the error value. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-01test/send_recv: use stderr for errorsJens Axboe
And include error value. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-02test: add test for send_recvCarter Li
Also ensure that `test/send_recvmsg.c` the recv thread finishs before the process exits Signed-off-by: Carter Li <carter.li@eoitek.com>
2020-01-31Add eventfd test caseJens Axboe
Tests both the completion side, but also the recursion bug that was fixed in commit 50167d5bc585 in mainline. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-31add another helper for probing existing opcodesGlauber Costa
There are situations where one does not have a ring initialized yet, and yet they may want to know which opcodes are supported before doing so. We have recently introduced io_uring_get_probe(io_uring*) to do a similar task when the ring already exists. Because this was committed recently and this hasn't seen a release, I thought I would just go ahead and change that to io_uring_get_probe_ring(io_uring*), because I suck at finding another meaningful name for this case (io_uring_get_probe_noring sounded way too ugly to me) A minimal ring is initialized and torn down inside the function. Signed-off-by: Glauber Costa <glauber@scylladb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-30test/probe: add test csae for io_uring_get_probe()Jens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-30test/probe: split verification into helperJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-29test/personality: update to modified APIJens Axboe
Also include a LINK test, so we can verify that switching credentials works fine for deferred requests too. Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-28test/shared-wq: remove debug sleepJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-28test/personality: test invalid unregister IDJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-28test/personality: test invalid personalityJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-28Add personality test caseJens Axboe
Signed-off-by: Jens Axboe <axboe@kernel.dk>