1178825Sdfr#!/bin/sh 2233294Sstas# $FreeBSD$ 3233294Sstas 4233294Sstasdesc="mknod returns ENOTDIR if a component of the path prefix is not a directory" 5178825Sdfr 6233294Sstasdir=`dirname $0` 7233294Sstas. ${dir}/../misc.sh 8233294Sstas 9178825Sdfrecho "1..27" 10233294Sstas 11233294Sstasn0=`namegen` 12178825Sdfrn1=`namegen` 13233294Sstas 14233294Sstasexpect 0 mkdir ${n0} 0755 15233294Sstasfor type in regular fifo block char socket; do 16178825Sdfr create_file ${type} ${n0}/${n1} 17233294Sstas expect ENOTDIR mknod ${n0}/${n1}/test b 0644 1 2 18233294Sstas expect ENOTDIR mknod ${n0}/${n1}/test c 0644 1 2 19233294Sstas expect ENOTDIR mknod ${n0}/${n1}/test f 0644 0 0 20178825Sdfr expect 0 unlink ${n0}/${n1} 21233294Sstasdone 22233294Sstasexpect 0 rmdir ${n0} 23233294Sstas