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