08.t revision 211474
1210967Spjd#!/bin/sh 2210967Spjd# $FreeBSD: head/tools/regression/pjdfstest/tests/mknod/08.t 211474 2010-08-18 22:06:43Z pjd $ 3210967Spjd 4210967Spjddesc="mknod returns EEXIST if the named file exists" 5210967Spjd 6210967Spjddir=`dirname $0` 7210967Spjd. ${dir}/../misc.sh 8210967Spjd 9211474Spjdecho "1..35" 10210967Spjd 11210967Spjdn0=`namegen` 12210967Spjd 13211474Spjdfor type in regular dir fifo block char socket symlink; do 14211474Spjd create_file ${type} ${n0} 15211474Spjd expect EEXIST mknod ${n0} b 0644 0 0 16211474Spjd expect EEXIST mknod ${n0} c 0644 0 0 17211474Spjd expect EEXIST mknod ${n0} f 0644 0 0 18211474Spjd if [ "${type}" = "dir" ]; then 19211474Spjd expect 0 rmdir ${n0} 20211474Spjd else 21211474Spjd expect 0 unlink ${n0} 22211474Spjd fi 23211474Spjddone 24