1#!/bin/sh 2# vim: filetype=sh noexpandtab ts=8 sw=8 3# $FreeBSD: head/tools/regression/pjdfstest/tests/open/13.t 211352 2010-08-15 21:24:17Z pjd $ 4 5desc="open returns EISDIR when trying to open a directory for writing" 6 7dir=`dirname $0` 8. ${dir}/../misc.sh 9 10require chflags 11 12echo "1..8" 13 14n0=`namegen` 15 16expect 0 mkdir ${n0} 0755 17 18expect 0 open ${n0} O_RDONLY 19expect EISDIR open ${n0} O_WRONLY 20expect EISDIR open ${n0} O_RDWR 21expect EISDIR open ${n0} O_RDONLY,O_TRUNC 22expect EISDIR open ${n0} O_WRONLY,O_TRUNC 23expect EISDIR open ${n0} O_RDWR,O_TRUNC 24 25expect 0 rmdir ${n0} 26