generic: add test for boundary in xfs_attr_shortform_verify
[xfstests-dev.git] / tests / generic / 249
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2011 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 249
6 #
7 # simple splice(2) test.
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 $tmp.*
22         rm -f $SRC $DST
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28
29 # real QA test starts here
30 _supported_fs generic
31 _supported_os Linux
32 _require_test
33
34 echo "Feel the serenity."
35
36 SRC=$TEST_DIR/$seq.src
37 DST=$TEST_DIR/$seq.dst
38 rm -f $seqres.full
39
40 $XFS_IO_PROG -f -c "pwrite -S 0xa5a55a5a 0 32768k" -c fsync $SRC >> $seqres.full 2>&1
41 [ $? -ne 0 ] && _fail "xfs_io pwrite failed"
42 $XFS_IO_PROG -f -c "sendfile -i $SRC 0 32768k" -c fsync $DST >> $seqres.full 2>&1
43 [ $? -ne 0 ] && _fail "xfs_io sendfile failed"
44
45 diff -q $SRC $DST
46 status=$?
47 [ $status -ne 0 ] && _fail "$SRC and $DST differ"
48
49 exit