4 # check out-of-space behaviour
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
18 status=1 # success is the default!
20 # get standard environment, filters and checks
29 trap "_cleanup; exit \$status" 0 1 2 3 15
33 _df_dir $SCRATCH_MNT | $AWK_PROG '{ print $5 }'
40 /records out/ { next }
41 /No space left on device/ { print " !!! disk full (expected)"
47 # real QA test starts here
49 _supported_os IRIX Linux
54 _scratch_mkfs_xfs -d size=50m >/dev/null || _fail "mkfs failed"
55 _scratch_mount || _fail "mount failed"
56 out=$SCRATCH_MNT/fillup.$$
62 echo " *** failed to get free space (0)"
65 echo "free space at start $free0" >> $seq.full
67 echo "fill disk:" # well, filesystem really - not disk
69 POSIXLY_CORRECT=yes dd if=/dev/zero of=$out bs=1024k 2>&1 | _filter_dd
71 echo "check free space:"
76 echo " *** failed to get free space (1)"
79 echo "free space after fill $free1" >> $seq.full
83 echo " *** file not created"
89 echo " *** file created with zero length"
98 echo " *** file not deleted"
104 echo " *** file still exists"
109 echo "check free space:"
114 echo " *** failed to get free space (2)"
117 echo "free space after delete $free2" >> $seq.full
120 _within_tolerance "free space" $free2 $free0 1% -v