"Fossies" - the Fresh Open Source Software Archive

Member "lessfs-1.7.0/regression/pjd-fstest-20080816-lessfs/tests/unlink/05.t" (29 Mar 2008, 653 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/unlink/05.t,v 1.1 2007/01/17 01:42:12 pjd Exp $
    3 
    4 desc="unlink returns EACCES when search permission is denied for a component of the path prefix"
    5 
    6 dir=`dirname $0`
    7 . ${dir}/../misc.sh
    8 
    9 echo "1..10"
   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 create ${n1}/${n2} 0644
   21 expect 0 chmod ${n1} 0644
   22 expect EACCES -u 65534 -g 65534 unlink ${n1}/${n2}
   23 expect 0 chmod ${n1} 0755
   24 expect 0 -u 65534 -g 65534 unlink ${n1}/${n2}
   25 expect 0 rmdir ${n1}
   26 cd ${cdir}
   27 expect 0 rmdir ${n0}