xref: /freebsd/contrib/pjdfstest/tests/chown/06.t (revision fcb560670601b2a4d87bb31d7531c8dcc37ee71b)
1#!/bin/sh
2# $FreeBSD: head/tools/regression/pjdfstest/tests/chown/06.t 211410 2010-08-17 06:08:09Z pjd $
3
4desc="chown returns ELOOP if too many symbolic links were encountered in translating the pathname"
5
6dir=`dirname $0`
7. ${dir}/../misc.sh
8
9echo "1..10"
10
11n0=`namegen`
12n1=`namegen`
13
14expect 0 symlink ${n0} ${n1}
15expect 0 symlink ${n1} ${n0}
16expect ELOOP chown ${n0} 65534 65534
17expect ELOOP chown ${n1} 65534 65534
18expect ELOOP chown ${n0}/test 65534 65534
19expect ELOOP chown ${n1}/test 65534 65534
20expect ELOOP lchown ${n0}/test 65534 65534
21expect ELOOP lchown ${n1}/test 65534 65534
22expect 0 unlink ${n0}
23expect 0 unlink ${n1}
24