aboutsummaryrefslogtreecommitdiffhomepage
path: root/sandbox/seccomp/syscall_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-06-26 03:48:15 +0900
committerOphestra <cat@gensokyo.uk>2025-06-26 03:49:07 +0900
commit9a8a0479084913f1b835e65e5e9f900e4cd9dbf7 (patch)
tree53884ff3ee0e984711f4802320feb5a638bc3fdd /sandbox/seccomp/syscall_test.go
parent863bf69ad32e44d06c654c8cfae875e37b8e5e5a (diff)
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>
Diffstat (limited to 'sandbox/seccomp/syscall_test.go')
-rw-r--r--sandbox/seccomp/syscall_test.go16
1 files changed, 16 insertions, 0 deletions
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)
+ }
+ })
+ }
+}