]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/pjdfstest/tests/open/13.t
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / pjdfstest / tests / open / 13.t
1 #!/bin/sh
2 # $FreeBSD: head/tools/regression/pjdfstest/tests/open/13.t 211352 2010-08-15 21:24:17Z pjd $
3
4 desc="open returns EISDIR when trying to open a directory for writing"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 require chflags
10
11 echo "1..8"
12
13 n0=`namegen`
14
15 expect 0 mkdir ${n0} 0755
16
17 expect 0 open ${n0} O_RDONLY
18 expect EISDIR open ${n0} O_WRONLY
19 expect EISDIR open ${n0} O_RDWR
20 expect EISDIR open ${n0} O_RDONLY,O_TRUNC
21 expect EISDIR open ${n0} O_WRONLY,O_TRUNC
22 expect EISDIR open ${n0} O_RDWR,O_TRUNC
23
24 expect 0 rmdir ${n0}