1#!/bin/sh 2# vim: filetype=sh noexpandtab ts=8 sw=8 3# $FreeBSD: head/tools/regression/pjdfstest/tests/truncate/11.t 211352 2010-08-15 21:24:17Z pjd $ 4 5desc="truncate returns ETXTBSY the file is a pure procedure (shared text) file that is being executed" 6 7dir=`dirname $0` 8. ${dir}/../misc.sh 9 10[ "${os}" = "FreeBSD" ] || quick_exit 11noexec && quick_exit 12 13requires_exec 14 15echo "1..2" 16 17n0=`namegen` 18 19cp -pf `which sleep` ${n0} 20./${n0} 3 & 21expect ETXTBSY truncate ${n0} 123 22expect 0 unlink ${n0} 23