aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/seccomp/syscall_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/seccomp/syscall_test.go')
-rw-r--r--container/seccomp/syscall_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/container/seccomp/syscall_test.go b/container/seccomp/syscall_test.go
new file mode 100644
index 00000000..933f060b
--- /dev/null
+++ b/container/seccomp/syscall_test.go
@@ -0,0 +1,20 @@
+package seccomp
+
+import (
+ "testing"
+)
+
+func TestSyscallResolveName(t *testing.T) {
+ for name, want := range Syscalls() {
+ t.Run(name, func(t *testing.T) {
+ if got := syscallResolveName(name); got != want {
+ t.Errorf("syscallResolveName(%q) = %d, want %d",
+ name, got, want)
+ }
+ if got, ok := SyscallResolveName(name); !ok || got != want {
+ t.Errorf("SyscallResolveName(%q) = %d, want %d",
+ name, got, want)
+ }
+ })
+ }
+}