From 9a8a0479084913f1b835e65e5e9f900e4cd9dbf7 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 26 Jun 2025 03:48:15 +0900 Subject: 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 --- sandbox/seccomp/syscall_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sandbox/seccomp/syscall_test.go (limited to 'sandbox/seccomp/syscall_test.go') diff --git a/sandbox/seccomp/syscall_test.go b/sandbox/seccomp/syscall_test.go new file mode 100644 index 00000000..81f470aa --- /dev/null +++ b/sandbox/seccomp/syscall_test.go @@ -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) + } + }) + } +} -- cgit v1.3.1