Building test suite 'seccomp-test' for hsseccomp-0.2.0.1..
[1 of 1] Compiling Main ( tests/Tests.hs, /tmp/hsseccomp/dist-newstyle/build/x86_64-linux/ghc-9.8.4/hsseccomp-0.2.0.1/t/seccomp-test/build/seccomp-test/seccomp-test-tmp/Main.o )
tests/Tests.hs:74:10: error: [GHC-83865]
• Couldn't match expected type: OpenFileFlags -> IO a2
with actual type: IO System.Posix.Types.Fd
• The function ‘openFd’ is applied to four value arguments,
but its type ‘FilePath
-> OpenMode -> OpenFileFlags -> IO System.Posix.Types.Fd’
has only three
In a stmt of a 'do' block:
_ <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags
In the expression:
do ctx <- S.seccomp_init S.SCMP_ACT_KILL
_ <- S.seccomp_rule_add_array ctx S.SCMP_ACT_ALLOW S.SCopen []
_ <- S.seccomp_rule_add_array ctx S.SCMP_ACT_ALLOW S.SCopenat []
whitelistHaskellRuntimeCalls ctx
....
|
74 | _ <- PosixIO.openFd "/dev/null" PosixIO.ReadOnly Nothing PosixIO.defaultFileFlags
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/Tests.hs:74:54: error: [GHC-83865]
• Couldn't match expected type ‘OpenFileFlags’
with actual type ‘Maybe a3’
• In the third argument of ‘openFd’, namely ‘Nothing’
In a stmt of a 'do' block:
_ <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags
In the expression:
do ctx <- S.seccomp_init S.SCMP_ACT_KILL
_ <- S.seccomp_rule_add_array ctx S.SCMP_ACT_ALLOW S.SCopen []
_ <- S.seccomp_rule_add_array ctx S.SCMP_ACT_ALLOW S.SCopenat []
whitelistHaskellRuntimeCalls ctx
....
|
74 | _ <- PosixIO.openFd "/dev/null" PosixIO.ReadOnly Nothing PosixIO.defaultFileFlags
| ^^^^^^^
tests/Tests.hs:101:10: error: [GHC-83865]
• Couldn't match expected type: OpenFileFlags -> IO a0
with actual type: IO System.Posix.Types.Fd
• The function ‘openFd’ is applied to four value arguments,
but its type ‘FilePath
-> OpenMode -> OpenFileFlags -> IO System.Posix.Types.Fd’
has only three
In a stmt of a 'do' block:
_ <- openFd "/dev/null" WriteOnly Nothing defaultFileFlags
In the expression:
do ctx <- S.seccomp_init S.SCMP_ACT_ALLOW
_ <- S.seccomp_rule_add_array
ctx S.SCMP_ACT_KILL S.SCopenat [S.ArgCmp 2 S.MASQUED_EQ 0x3 0x1]
_ <- S.seccomp_rule_add_array
ctx S.SCMP_ACT_KILL S.SCopen [S.ArgCmp 1 S.MASQUED_EQ 0x3 0x1]
_ <- S.seccomp_load ctx
....
|
101 | _ <- PosixIO.openFd "/dev/null" PosixIO.WriteOnly Nothing PosixIO.defaultFileFlags
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/Tests.hs:101:55: error: [GHC-83865]
• Couldn't match expected type ‘OpenFileFlags’
with actual type ‘Maybe a1’
• In the third argument of ‘openFd’, namely ‘Nothing’
In a stmt of a 'do' block:
_ <- openFd "/dev/null" WriteOnly Nothing defaultFileFlags
In the expression:
do ctx <- S.seccomp_init S.SCMP_ACT_ALLOW
_ <- S.seccomp_rule_add_array
ctx S.SCMP_ACT_KILL S.SCopenat [S.ArgCmp 2 S.MASQUED_EQ 0x3 0x1]
_ <- S.seccomp_rule_add_array
ctx S.SCMP_ACT_KILL S.SCopen [S.ArgCmp 1 S.MASQUED_EQ 0x3 0x1]
_ <- S.seccomp_load ctx
....
|
101 | _ <- PosixIO.openFd "/dev/null" PosixIO.WriteOnly Nothing PosixIO.defaultFileFlags
| ^^^^^^^