4 # check out-of-space behaviour
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #-----------------------------------------------------------------------
28 echo "QA output created by $seq"
32 status=1 # success is the default!
34 # get standard environment, filters and checks
43 trap "_cleanup; exit \$status" 0 1 2 3 15
47 _df_dir $SCRATCH_MNT | $AWK_PROG '{ print $5 }'
50 # real QA test starts here
52 _supported_os IRIX Linux
57 _scratch_mkfs_xfs -d size=50m >/dev/null || _fail "mkfs failed"
58 _scratch_mount || _fail "mount failed"
59 out=$SCRATCH_MNT/fillup.$$
65 echo " *** failed to get free space (0)"
68 echo "free space at start $free0" >> $seq.full
70 echo "fill disk:" # well, filesystem really - not disk
72 POSIXLY_CORRECT=yes dd if=/dev/zero of=$out bs=1024k 2>&1 | _filter_dd
74 echo "check free space:"
79 echo " *** failed to get free space (1)"
82 echo "free space after fill $free1" >> $seq.full
86 echo " *** file not created"
92 echo " *** file created with zero length"
101 echo " *** file not deleted"
107 echo " *** file still exists"
112 echo "check free space:"
117 echo " *** failed to get free space (2)"
120 echo "free space after delete $free2" >> $seq.full
123 _within_tolerance "free space" $free2 $free0 1% -v