mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
568920df38
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. Kernel
needs commit 3253d9d09337 ("splice: only read in as much information
as there is pipe buffer space") to pass.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
43 lines
803 B
Bash
Executable File
43 lines
803 B
Bash
Executable File
#! /bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (c) 2019, Oracle and/or its affiliates. All Rights Reserved.
|
|
#
|
|
# FS QA Test No. 591
|
|
#
|
|
# Test using splice() to read from pipes.
|
|
|
|
seq=`basename $0`
|
|
seqres=$RESULT_DIR/$seq
|
|
echo "QA output created by $seq"
|
|
|
|
here=`pwd`
|
|
tmp=/tmp/$$
|
|
status=1 # failure is the default!
|
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
|
|
|
_cleanup()
|
|
{
|
|
cd /
|
|
rm -f $TEST_DIR/a
|
|
}
|
|
|
|
# get standard environment, filters and checks
|
|
. ./common/rc
|
|
|
|
# real QA test starts here
|
|
_supported_os Linux
|
|
_supported_fs generic
|
|
_require_test
|
|
_require_test_program "splice-test"
|
|
|
|
rm -f $seqres.full
|
|
|
|
$here/src/splice-test -r $TEST_DIR/a
|
|
$here/src/splice-test -rd $TEST_DIR/a
|
|
$here/src/splice-test $TEST_DIR/a
|
|
$here/src/splice-test -d $TEST_DIR/a
|
|
|
|
# success, all done
|
|
status=0
|
|
exit
|