fstests: use _require_symlinks on all necessary tests
[xfstests-dev.git] / tests / generic / 006
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 006
6 #
7 # permname
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=0        # success is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20     cd /
21     rm -f $tmp.*
22     rm -rf $TEST_DIR/permname.$$
23 }
24
25 _count()
26 {
27     $AWK_PROG '
28         BEGIN   { count = 0 }
29                 { count ++ }
30         END     { print count " files created" }
31     '
32 }
33
34 # get standard environment, filters and checks
35 . ./common/rc
36 . ./common/filter
37
38 # real QA test starts here
39 _supported_fs generic
40 _supported_os Linux
41 _require_test
42
43 mkdir $TEST_DIR/permname.$$
44
45 echo ""
46 echo "single thread permname"
47 echo "----------------------"
48 mkdir $TEST_DIR/permname.$$/a
49 cd $TEST_DIR/permname.$$/a
50 $here/src/permname -c 4 -l 6 -p 1 || echo "permname returned $?"
51 find . | _count
52
53 echo ""
54 echo "multi thread permname"
55 echo "----------------------"
56 mkdir $TEST_DIR/permname.$$/b
57 cd $TEST_DIR/permname.$$/b
58 $here/src/permname -c 4 -l 6 -p 4 || echo "permname returned $?"
59 find . | _count
60
61 exit