]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - tools/regression/pjdfstest/tests/open/20.t
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.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}