xref: /freebsd/contrib/pjdfstest/tests/chmod/06.t (revision 1fb62fb074788ca4713551be09d6569966a3abee)
1#!/bin/sh
2# $FreeBSD: head/tools/regression/pjdfstest/tests/chmod/06.t 211474 2010-08-18 22:06:43Z pjd $
3
4desc="chmod returns ELOOP if too many symbolic links were encountered in translating the pathname"
5
6dir=`dirname $0`
7. ${dir}/../misc.sh
8
9if supported lchmod; then
10	echo "1..10"
11else
12	echo "1..8"
13fi
14
15n0=`namegen`
16n1=`namegen`
17
18expect 0 symlink ${n0} ${n1}
19expect 0 symlink ${n1} ${n0}
20expect ELOOP chmod ${n0} 0644
21expect ELOOP chmod ${n1} 0644
22expect ELOOP chmod ${n0}/test 0644
23expect ELOOP chmod ${n1}/test 0644
24if supported lchmod; then
25	expect ELOOP lchmod ${n0}/test 0644
26	expect ELOOP lchmod ${n1}/test 0644
27fi
28expect 0 unlink ${n0}
29expect 0 unlink ${n1}
30