]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - tools/regression/pjdfstest/tests/open/08.t
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / tools / regression / pjdfstest / tests / open / 08.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="open returns EACCES when O_CREAT is specified, the file does not exist, and the directory in which it is to be created does not permit writing"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..3"
10
11 n0=`namegen`
12 n1=`namegen`
13
14 expect 0 mkdir ${n0} 0755
15 cdir=`pwd`
16 cd ${n0}
17 expect EACCES -u 65534 -g 65534 open ${n1} O_RDONLY,O_CREAT 0644
18 cd ${cdir}
19 expect 0 rmdir ${n0}