generic: test splice() with pipes
[xfstests-dev.git] / tests / generic / 591
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2019, Oracle and/or its affiliates.  All Rights Reserved.
4 #
5 # FS QA Test No. 591
6 #
7 # Test using splice() to read from pipes.
8
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1    # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20         cd /
21         rm -f $TEST_DIR/a
22 }
23
24 # get standard environment, filters and checks
25 . ./common/rc
26
27 # real QA test starts here
28 _supported_os Linux
29 _supported_fs generic
30 _require_test
31 _require_test_program "splice-test"
32
33 rm -f $seqres.full
34
35 $here/src/splice-test -r $TEST_DIR/a
36 $here/src/splice-test -rd $TEST_DIR/a
37 $here/src/splice-test $TEST_DIR/a
38 $here/src/splice-test -d $TEST_DIR/a
39
40 # success, all done
41 status=0
42 exit