4 # reservation test with heavy cp workload
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2011-2012 Fujitsu, 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 #-----------------------------------------------------------------------
27 seqres=$RESULT_DIR/$seq
28 echo "QA output created by $seq"
32 status=0 # success is the default!
33 trap "_cleanup; exit \$status" 0 1 2 3 15
50 _cpu_num=`$here/src/feature -o`
51 threads=$(($_cpu_num * 50))
52 if [ $threads -gt 200 ]
63 if ! mkdir $SCRATCH_MNT/origin
65 echo "mkdir origin err"
70 cd $SCRATCH_MNT/origin
72 _disksize=`$DF_PROG -B 1 $SCRATCH_MNT | tail -1 | $AWK_PROG '{ print $5 }'`
73 _disksize=$(($_disksize / 3))
74 _num=$(($_disksize / $count / $threads / $block_size))
76 while [ $_i -lt $_num ]
78 dd if=/dev/zero of=file_$_i bs=$block_size count=$_count >/dev/null 2>&1
89 if ! mkdir $SCRATCH_MNT/sub_$_suffix
91 echo "mkdir sub_xxx err"
96 cp -r $SCRATCH_MNT/origin $SCRATCH_MNT/sub_$_suffix >>$seqres.full 2>&1
99 echo "_porter $_suffix not complete"
109 block_size=$(get_block_size $SCRATCH_MNT)
112 _file_create $block_size
116 while [ $_pid -lt $_threads ]
126 # real QA test starts here
127 _supported_fs generic
128 _supported_os IRIX Linux
131 echo "------------------------------"
132 echo "start the workload"
133 echo "------------------------------"
137 _scratch_unmount 2>/dev/null
138 _scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seqres.full 2>&1