aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/seccomp/syscall_test.go
blob: e385a12c715a8d2a9193edb1c0e595f5d306a34e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package seccomp

import (
	"testing"
)

func TestSyscallResolveName(t *testing.T) {
	t.Parallel()

	for name, want := range Syscalls() {
		t.Run(name, func(t *testing.T) {
			t.Parallel()

			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)
			}
		})
	}
}