summaryrefslogtreecommitdiffstats
path: root/contrib/pjdfstest/tests/open/20.t
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pjdfstest/tests/open/20.t')
-rw-r--r--contrib/pjdfstest/tests/open/20.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/pjdfstest/tests/open/20.t b/contrib/pjdfstest/tests/open/20.t
new file mode 100644
index 0000000..de80b61
--- /dev/null
+++ b/contrib/pjdfstest/tests/open/20.t
@@ -0,0 +1,20 @@
+#!/bin/sh
+# $FreeBSD: head/tools/regression/pjdfstest/tests/open/20.t 211352 2010-08-15 21:24:17Z pjd $
+
+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"
+
+dir=`dirname $0`
+. ${dir}/../misc.sh
+
+[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit
+
+echo "1..4"
+
+n0=`namegen`
+
+cp -pf `which sleep` ${n0}
+./${n0} 3 &
+expect ETXTBSY open ${n0} O_WRONLY
+expect ETXTBSY open ${n0} O_RDWR
+expect ETXTBSY open ${n0} O_RDONLY,O_TRUNC
+expect 0 unlink ${n0}
OpenPOWER on IntegriCloud