summaryrefslogtreecommitdiffstats
path: root/tools/regression/fstest/tests/truncate/11.t
blob: f86235b94076a68e55a7c6cc84028a6df82fcd04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# $FreeBSD$

desc="truncate returns ETXTBSY the file is a pure procedure (shared text) file that is being executed"

dir=`dirname $0`
. ${dir}/../misc.sh

case "${os}" in
FreeBSD)
	echo "1..2"

	n0=`namegen`

	cp -pf `which sleep` ${n0}
	./${n0} 3 &
	expect ETXTBSY truncate ${n0} 123
	expect 0 unlink ${n0}
	;;
*)
	quick_exit
	;;
esac
OpenPOWER on IntegriCloud