From 8b62e08b44d255fcb15e94bd2ed721f34c65a726 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 29 Mar 2025 19:33:17 +0900 Subject: test: build test program in nixos config Signed-off-by: Ophestra --- test/sandbox/case/main.go | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 test/sandbox/case/main.go (limited to 'test/sandbox/case/main.go') diff --git a/test/sandbox/case/main.go b/test/sandbox/case/main.go deleted file mode 100644 index 4c639b28..00000000 --- a/test/sandbox/case/main.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "log" - "os" - "strconv" - "strings" - - "git.gensokyo.uk/security/fortify/test/sandbox" -) - -func main() { - log.SetFlags(0) - log.SetPrefix("test: ") - - if len(os.Args) < 2 { - log.Fatal("invalid argument") - } - - switch os.Args[1] { - case "filter": - if len(os.Args) != 4 { - log.Fatal("invalid argument") - } - - if pid, err := strconv.Atoi(strings.TrimSpace(os.Args[2])); err != nil { - log.Fatalf("%s", err) - } else if pid < 1 { - log.Fatalf("%d out of range", pid) - } else { - sandbox.MustCheckFilter(pid, os.Args[3]) - return - } - - default: - (&sandbox.T{FS: os.DirFS("/")}).MustCheckFile(os.Args[1], "/tmp/sandbox-ok") - return - } -} -- cgit v1.3.1