aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox/assert.nix
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-24 01:39:31 +0900
committerOphestra <cat@gensokyo.uk>2025-03-24 01:42:38 +0900
commit0eb1bc6301591a9d8ebcd348238c2e98ee2a7bc0 (patch)
tree011dd19d7e22ae3f8dfaf654d131184415e973b7 /test/sandbox/assert.nix
parent1eb837eab820e6a0365bddea93e0d1d91f957f8a (diff)
test/sandbox: verify outcome via mountinfo
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/sandbox/assert.nix')
-rw-r--r--test/sandbox/assert.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/sandbox/assert.nix b/test/sandbox/assert.nix
index 2ab075f4..e3aeb063 100644
--- a/test/sandbox/assert.nix
+++ b/test/sandbox/assert.nix
@@ -1,6 +1,8 @@
{
writeText,
buildGoModule,
+ pkg-config,
+ util-linux,
version,
}:
@@ -11,6 +13,9 @@ buildGoModule {
src = ../.;
vendorHash = null;
+ buildInputs = [ util-linux ];
+ nativeBuildInputs = [ pkg-config ];
+
preBuild = ''
go mod init git.gensokyo.uk/security/fortify/test >& /dev/null
cp ${writeText "main.go" ''
@@ -19,7 +24,7 @@ buildGoModule {
import "os"
import "git.gensokyo.uk/security/fortify/test/sandbox"
- func main() { (&sandbox.T{FS: os.DirFS("/"), PMountsPath: "/.fortify/mounts"}).MustCheckFile(os.Args[1]) }
+ func main() { (&sandbox.T{FS: os.DirFS("/")}).MustCheckFile(os.Args[1]) }
''} main.go
'';
}