"Fossies" - the Fresh Open Source Software Archive

Member "lessfs-1.7.0/regression/pjd-fstest-20080816-lessfs/tests/mkfifo/08.t" (29 Mar 2008, 722 Bytes) of archive /linux/misc/lessfs-1.7.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    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 
    4 desc="mkfifo returns EROFS if the named file resides on a read-only file system"
    5 
    6 dir=`dirname $0`
    7 . ${dir}/../misc.sh
    8 
    9 case "${os}:${fs}" in
   10 FreeBSD:UFS)
   11     echo "1..7"
   12 
   13     n0=`namegen`
   14     n1=`namegen`
   15 
   16     expect 0 mkdir ${n0} 0755
   17     n=`mdconfig -a -n -t malloc -s 1m`
   18     newfs /dev/md${n} >/dev/null
   19     mount /dev/md${n} ${n0}
   20     expect 0 mkfifo ${n0}/${n1} 0644
   21     expect 0 unlink ${n0}/${n1}
   22     mount -ur /dev/md${n}
   23     expect EROFS mkfifo ${n0}/${n1} 0644
   24     mount -uw /dev/md${n}
   25     expect 0 mkfifo ${n0}/${n1} 0644
   26     expect 0 unlink ${n0}/${n1}
   27     umount /dev/md${n}
   28     mdconfig -d -u ${n}
   29     expect 0 rmdir ${n0}
   30     ;;
   31 *)
   32     quick_exit
   33     ;;
   34 esac