mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
544262ae10
Several tests assume a certain amount of disk space free after the reserve block pool is filled. Changing the default size of the reserve block pool breaks these tests because there is less space available that first thought. Change these tests to specify a known reserve block pool size of 1024 blocks to ensure that they continue to work correctly even if the default size changes. Signed-off-by: Dave Chinner <david@fromorbit.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
60 lines
1.6 KiB
Bash
Executable File
60 lines
1.6 KiB
Bash
Executable File
#! /bin/bash
|
|
# FS QA Test No. 204
|
|
#
|
|
# Test out ENOSPC flushing on small filesystems.
|
|
#
|
|
#-----------------------------------------------------------------------
|
|
# Copyright (c) 2009 Christoph Hellwig.
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License as
|
|
# published by the Free Software Foundation.
|
|
#
|
|
# This program is distributed in the hope that it would be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write the Free Software Foundation,
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
#-----------------------------------------------------------------------
|
|
#
|
|
# creator
|
|
owner=hch@lst.de
|
|
|
|
seq=`basename $0`
|
|
echo "QA output created by $seq"
|
|
|
|
here=`pwd`
|
|
tmp=/tmp/$$
|
|
status=1 # failure is the default!
|
|
|
|
# get standard environment, filters and checks
|
|
. ./common.rc
|
|
. ./common.filter
|
|
|
|
# real QA test starts here
|
|
_supported_fs generic
|
|
_supported_os Linux
|
|
|
|
_require_scratch
|
|
|
|
SIZE=`expr 104 \* 1024 \* 1024`
|
|
_scratch_mkfs_sized $SIZE &> /dev/null
|
|
_scratch_mount
|
|
|
|
# fix the reserve block pool to a known size so that the enospc calculations
|
|
# work out correctly.
|
|
_scratch_resvblks 1024 > $seq.full 2>&1
|
|
|
|
for i in `seq 1 22500`; do
|
|
echo -n > $SCRATCH_MNT/$i
|
|
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > $SCRATCH_MNT/$i
|
|
done
|
|
|
|
# success, all done
|
|
echo "*** done"
|
|
rm -f $seq.full
|
|
status=0
|