diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/nixos/tests/podman.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/nixos/tests/podman.nix | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/infra/libkookie/nixpkgs/nixos/tests/podman.nix b/infra/libkookie/nixpkgs/nixos/tests/podman.nix index cd8c2b4308c8..dd28563dc4c1 100644 --- a/infra/libkookie/nixpkgs/nixos/tests/podman.nix +++ b/infra/libkookie/nixpkgs/nixos/tests/podman.nix @@ -34,7 +34,6 @@ import ./make-test-python.nix ( podman.wait_for_unit("sockets.target") start_all() - with subtest("Run container as root with runc"): podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg") podman.succeed( @@ -53,22 +52,38 @@ import ./make-test-python.nix ( podman.succeed("podman stop sleeping") podman.succeed("podman rm sleeping") - with subtest("Run container rootless with runc"): + with subtest("Run container as root with the default backend"): + podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg") + podman.succeed( + "podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" + ) + podman.succeed("podman ps | grep sleeping") + podman.succeed("podman stop sleeping") + podman.succeed("podman rm sleeping") + + + podman.succeed( + "mkdir -p /tmp/podman-run-1000/libpod && chown alice -R /tmp/podman-run-1000" + ) + + + with subtest("Run container rootless with crun"): podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg")) podman.succeed( su_cmd( - "podman run --runtime=runc -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" + "podman run --runtime=crun -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" ) ) podman.succeed(su_cmd("podman ps | grep sleeping")) podman.succeed(su_cmd("podman stop sleeping")) podman.succeed(su_cmd("podman rm sleeping")) + # As of 2020-11-20, the runc backend doesn't work with cgroupsv2 yet, so we don't run that test. - with subtest("Run container rootless with crun"): + with subtest("Run container rootless with the default backend"): podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg")) podman.succeed( su_cmd( - "podman run --runtime=crun -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" + "podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" ) ) podman.succeed(su_cmd("podman ps | grep sleeping")) |