2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Oracle, Inc. All Rights Reserved.
7 # Ensure that file size resource limits are respected when reflinking.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
13 status=1 # failure is the default!
14 trap "_cleanup; exit \$status" 0 1 2 3 15
22 # get standard environment, filters and checks
27 # real QA test starts here
29 _require_scratch_reflink
34 _scratch_mkfs >>$seqres.full 2>&1
37 chmod a+rwx $SCRATCH_MNT
38 $XFS_IO_PROG -f -c "pwrite -S 0x18 0 1m" $SCRATCH_MNT/foo >>$seqres.full
39 su -s/bin/bash - $qa_user -c "ulimit -f 64 ; $XFS_IO_PROG -f -c \"reflink $SCRATCH_MNT/foo\" $SCRATCH_MNT/bar" >> $seqres.full 2>&1
41 sz="$(_get_filesize $SCRATCH_MNT/bar)"
42 if [ "$sz" -ne 0 ] && [ "$sz" -ne 65536 ]; then
43 echo "Oddball file size $sz??"
46 echo Silence is golden.