]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/pjdfstest/tests/chmod/02.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / pjdfstest / tests / chmod / 02.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="chmod returns ENAMETOOLONG if a component of a pathname exceeded {NAME_MAX} characters"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..10"
10
11 nx=`namegen_max`
12 nxx="${nx}x"
13
14 expect 0 create ${nx} 0644
15 expect 0 chmod ${nx} 0620
16 expect 0620 stat ${nx} mode
17 expect 0 unlink ${nx}
18 expect ENAMETOOLONG chmod ${nxx} 0620
19
20 expect 0 create ${nx} 0644
21 expect 0 lchmod ${nx} 0620
22 expect 0620 stat ${nx} mode
23 expect 0 unlink ${nx}
24 expect ENAMETOOLONG lchmod ${nxx} 0620