xref: /freebsd/contrib/pjdfstest/tests/open/24.t (revision cdc58367265a2bd6e8f913db2bdc591699ee229f)
1#!/bin/sh
2# $FreeBSD: head/tools/regression/pjdfstest/tests/open/24.t 211352 2010-08-15 21:24:17Z pjd $
3
4desc="open returns EOPNOTSUPP when trying to open UNIX domain socket"
5
6dir=`dirname $0`
7. ${dir}/../misc.sh
8
9echo "1..5"
10
11n0=`namegen`
12
13expect 0 bind ${n0}
14expect "EOPNOTSUPP" open ${n0} O_RDONLY
15expect "EOPNOTSUPP" open ${n0} O_WRONLY
16expect "EOPNOTSUPP" open ${n0} O_RDWR
17expect 0 unlink ${n0}
18