2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
7 # Test symlinks & ELOOP
10 # Note: On Linux, ELOOP limit used to be 32 but changed to 8, and lately
11 # its become 5. Who knows what it might be next.
13 # What we are looking for here is: no panic due to blowing the stack;
14 # and that the ELOOP error code is returned at some point (the actual
15 # limit point is unimportant, just checking that we do hit it).
19 seqres=$RESULT_DIR/$seq
20 echo "QA output created by $seq"
24 status=0 # success is the default!
25 trap "_cleanup; exit \$status" 0 1 2 3 15
30 rm -f symlink_{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9} symlink_self empty_file
36 touch $@ 2>&1 | grep -q 'Too many levels of symbolic links'
38 echo "ELOOP returned. Good."
40 echo "No ELOOP? Unexpected!"
44 # get standard environment, filters and checks
48 # real QA test starts here
58 for f in symlink_{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9}
64 ln -s symlink_self symlink_self
66 echo "*** touch deep symlinks"
68 _touch symlink_{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9}
70 echo "*** touch recusive symlinks"