forked from security/hakurei
std: relocate seccomp lookup tables
This should enable resolving NativeRule in hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -2,21 +2,21 @@ package seccomp
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"hakurei.app/container/std"
|
||||
)
|
||||
|
||||
func TestSyscallResolveName(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for name, want := range Syscalls() {
|
||||
for name, want := range std.Syscalls() {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if got := syscallResolveName(name); got != want {
|
||||
// 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)
|
||||
}
|
||||
if got, ok := SyscallResolveName(name); !ok || got != want {
|
||||
t.Errorf("SyscallResolveName(%q) = %d, want %d", name, got, want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user