1271294Sngie#!/bin/sh 2271294Sngie# $FreeBSD: head/tools/regression/pjdfstest/tests/link/14.t 211352 2010-08-15 21:24:17Z pjd $ 3271294Sngie 4271294Sngiedesc="link returns EXDEV if the source and the destination files are on different file systems" 5271294Sngie 6271294Sngiedir=`dirname $0` 7271294Sngie. ${dir}/../misc.sh 8271294Sngie 9271294Sngie[ "${os}" = "FreeBSD" ] || quick_exit 10271294Sngie 11271294Sngieecho "1..8" 12271294Sngie 13271294Sngien0=`namegen` 14271294Sngien1=`namegen` 15271294Sngien2=`namegen` 16271294Sngie 17271294Sngieexpect 0 mkdir ${n0} 0755 18275504Sngien=`mdconfig -a -n -t malloc -s 1m` || exit 19275504Sngienewfs /dev/md${n} >/dev/null || exit 20275504Sngiemount /dev/md${n} ${n0} || exit 21271294Sngieexpect 0 create ${n0}/${n1} 0644 22271294Sngieexpect EXDEV link ${n0}/${n1} ${n2} 23271294Sngieexpect 0 unlink ${n0}/${n1} 24271294Sngieexpect 0 create ${n1} 0644 25271294Sngieexpect EXDEV link ${n1} ${n0}/${n2} 26271294Sngieexpect 0 unlink ${n1} 27271294Sngieumount /dev/md${n} 28275504Sngiemdconfig -d -u ${n} || exit 29271294Sngieexpect 0 rmdir ${n0} 30