140a8ac8fSEnji Cooper#!/bin/sh 2*3416500aSEnji Cooper# vim: filetype=sh noexpandtab ts=8 sw=8 340a8ac8fSEnji Cooper# $FreeBSD: head/tools/regression/pjdfstest/tests/mkfifo/08.t 211352 2010-08-15 21:24:17Z pjd $ 440a8ac8fSEnji Cooper 540a8ac8fSEnji Cooperdesc="mkfifo returns EROFS if the named file resides on a read-only file system" 640a8ac8fSEnji Cooper 740a8ac8fSEnji Cooperdir=`dirname $0` 840a8ac8fSEnji Cooper. ${dir}/../misc.sh 940a8ac8fSEnji Cooper 1040a8ac8fSEnji Cooper[ "${os}:${fs}" = "FreeBSD:UFS" ] || quick_exit 1140a8ac8fSEnji Cooper 1240a8ac8fSEnji Cooperecho "1..7" 1340a8ac8fSEnji Cooper 1440a8ac8fSEnji Coopern0=`namegen` 1540a8ac8fSEnji Coopern1=`namegen` 1640a8ac8fSEnji Cooper 1740a8ac8fSEnji Cooperexpect 0 mkdir ${n0} 0755 184ba73429SEnji Coopern=`mdconfig -a -n -t malloc -s 1m` || exit 194ba73429SEnji Coopernewfs /dev/md${n} >/dev/null || exit 204ba73429SEnji Coopermount /dev/md${n} ${n0} || exit 2140a8ac8fSEnji Cooperexpect 0 mkfifo ${n0}/${n1} 0644 2240a8ac8fSEnji Cooperexpect 0 unlink ${n0}/${n1} 2340a8ac8fSEnji Coopermount -ur /dev/md${n} 2440a8ac8fSEnji Cooperexpect EROFS mkfifo ${n0}/${n1} 0644 2540a8ac8fSEnji Coopermount -uw /dev/md${n} 2640a8ac8fSEnji Cooperexpect 0 mkfifo ${n0}/${n1} 0644 2740a8ac8fSEnji Cooperexpect 0 unlink ${n0}/${n1} 2840a8ac8fSEnji Cooperumount /dev/md${n} 294ba73429SEnji Coopermdconfig -d -u ${n} || exit 3040a8ac8fSEnji Cooperexpect 0 rmdir ${n0} 31