forked from security/hakurei
This should enable resolving NativeRule in hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
23 lines
433 B
Go
23 lines
433 B
Go
package seccomp
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"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)
|
|
}
|
|
})
|
|
}
|
|
}
|