]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/pjdfstest/tests/chmod/06.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / pjdfstest / tests / chmod / 06.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="chmod returns ELOOP if too many symbolic links were encountered in translating the pathname"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 if supported lchmod; then
10         echo "1..10"
11 else
12         echo "1..8"
13 fi
14
15 n0=`namegen`
16 n1=`namegen`
17
18 expect 0 symlink ${n0} ${n1}
19 expect 0 symlink ${n1} ${n0}
20 expect ELOOP chmod ${n0} 0644
21 expect ELOOP chmod ${n1} 0644
22 expect ELOOP chmod ${n0}/test 0644
23 expect ELOOP chmod ${n1}/test 0644
24 if supported lchmod; then
25         expect ELOOP lchmod ${n0}/test 0644
26         expect ELOOP lchmod ${n1}/test 0644
27 fi
28 expect 0 unlink ${n0}
29 expect 0 unlink ${n1}