Skip to content

Commit 1c40e59

Browse files
committed
seccomp: add TAP plan to the output
Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent dd39124 commit 1c40e59

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

validation/linux_seccomp/linux_seccomp.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
package main
22

33
import (
4+
tap "github.com/mndrix/tap-go"
45
"github.com/opencontainers/runtime-tools/generate/seccomp"
56
"github.com/opencontainers/runtime-tools/validation/util"
67
)
78

89
func main() {
10+
t := tap.New()
11+
t.Header(0)
12+
defer t.AutoPlan()
913
g, err := util.GetDefaultGenerator()
1014
if err != nil {
1115
util.Fatal(err)
@@ -16,8 +20,10 @@ func main() {
1620
}
1721
g.SetDefaultSeccompAction("allow")
1822
g.SetSyscallAction(syscallArgs)
19-
err = util.RuntimeInsideValidate(g, nil, nil)
23+
err = util.RuntimeInsideValidate(g, t, nil)
24+
t.Ok(err == nil, "seccomp action is added correctly")
2025
if err != nil {
21-
util.Fatal(err)
26+
t.Fail(err.Error())
2227
}
28+
2329
}

0 commit comments

Comments
 (0)