path: root/test/nop.c
AgeCommit message (Collapse)Author
2022-05-16test/nop: make less verbose and don't fail on older kernelsbig-sqeJens Axboe
Signed-off-by: Jens Axboe <>
2022-05-16liburing: Test all configurations with NOP testStefan Roesch
This runs the NOP test with all four configurations: - default SQE and CQE size - large SQE size - large CQE size - large SQE and large CQE size Signed-off-by: Stefan Roesch <> Link: Signed-off-by: Jens Axboe <>
2022-05-16liburing: add large CQE tests to nop testStefan Roesch
This adds two test cases for large CQE's: - Single NOP test, which checks that the new extra1 and extra2 fields are set. - Multiple NOP submission test which also checks for the new fields. Signed-off-by: Stefan Roesch <> Link: [axboe: fixup cqe naming] Signed-off-by: Jens Axboe <>
2022-05-16test/nop: add basic IORING_SETUP_SQE128 testsJens Axboe
Just repeats the original test cases, but using a big ring. Assign and check for user_data never being NULL, which would be a common issue with mistakes between big and normal SQEs. Signed-off-by: Jens Axboe <>
2020-05-19test: add potential argument, ignore if unusedJens Axboe
Signed-off-by: Jens Axboe <>
2020-02-11Add SPDX license identifiersJens Axboe
Signed-off-by: Jens Axboe <>
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 <>
2019-11-12test: fix up dead code bugsJeff Moyer
Coverity pointed out some dead code. Fix it. Signed-off-by: Jeff Moyer <> Signed-off-by: Jens Axboe <>
2019-07-24src/Makefile: keep private headers in <liburing/*.h>Stefan Hajnoczi
It is not possible to install barrier.h and compat.h into the top-level /usr/include directly since they are likely to conflict with other software. io_uring.h could be confused with the system's kernel header file. Put liburing headers into <liburing/*.h> so there is no chance of conflicts or confusion. Existing applications continue to build successfully since the location of <liburing.h> is unchanged. In-tree examples and tests require modification because src/liburing.h is moved to src/include/liburing.h. Signed-off-by: Stefan Hajnoczi <> Signed-off-by: Jens Axboe <>
2019-04-18Rename completion helpersJens Axboe
We have io_uring_get_sqe() on the submission side, yet the completion side is named _completion. Rename as follows: io_uring_get_completion() io_uring_peek_cqe() iO_uring_wait_completion() io_uring_wait_cqe() This better tells the user what the _get variant does by calling it _peek instead, and we move to using _cqe() as the postfix instead of _completion. Signed-off-by: Jens Axboe <>
2019-04-17Add io_uring_cqe_seen()Jens Axboe
There's a failure case where an application gets a cqe entry, but the kernel can then overwrite it before the application is done reading it. This can happen since the io_uring_{get,wait}_completion() interface both returns a CQE pointer AND increments the ring index. If the kernel reuses this entry before the applications is done reading it, the contents may be corrupted. Remove the CQ head increment from the CQE retrieval, and put it into a separate helper, io_uring_cqe_seen(). The application must call this helper when it got a new CQE entry through one of the above calls, and it's now done reading it. Signed-off-by: Jens Axboe <>
2019-04-11test/nop: add NOP test caseJens Axboe
Signed-off-by: Jens Axboe <>