aboutsummaryrefslogtreecommitdiffhomepage
path: root/seccomp/syscall_test.go
blob: 933f060bdc2dc1b51f328fb6a3f059143e2e754f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
			}
		})
	}
}