about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/sandbox.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/sandbox.nix b/tests/sandbox.nix
index b9f087a0..b3ad80d1 100644
--- a/tests/sandbox.nix
+++ b/tests/sandbox.nix
@@ -135,6 +135,11 @@
         echo hello network | ${pkgs.netcat-openbsd}/bin/nc -N 127.0.0.1 3000 \
           || echo netcat has failed
       '') { namespaces.net = true; })
+
+      (pkgs.vuizvui.buildSandbox (pkgs.writeScriptBin "test-sandbox4" ''
+        #!${pkgs.stdenv.shell}
+        test $$ -gt 5 && echo no pid namespace
+      '') { namespaces.pid = false; })
     ];
     users.users.foo.isNormalUser = true;
   };
@@ -162,5 +167,7 @@
     machine.succeed('test "$(su -c test-sandbox3 foo)" = "netcat has failed"')
     machine.fail('grep -F "hello network" /tmp/netns.log')
     machine.succeed('grep -F "root netns" /tmp/netns.log')
+
+    machine.succeed('test "$(su -c test-sandbox4 foo)" = "no pid namespace"')
   '';
 }