Skip to content

Commit

Permalink
tests/container: add checks for procfs/devpts mounts (#280)
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
  • Loading branch information
simondeziel authored Aug 28, 2024
2 parents 59e1337 + 128649e commit ed3f531
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 ed3f531

Please sign in to comment.