xref: /freebsd/contrib/pjdfstest/tests/rename/11.t (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1#!/bin/sh
2# vim: filetype=sh noexpandtab ts=8 sw=8
3# $FreeBSD: head/tools/regression/pjdfstest/tests/rename/11.t 211352 2010-08-15 21:24:17Z pjd $
4
5desc="rename 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 rename ${n0}/test ${n2}
19expect ELOOP rename ${n1}/test ${n2}
20expect 0 create ${n2} 0644
21expect ELOOP rename ${n2} ${n0}/test
22expect ELOOP rename ${n2} ${n1}/test
23expect 0 unlink ${n0}
24expect 0 unlink ${n1}
25expect 0 unlink ${n2}
26