Whamcloud - gitweb
tests: use /tmp for scratch files
[tools/e2fsprogs.git] / tests / m_mkfs_overhead / script
1 echo -n "test bg overhead calculation: "
2
3 OUT=$test_name.log
4 EXP=$test_dir/expect
5 FS_SIZE=1024
6 MKE2FS_OPTS="-b 1024 -m 0 -g 256 -N 3745"
7
8 MKE2FS_SKIP_PROGRESS=true
9 MKE2FS_SKIP_CHECK_MSG=true
10 export MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
11 > $TMPFILE
12
13 cp /dev/null $OUT
14
15 $MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 | sed -e 1d | \
16         sed -e "s;$TMPFILE;test.img;" | tr -d \\015 > $OUT
17
18 rm -f $TMPFILE
19
20 rm -f $test_name.ok $test_name.failed
21 cmp -s $OUT $EXP
22 status1=$?
23
24 if [ "$status1" = 0 ] ; then
25         echo "ok"
26         touch $test_name.ok
27 else
28         echo "failed"
29         diff $DIFF_OPTS $EXP $OUT > $test_name.failed
30 fi
31 rm -f tmp_expect
32
33 unset OUT EXP DESCRIPTION FS_SIZE MKE2FS_OPTS MKE2FS_SKIP_PROGRESS