generic: test splice() with pipes
PATCH 1/1 generic: test splice() with pipes
From: Darrick J. Wong <[email protected]>
Andreas Grünbacher reports that on the two filesystems that support iomap directio, it's possible for splice() to return -EAGAIN (instead of a short splice) if the pipe being written to has less space available in its pipe buffers than the length supplied by the calling process.
This is a regression test to check for correct operation.
Signed-off-by Darrick J. Wong <[email protected]>
--- .gitignore | 1 src/Makefile | 2 - src/splice-test.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/720 | 41 ++++++++++++ tests/generic/720.out | 7 ++ tests/generic/group | 1 6 files changed, 224 insertions(+), 1 deletion(-) create mode 100644 src/splice-test.c create mode 100755 tests/generic/720 create mode 100644 tests/generic/720.out
.gitignore +1 -0
@@ -113,6 +113,7 @@ /src/runas /src/seek_copy_test /src/seek_sanity_test +/src/splice-test /src/stale_handle /src/stat_test /src/swapon
src/Makefile +1 -1
@@ -28,7 +28,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \ attr-list-by-handle-cursor-test listxattr dio-interleaved t_dir_type \ dio-invalidate-cache stat_test t_encrypted_d_revalidate \ attr_replace_test swapon mkswap t_attr_corruption t_open_tmpfiles \ - fscrypt-crypt-util bulkstat_null_ocount + fscrypt-crypt-util bulkstat_null_ocount splice-test SUBDIRS = log-writes perf
src/splice-test.c new file +173 -0
173 lines not on this page · raw message
tests/generic/720 new file +41 -0
41 lines not on this page · raw message
tests/generic/720.out new file +7 -0
@@ -0,0 +1,7 @@ +QA output created by 720 +concurrent reader with O_DIRECT +concurrent reader with O_DIRECT +concurrent reader without O_DIRECT +concurrent reader without O_DIRECT +sequential reader with O_DIRECT +sequential reader without O_DIRECT
tests/generic/group +1 -0
@@ -591,4 +591,5 @@ 586 auto quick rw prealloc 587 auto quick rw prealloc 588 auto quick log clone +720 auto quick rw pipe splice 721 auto quick atime