xref: /freebsd/contrib/pjdfstest/tests/link/08.t (revision cd0d51baaa4509a1db83251a601d34404d20c990)
1#!/bin/sh
2# vim: filetype=sh noexpandtab ts=8 sw=8
3# $FreeBSD: head/tools/regression/pjdfstest/tests/link/08.t 211352 2010-08-15 21:24:17Z pjd $
4
5desc="link returns ELOOP if too many symbolic links were encountered in translating one of the pathnames"
6
7dir=`dirname $0`
8. ${dir}/../misc.sh
9
10echo "1..10"
11
12n0=`namegen`
13n1=`namegen`
14n2=`namegen`
15
16expect 0 symlink ${n0} ${n1}
17expect 0 symlink ${n1} ${n0}
18expect ELOOP link ${n0}/test ${n2}
19expect ELOOP link ${n1}/test ${n2}
20expect 0 create ${n2} 0644
21expect ELOOP link ${n2} ${n0}/test
22expect ELOOP link ${n2} ${n1}/test
23expect 0 unlink ${n0}
24expect 0 unlink ${n1}
25expect 0 unlink ${n2}
26