4 # Test symlinks & ELOOP
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 # Note1: On Linux, ELOOP limit used to be 32 but changed to 8, and lately
15 # its become 5. Who knows what it might be next.
16 # Note2: On IRIX, the limit is around the 30 mark.
18 # What we are looking for here is: no panic due to blowing the stack;
19 # and that the ELOOP error code is returned at some point (the actual
20 # limit point is unimportant, just checking that we do hit it).
24 echo "QA output created by $seq"
28 status=0 # success is the default!
29 trap "_cleanup; exit \$status" 0 1 2 3 15
34 rm -f symlink_{0,1,2,3}{0,1,2,3,4,5,6,7,8,9} symlink_self empty_file
41 # On IRIX: Too many symbolic links in path name traversal
42 # On Linux: Too many levels of symbolic links
43 touch $@ 2>&1 | grep -q 'Too many.*symbolic links'
45 echo "ELOOP returned. Good."
47 echo "No ELOOP? Unexpected!"
51 # get standard environment, filters and checks
55 # real QA test starts here
56 _supported_fs xfs udf nfs
58 # IRIX UDF does not support symlinks
59 if [ $FSTYP == 'udf' ]; then
62 _supported_os Linux IRIX
71 for f in symlink_{0,1,2,3}{0,1,2,3,4,5,6,7,8,9}
77 ln -s symlink_self symlink_self
79 echo "*** touch deep symlinks"
81 _touch symlink_{0,1,2,3}{0,1,2,3,4,5,6,7,8,9}
83 echo "*** touch recusive symlinks"