diff options
author | Christian Kögler <ck3d@gmx.de> | 2022-10-22 13:07:09 +0200 |
---|---|---|
committer | Christian Kögler <ck3d@gmx.de> | 2022-10-27 20:19:18 +0200 |
commit | 9bb2a979d4cc690e424c1cc292f99ac895b5dd18 (patch) | |
tree | 3b156a3a86da38e7f7639665d05d2913ce0c1aa4 /nixos/tests/systemd-machinectl.nix | |
parent | 6d313530993cd791c6870ddfec68872bb301daed (diff) | |
download | nixpkgs-9bb2a979d4cc690e424c1cc292f99ac895b5dd18.tar nixpkgs-9bb2a979d4cc690e424c1cc292f99ac895b5dd18.tar.gz nixpkgs-9bb2a979d4cc690e424c1cc292f99ac895b5dd18.tar.bz2 nixpkgs-9bb2a979d4cc690e424c1cc292f99ac895b5dd18.tar.lz nixpkgs-9bb2a979d4cc690e424c1cc292f99ac895b5dd18.tar.xz nixpkgs-9bb2a979d4cc690e424c1cc292f99ac895b5dd18.tar.zst nixpkgs-9bb2a979d4cc690e424c1cc292f99ac895b5dd18.zip |
nixos/tests/machinectl: Disable tmpfs for /tmp
Diffstat (limited to 'nixos/tests/systemd-machinectl.nix')
-rw-r--r-- | nixos/tests/systemd-machinectl.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/tests/systemd-machinectl.nix b/nixos/tests/systemd-machinectl.nix index fa5c81599eb..b8ed0c33e8e 100644 --- a/nixos/tests/systemd-machinectl.nix +++ b/nixos/tests/systemd-machinectl.nix @@ -44,6 +44,14 @@ import ./make-test-python.nix ({ pkgs, ... }: # not needed, but we want to test the nspawn file generation systemd.nspawn.${containerName} = { }; + + systemd.services."systemd-nspawn@${containerName}" = { + serviceConfig.Environment = [ + # Disable tmpfs for /tmp + "SYSTEMD_NSPAWN_TMPFS_TMP=0" + ]; + overrideStrategy = "asDropin"; + }; }; testScript = '' @@ -95,6 +103,9 @@ import ./make-test-python.nix ({ pkgs, ... }: machine.succeed("machinectl stop ${containerName}"); machine.wait_until_succeeds("test $(systemctl is-active systemd-nspawn@${containerName}) = inactive"); + # Test tmpfs for /tmp + machine.fail("mountpoint /tmp"); + # Show to to delete the container machine.succeed("chattr -i ${containerRoot}/var/empty"); machine.succeed("rm -rf ${containerRoot}"); |