Skip to content

Commit

Permalink
tests/container: add checks for procfs/devpts mounts
Browse files Browse the repository at this point in the history
Check that we can mount devpts and procfs inside an unprivileged
container.

This tests for the following changes:
canonical/lxd@6d6aad0
canonical/lxd@8619239

Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading branch information
mihalicyn committed Aug 28, 2024
1 parent 59e1337 commit 128649e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/container
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,15 @@ for release in $RELEASES; do
lxc delete -f n1
done

IMAGE="ubuntu-minimal-daily:24.04"

echo "==> check that we can mount devpts and procfs in unprivileged container"
lxc launch "${IMAGE}" u1
lxc exec u1 -- mkdir /root/proc
lxc exec u1 -- mount -t proc proc /root/proc
lxc exec u1 -- mkdir /root/devpts
lxc exec u1 -- mount -t devpts devpts /root/devpts
lxc delete -f u1

# shellcheck disable=SC2034
FAIL=0

0 comments on commit 128649e

Please sign in to comment.