]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - tools/regression/pjdfstest/tests/open/20.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 / open / 20.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="open returns ETXTBSY when the file is a pure procedure (shared text) file that is being executed and the open() system call requests write access"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 [ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit
10
11 echo "1..4"
12
13 n0=`namegen`
14
15 cp -pf `which sleep` ${n0}
16 ./${n0} 3 &
17 expect ETXTBSY open ${n0} O_WRONLY
18 expect ETXTBSY open ${n0} O_RDWR
19 expect ETXTBSY open ${n0} O_RDONLY,O_TRUNC
20 expect 0 unlink ${n0}