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 _begin_fstest auto quick clone
12 # Import common functions.
16 # real QA test starts here
18 _require_scratch_reflink
21 _scratch_mkfs >>$seqres.full 2>&1
24 chmod a+rwx $SCRATCH_MNT
25 $XFS_IO_PROG -f -c "pwrite -S 0x18 0 1m" $SCRATCH_MNT/foo >>$seqres.full
26 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
28 sz="$(_get_filesize $SCRATCH_MNT/bar)"
29 if [ "$sz" -ne 0 ] && [ "$sz" -ne 65536 ]; then
30 echo "Oddball file size $sz??"
33 echo Silence is golden.