1#!/bin/sh 2# $FreeBSD: head/tools/regression/pjdfstest/tests/link/14.t 211352 2010-08-15 21:24:17Z pjd $ 3 4desc="link returns EXDEV if the source and the destination files are on different file systems" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9[ "${os}" = "FreeBSD" ] || quick_exit 10 11echo "1..8" 12 13n0=`namegen` 14n1=`namegen` 15n2=`namegen` 16 17expect 0 mkdir ${n0} 0755 18n=`mdconfig -a -n -t malloc -s 1m` || exit 19newfs /dev/md${n} >/dev/null || exit 20mount /dev/md${n} ${n0} || exit 21expect 0 create ${n0}/${n1} 0644 22expect EXDEV link ${n0}/${n1} ${n2} 23expect 0 unlink ${n0}/${n1} 24expect 0 create ${n1} 0644 25expect EXDEV link ${n1} ${n0}/${n2} 26expect 0 unlink ${n1} 27umount /dev/md${n} 28mdconfig -d -u ${n} || exit 29expect 0 rmdir ${n0} 30