01.t revision 271294
1271294Sngie#!/bin/sh 2271294Sngie# $FreeBSD: head/tools/regression/pjdfstest/tests/mknod/01.t 211474 2010-08-18 22:06:43Z pjd $ 3271294Sngie 4271294Sngiedesc="mknod returns ENOTDIR if a component of the path prefix is not a directory" 5271294Sngie 6271294Sngiedir=`dirname $0` 7271294Sngie. ${dir}/../misc.sh 8271294Sngie 9271294Sngieecho "1..27" 10271294Sngie 11271294Sngien0=`namegen` 12271294Sngien1=`namegen` 13271294Sngie 14271294Sngieexpect 0 mkdir ${n0} 0755 15271294Sngiefor type in regular fifo block char socket; do 16271294Sngie create_file ${type} ${n0}/${n1} 17271294Sngie expect ENOTDIR mknod ${n0}/${n1}/test b 0644 1 2 18271294Sngie expect ENOTDIR mknod ${n0}/${n1}/test c 0644 1 2 19271294Sngie expect ENOTDIR mknod ${n0}/${n1}/test f 0644 0 0 20271294Sngie expect 0 unlink ${n0}/${n1} 21271294Sngiedone 22271294Sngieexpect 0 rmdir ${n0} 23