sandbox/seccomp: syscall name lookup table

The script is from Go source of same name. The result is checked against libseccomp.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-06-26 03:48:15 +09:00
parent 863bf69ad3
commit 9a8a047908
5 changed files with 487 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package seccomp
import (
"testing"
)
func TestSyscallResolveName(t *testing.T) {
for name, want := range syscallNum {
t.Run(name, func(t *testing.T) {
if got := syscallResolveName(name); got != want {
t.Errorf("syscallResolveName(%q) = %d, want %d",
name, got, want)
}
})
}
}