xref: /freebsd/contrib/pjdfstest/tests/link/17.t (revision 6ba2210ee039f2f12878c217bcf058e9c8b26b29)
1#!/bin/sh
2# vim: filetype=sh noexpandtab ts=8 sw=8
3# $FreeBSD: head/tools/regression/pjdfstest/tests/link/17.t 211352 2010-08-15 21:24:17Z pjd $
4
5desc="link returns EFAULT if one of the pathnames specified is outside the process's allocated address space"
6
7dir=`dirname $0`
8. ${dir}/../misc.sh
9
10echo "1..8"
11
12n0=`namegen`
13
14expect 0 create ${n0} 0644
15expect EFAULT link ${n0} NULL
16expect EFAULT link ${n0} DEADCODE
17expect 0 unlink ${n0}
18expect EFAULT link NULL ${n0}
19expect EFAULT link DEADCODE ${n0}
20expect EFAULT link NULL DEADCODE
21expect EFAULT link DEADCODE NULL
22