"Fossies" - the Fresh Open Source Software Archive

Member "lessfs-1.7.0/regression/pjd-fstest-20080816-lessfs/tests/mkfifo/06.t" (29 Mar 2008, 769 Bytes) of package /linux/misc/old/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/06.t,v 1.1 2007/01/17 01:42:09 pjd Exp $
    3 
    4 desc="mkfifo returns EACCES when write permission is denied on the parent directory of the file to be created"
    5 
    6 dir=`dirname $0`
    7 . ${dir}/../misc.sh
    8 
    9 echo "1..12"
   10 
   11 n0=`namegen`
   12 n1=`namegen`
   13 n2=`namegen`
   14 
   15 expect 0 mkdir ${n0} 0755
   16 cdir=`pwd`
   17 cd ${n0}
   18 expect 0 mkdir ${n1} 0755
   19 expect 0 chown ${n1} 65534 65534
   20 expect 0 -u 65534 -g 65534 mkfifo ${n1}/${n2} 0644
   21 expect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
   22 expect 0 chmod ${n1} 0555
   23 expect EACCES -u 65534 -g 65534 mkfifo ${n1}/${n2} 0644
   24 expect 0 chmod ${n1} 0755
   25 expect 0 -u 65534 -g 65534 mkfifo ${n1}/${n2} 0644
   26 expect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
   27 expect 0 rmdir ${n1}
   28 cd ${cdir}
   29 expect 0 rmdir ${n0}