These are skipped because they are not applicable if files/devices are
provided for a special test run. Note this in the return status.
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
For maintainability and clarity, eschew the use of integer literals in
reporting test statuses. Instead, use a helper enum which contains
various values from the GNU exitcode protocol. Returning 0 or 1 is
obvious, and in the previous commit the ability to read "skip" (77) was
implemented. The final exit status is 99, which indicates some kind of
error in running the test itself.
A partial migration of existing pass/fail values in test sources is
included.
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
read(2)/write(2) and friends support sequential reads without giving an
explicit offset. The result of these should leave the file with an
incremented offset.
Add tests for both read and write to check that io_uring behaves
consistently in these scenarios. Expect that if you queue many
reads/writes, and set the IOSQE_IO_LINK flag, that they will behave
similarly to calling read(2)/write(2) in sequence.
Set IOSQE_ASYNC as well in a set of tests. This exacerbates the problem by
forcing work to happen in different threads to submission.
Also add tests for not setting IOSQE_IO_LINK, but allow the file offset to
progress past the end of the file.
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>