package seccomp import ( "testing" "unsafe" "hakurei.app/container/std" ) func TestSyscallResolveName(t *testing.T) { t.Parallel() for name, want := range std.Syscalls() { t.Run(name, func(t *testing.T) { t.Parallel() // this checks the std implementation against libseccomp. if got, ok := syscallResolveName(name); !ok || got != want { t.Errorf("syscallResolveName(%q) = %d, want %d", name, got, want) } }) } } func TestRuleSize(t *testing.T) { got := unsafe.Sizeof(NativeRule{}) want := unsafe.Sizeof(syscallRule{}) if got != want { t.Fatalf("NativeRule: %d, want %d", got, want) } }