]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/pjdfstest/tests/chmod/03.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / pjdfstest / tests / chmod / 03.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="chmod returns ENAMETOOLONG if an entire path name exceeded {PATH_MAX} characters"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..10"
10
11 nx=`dirgen_max`
12 nxx="${nx}x"
13
14 mkdir -p "${nx%/*}"
15
16 expect 0 create ${nx} 0644
17 expect 0 chmod ${nx} 0642
18 expect 0642 stat ${nx} mode
19 expect 0 unlink ${nx}
20 expect ENAMETOOLONG chmod ${nxx} 0642
21
22 expect 0 create ${nx} 0644
23 expect 0 lchmod ${nx} 0642
24 expect 0642 stat ${nx} mode
25 expect 0 unlink ${nx}
26 expect ENAMETOOLONG lchmod ${nxx} 0642
27
28 rm -rf "${nx%%/*}"