4 desc="open returns EPERM when the named file has its append-only flag set, the file is to be modified, and O_TRUNC is specified or O_APPEND is not specified"
15 expect 0 create ${n0} 0644
16 expect 0 chflags ${n0} SF_APPEND
17 expect 0 open ${n0} O_WRONLY,O_APPEND
18 expect 0 open ${n0} O_RDWR,O_APPEND
19 expect EPERM open ${n0} O_WRONLY
20 expect EPERM open ${n0} O_RDWR
21 expect EPERM open ${n0} O_RDONLY,O_TRUNC
22 expect EPERM open ${n0} O_RDONLY,O_APPEND,O_TRUNC
23 expect EPERM open ${n0} O_WRONLY,O_APPEND,O_TRUNC
24 expect EPERM open ${n0} O_RDWR,O_APPEND,O_TRUNC
25 expect 0 chflags ${n0} none
28 expect 0 create ${n0} 0644
29 expect 0 chflags ${n0} UF_APPEND
30 expect 0 open ${n0} O_WRONLY,O_APPEND
31 expect 0 open ${n0} O_RDWR,O_APPEND
32 expect EPERM open ${n0} O_WRONLY
33 expect EPERM open ${n0} O_RDWR
34 expect EPERM open ${n0} O_RDONLY,O_TRUNC
35 expect EPERM open ${n0} O_RDONLY,O_APPEND,O_TRUNC
36 expect EPERM open ${n0} O_WRONLY,O_APPEND,O_TRUNC
37 expect EPERM open ${n0} O_RDWR,O_APPEND,O_TRUNC
38 expect 0 chflags ${n0} none