4 # The posix write test. when write size is larger than disk free size,
5 # should write as more as possible
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2011-2012 Fujitsu, Inc. All Rights Reserved.
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation.
14 # This program is distributed in the hope that it would be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write the Free Software Foundation,
21 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #-----------------------------------------------------------------------
26 owner=wu.bo@cn.fujitsu.com
29 echo "QA output created by $seq"
33 status=0 # success is the default!
34 trap "_cleanup; exit \$status" 0 1 2 3 15
39 rm -f $SCRATCH_MNT/* $tmp.*
46 # real QA test starts here
48 _supported_os IRIX Linux
51 echo "------------------------------"
52 echo "write lack test"
53 echo "------------------------------"
57 umount $SCRATCH_DEV 2>/dev/null
58 _scratch_mkfs_sized $((1 * 1024 * 1024 * 1024)) >>$seq.full 2>&1
64 dd if=/dev/zero of=tmp1 bs=4K count=1 >/dev/null 2>&1
67 echo "create file err"
72 dd if=/dev/zero of=tmp2 bs=1M >/dev/null 2>&1
73 dd if=/dev/zero of=tmp3 bs=4K >/dev/null 2>&1
79 dd if=/dev/zero of=tmp1 bs=8K count=1 >/dev/null 2>&1
80 _filesize=`du tmp1 | awk '{print $1}'`
81 if [ $_filesize -ne 4 ]