4 desc
="unlink returns EPERM if the parent directory of the named file has its immutable or append-only flag set"
16 expect
0 mkdir
${n0} 0755
18 expect
0 create
${n0}/${n1} 0644
19 expect
0 chflags
${n0} SF_IMMUTABLE
20 expect EPERM unlink
${n0}/${n1}
21 expect
0 chflags
${n0} none
22 expect
0 unlink
${n0}/${n1}
24 expect
0 create
${n0}/${n1} 0644
25 expect
0 chflags
${n0} UF_IMMUTABLE
26 expect EPERM unlink
${n0}/${n1}
27 expect
0 chflags
${n0} none
28 expect
0 unlink
${n0}/${n1}
30 expect
0 create
${n0}/${n1} 0644
31 expect
0 chflags
${n0} SF_APPEND
32 expect EPERM unlink
${n0}/${n1}
33 expect
0 chflags
${n0} none
34 expect
0 unlink
${n0}/${n1}
36 expect
0 create
${n0}/${n1} 0644
37 expect
0 chflags
${n0} UF_APPEND
38 expect EPERM unlink
${n0}/${n1}
39 expect
0 chflags
${n0} none
40 expect
0 unlink
${n0}/${n1}
42 expect
0 create
${n0}/${n1} 0644
43 expect
0 chflags
${n0} SF_NOUNLINK
44 expect
0 unlink
${n0}/${n1}
45 expect
0 chflags
${n0} none
47 expect
0 create
${n0}/${n1} 0644
48 expect
0 chflags
${n0} UF_NOUNLINK
49 expect
0 unlink
${n0}/${n1}
50 expect
0 chflags
${n0} none