08.t revision 166065
1#!/bin/sh 2# $FreeBSD: head/tools/regression/fstest/tests/mkdir/08.t 166065 2007-01-17 01:42:12Z pjd $ 3 4desc="mkdir returns EPERM if the parent directory of the directory to be created has its immutable flag set" 5 6dir=`dirname $0` 7. ${dir}/../misc.sh 8 9require chflags 10 11echo "1..30" 12 13n0=`namegen` 14n1=`namegen` 15 16expect 0 mkdir ${n0} 0755 17 18expect 0 mkdir ${n0}/${n1} 0755 19expect 0 rmdir ${n0}/${n1} 20 21expect 0 chflags ${n0} SF_IMMUTABLE 22expect EPERM mkdir ${n0}/${n1} 0755 23expect 0 chflags ${n0} none 24expect 0 mkdir ${n0}/${n1} 0755 25expect 0 rmdir ${n0}/${n1} 26 27expect 0 chflags ${n0} UF_IMMUTABLE 28expect EPERM mkdir ${n0}/${n1} 0755 29expect 0 chflags ${n0} none 30expect 0 mkdir ${n0}/${n1} 0755 31expect 0 rmdir ${n0}/${n1} 32 33expect 0 chflags ${n0} SF_APPEND 34expect 0 mkdir ${n0}/${n1} 0755 35expect 0 chflags ${n0} none 36expect 0 rmdir ${n0}/${n1} 37 38expect 0 chflags ${n0} UF_APPEND 39expect 0 mkdir ${n0}/${n1} 0755 40expect 0 chflags ${n0} none 41expect 0 rmdir ${n0}/${n1} 42 43expect 0 chflags ${n0} SF_NOUNLINK 44expect 0 mkdir ${n0}/${n1} 0755 45expect 0 rmdir ${n0}/${n1} 46expect 0 chflags ${n0} none 47 48expect 0 chflags ${n0} UF_NOUNLINK 49expect 0 mkdir ${n0}/${n1} 0755 50expect 0 rmdir ${n0}/${n1} 51expect 0 chflags ${n0} none 52 53expect 0 rmdir ${n0} 54