1#!/bin/sh
2# $FreeBSD: src/tools/regression/fstest/tests/mkfifo/08.t,v 1.1 2007/01/17 01:42:09 pjd Exp $
3
4desc="mkfifo returns EROFS if the named file resides on a read-only file system"
5
6n0=`namegen`
7n1=`namegen`
8
9expect 0 mkdir ${n0} 0755
10dd if=/dev/zero of=tmpdisk bs=1k count=1024 status=none
11vnconfig vnd1 tmpdisk
12newfs /dev/rvnd1c >/dev/null
13mount /dev/vnd1c ${n0}
14expect 0 mkfifo ${n0}/${n1} 0644
15expect 0 unlink ${n0}/${n1}
16mount -ur /dev/vnd1c
17expect EROFS mkfifo ${n0}/${n1} 0644
18#mount -uw /dev/vnd1c
19expect 0 mkfifo ${n0}/${n1} 0644
20expect 0 unlink ${n0}/${n1}
21umount /dev/vnd1c
22vnconfig -u vnd1
23rm tmpdisk
24expect 0 rmdir ${n0}
25