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"
24 expect 0 create ${n0} 0644
25 expect 0 chflags ${n0} SF_APPEND
26 expect 0 open ${n0} O_WRONLY,O_APPEND
27 expect 0 open ${n0} O_RDWR,O_APPEND
28 expect EPERM open ${n0} O_WRONLY
29 expect EPERM open ${n0} O_RDWR
30 todo FreeBSD:ZFS "When fle is protected by SF_APPEND, open(O_TRUNC) should return EPERM."
31 expect EPERM open ${n0} O_RDONLY,O_TRUNC
32 todo FreeBSD:ZFS "When fle is protected by SF_APPEND, open(O_TRUNC) should return EPERM."
33 expect EPERM open ${n0} O_RDONLY,O_APPEND,O_TRUNC
34 todo FreeBSD:ZFS "When fle is protected by SF_APPEND, open(O_TRUNC) should return EPERM."
35 expect EPERM open ${n0} O_WRONLY,O_APPEND,O_TRUNC
36 todo FreeBSD:ZFS "When fle is protected by SF_APPEND, open(O_TRUNC) should return EPERM."
37 expect EPERM open ${n0} O_RDWR,O_APPEND,O_TRUNC
38 expect 0 chflags ${n0} none
43 expect 0 create ${n0} 0644
44 expect 0 chflags ${n0} UF_APPEND
45 expect 0 open ${n0} O_WRONLY,O_APPEND
46 expect 0 open ${n0} O_RDWR,O_APPEND
47 expect EPERM open ${n0} O_WRONLY
48 expect EPERM open ${n0} O_RDWR
49 expect EPERM open ${n0} O_RDONLY,O_TRUNC
50 expect EPERM open ${n0} O_RDONLY,O_APPEND,O_TRUNC
51 expect EPERM open ${n0} O_WRONLY,O_APPEND,O_TRUNC
52 expect EPERM open ${n0} O_RDWR,O_APPEND,O_TRUNC
53 expect 0 chflags ${n0} none