From 128649eb576d00947ef670299616856451edebf1 Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Wed, 28 Aug 2024 14:38:57 +0200 Subject: [PATCH] tests/container: add checks for procfs/devpts mounts Check that we can mount devpts and procfs inside an unprivileged container. This tests for the following changes: https://github.com/canonical/lxd/commit/6d6aad0d1c79344c019a0997077a0c502bed1da3 https://github.com/canonical/lxd/commit/861923942f162b8ab7e92125a97455ea1d4d2468 Signed-off-by: Alexander Mikhalitsyn --- tests/container | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/container b/tests/container index 0237384f2..760deb861 100755 --- a/tests/container +++ b/tests/container @@ -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