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