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 _begin_fstest dir udf auto quick
21 status=0 # success is the default!
23 # Override the default cleanup function.
27 rm -f symlink_{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9} symlink_self empty_file
33 touch $@ 2>&1 | grep -q 'Too many levels of symbolic links'
35 echo "ELOOP returned. Good."
37 echo "No ELOOP? Unexpected!"
41 # Import common functions.
44 # real QA test starts here
53 for f in symlink_{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9}
59 ln -s symlink_self symlink_self
61 echo "*** touch deep symlinks"
63 _touch symlink_{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9}
65 echo "*** touch recusive symlinks"