5 # simple inode link count test for a regular file
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
9 #-----------------------------------------------------------------------
15 echo "QA output created by $seq"
17 # get standard environment, filters and checks
23 status=0 # success is the default!
24 trap "_cleanup; exit \$status" 0 1 2 3 15
32 # real QA test starts here
33 _supported_fs xfs udf nfs
34 _supported_os IRIX Linux
38 echo "Silence is goodness ..."
40 # ensure target directory exists
41 mkdir `dirname $testdir/$tmp` 2>/dev/null
44 for l in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
46 ln $testdir/$tmp.1 $testdir/$tmp.$l
47 x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
50 echo "Arrgh, created link #$l and lstat64 looks like ..."
51 src/lstat64 $testdir/$tmp.1
56 for l in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
58 x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
61 echo "Arrgh, about to remove link #$l and lstat64 looks like ..."
62 src/lstat64 $testdir/$tmp.1
65 rm -f $testdir/$tmp.$l