1166065Spjd#!/bin/sh 2166065Spjd# $FreeBSD: releng/10.2/tools/regression/pjdfstest/tests/link/01.t 211474 2010-08-18 22:06:43Z pjd $ 3166065Spjd 4166065Spjddesc="link returns ENOTDIR if a component of either path prefix is not a directory" 5166065Spjd 6166065Spjddir=`dirname $0` 7166065Spjd. ${dir}/../misc.sh 8166065Spjd 9211474Spjdecho "1..32" 10166065Spjd 11166065Spjdn0=`namegen` 12166065Spjdn1=`namegen` 13166065Spjdn2=`namegen` 14166065Spjd 15166065Spjdexpect 0 mkdir ${n0} 0755 16211474Spjdfor type in regular fifo block char socket; do 17211474Spjd create_file ${type} ${n0}/${n1} 18211474Spjd expect ENOTDIR link ${n0}/${n1}/test ${n0}/${n2} 19211474Spjd create_file ${type} ${n0}/${n2} 20211474Spjd expect ENOTDIR link ${n0}/${n2} ${n0}/${n1}/test 21211474Spjd expect 0 unlink ${n0}/${n1} 22211474Spjd expect 0 unlink ${n0}/${n2} 23211474Spjddone 24166065Spjdexpect 0 rmdir ${n0} 25