Make xfstests build use -O2 by default.
[xfstests-dev.git] / 014
1 #! /bin/sh
2 # FS QA Test No. 014
3 #
4 # truncfile
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=dxm@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=0        # success is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     cd /
24     rm -f $tmp.*
25     rm -rf $testdir/truncfile.$$.*
26     _cleanup_testdir
27 }
28
29 # get standard environment, filters and checks
30 . ./common.rc
31 . ./common.filter
32
33 _supported_fs xfs udf nfs
34 _supported_os IRIX Linux
35
36 _setup_testdir
37
38 echo "brevity is wit..."
39
40 echo "------"
41 echo "test 1"
42 echo "------"
43 if ! src/truncfile -c 10000 $testdir/truncfile.$$.0 >$tmp.out 2>&1
44 then
45     out=`cat $tmp.out`
46     echo "truncfile returned $? : \"$out\""
47 else
48     echo "OK"
49 fi
50
51 exit