summaryrefslogtreecommitdiffstats
path: root/tests/missing-device-nodes-outside-the-chroot
blob: 7f2fa278f7659c7fdd3e79a0085538ffe1c2f961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
set -eu
export LC_ALL=C.UTF-8
if [ ! -e /mmdebstrap-testenv ]; then
	echo "this test modifies the system and should only be run inside a container" >&2
	exit 1
fi
rm /dev/console
useradd --home-dir /home/user --create-home user
runuser -u user -- {{ CMD }} --mode=unshare --variant=apt {{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }}
tar -tf /tmp/debian-chroot.tar | sort | diff -u tar1.txt -
rm /tmp/debian-chroot.tar