4 desc
="rename returns EPERM if the parent directory of the file pointed at by the 'from' argument has its immutable or append-only flag set"
17 expect
0 mkdir
${n0} 0755
19 expect
0 create
${n0}/${n1} 0644
20 for flag
in SF_IMMUTABLE UF_IMMUTABLE SF_APPEND UF_APPEND
; do
21 expect
0 chflags
${n0} ${flag}
22 expect
${flag} stat
${n0} flags
23 expect EPERM rename
${n0}/${n1} ${n2}
25 expect
0 chflags
${n0} none
26 expect
0 unlink
${n0}/${n1}
28 expect
0 mkdir
${n0}/${n1} 0755
29 for flag
in SF_IMMUTABLE UF_IMMUTABLE SF_APPEND UF_APPEND
; do
30 expect
0 chflags
${n0} ${flag}
31 expect
${flag} stat
${n0} flags
32 expect EPERM rename
${n0}/${n1} ${n2}
34 expect
0 chflags
${n0} none
35 expect
0 rmdir ${n0}/${n1}
37 expect
0 mkfifo ${n0}/${n1} 0644
38 for flag
in SF_IMMUTABLE UF_IMMUTABLE SF_APPEND UF_APPEND
; do
39 expect
0 chflags
${n0} ${flag}
40 expect
${flag} stat
${n0} flags
41 expect EPERM rename
${n0}/${n1} ${n2}
43 expect
0 chflags
${n0} none
44 expect
0 unlink
${n0}/${n1}
46 expect
0 symlink
${n2} ${n0}/${n1}
47 for flag
in SF_IMMUTABLE UF_IMMUTABLE SF_APPEND UF_APPEND
; do
48 expect
0 chflags
${n0} ${flag}
49 expect
${flag} stat
${n0} flags
50 expect EPERM rename
${n0}/${n1} ${n2}
52 expect
0 chflags
${n0} none
53 expect
0 unlink
${n0}/${n1}
55 expect
0 create
${n0}/${n1} 0644
56 for flag
in SF_NOUNLINK UF_NOUNLINK
; do
57 expect
0 chflags
${n0} ${flag}
58 expect
${flag} stat
${n0} flags
59 expect
0 rename
${n0}/${n1} ${n2}
60 expect
0 rename
${n2} ${n0}/${n1}
62 expect
0 chflags
${n0} none
63 expect
0 unlink
${n0}/${n1}
65 expect
0 mkdir
${n0}/${n1} 0755
66 for flag
in SF_NOUNLINK UF_NOUNLINK
; do
67 expect
0 chflags
${n0} ${flag}
68 expect
${flag} stat
${n0} flags
69 expect
0 rename
${n0}/${n1} ${n2}
70 expect
0 rename
${n2} ${n0}/${n1}
72 expect
0 chflags
${n0} none
73 expect
0 rmdir ${n0}/${n1}
75 expect
0 mkfifo ${n0}/${n1} 0644
76 for flag
in SF_NOUNLINK UF_NOUNLINK
; do
77 expect
0 chflags
${n0} ${flag}
78 expect
${flag} stat
${n0} flags
79 expect
0 rename
${n0}/${n1} ${n2}
80 expect
0 rename
${n2} ${n0}/${n1}
82 expect
0 chflags
${n0} none
83 expect
0 unlink
${n0}/${n1}
85 expect
0 symlink
${n2} ${n0}/${n1}
86 for flag
in SF_NOUNLINK UF_NOUNLINK
; do
87 expect
0 chflags
${n0} ${flag}
88 expect
${flag} stat
${n0} flags
89 expect
0 rename
${n0}/${n1} ${n2}
90 expect
0 rename
${n2} ${n0}/${n1}
92 expect
0 chflags
${n0} none
93 expect
0 unlink
${n0}/${n1}