fixed Makefile for building dmapi tests
[xfstests-dev.git] / 006
1 #! /bin/sh
2 # FS QA Test No. 006
3 #
4 # permname
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/permname.$$
26     _cleanup_testdir
27 }
28
29 _count()
30 {
31     $AWK_PROG '
32         BEGIN   { count = 0 }
33                 { count ++ }
34         END     { print count " files created" }
35     '
36 }
37
38 # get standard environment, filters and checks
39 . ./common.rc
40 . ./common.filter
41
42 # real QA test starts here
43 _supported_fs xfs udf nfs
44 _supported_os IRIX Linux
45
46 _setup_testdir
47
48 mkdir $testdir/permname.$$
49
50 echo ""
51 echo "single thread permname"
52 echo "----------------------"
53 mkdir $testdir/permname.$$/a
54 cd $testdir/permname.$$/a
55 $here/src/permname -c 4 -l 6 -p 1 || echo "permname returned $?"
56 find . | _count
57
58 echo ""
59 echo "multi thread permname"
60 echo "----------------------"
61 mkdir $testdir/permname.$$/b
62 cd $testdir/permname.$$/b
63 $here/src/permname -c 4 -l 6 -p 4 || echo "permname returned $?"
64 find . | _count
65
66 exit