1166065Spjd#!/bin/sh 2166065Spjd# $FreeBSD: releng/10.2/tools/regression/pjdfstest/tests/link/14.t 210984 2010-08-06 23:58:54Z pjd $ 3166065Spjd 4166065Spjddesc="link returns EXDEV if the source and the destination files are on different file systems" 5166065Spjd 6166065Spjddir=`dirname $0` 7166065Spjd. ${dir}/../misc.sh 8166065Spjd 9210984Spjd[ "${os}" = "FreeBSD" ] || quick_exit 10166065Spjd 11210984Spjdecho "1..8" 12166065Spjd 13210984Spjdn0=`namegen` 14210984Spjdn1=`namegen` 15210984Spjdn2=`namegen` 16210984Spjd 17210984Spjdexpect 0 mkdir ${n0} 0755 18210984Spjdn=`mdconfig -a -n -t malloc -s 1m` 19210984Spjdnewfs /dev/md${n} >/dev/null 20210984Spjdmount /dev/md${n} ${n0} 21210984Spjdexpect 0 create ${n0}/${n1} 0644 22210984Spjdexpect EXDEV link ${n0}/${n1} ${n2} 23210984Spjdexpect 0 unlink ${n0}/${n1} 24210984Spjdexpect 0 create ${n1} 0644 25210984Spjdexpect EXDEV link ${n1} ${n0}/${n2} 26210984Spjdexpect 0 unlink ${n1} 27210984Spjdumount /dev/md${n} 28210984Spjdmdconfig -d -u ${n} 29210984Spjdexpect 0 rmdir ${n0} 30