From: Christian Brauner Date: Mon, 16 Aug 2021 15:44:54 +0000 (+0200) Subject: tests: use busybox in lxc-test-unpriv X-Git-Tag: lxc-5.0.0~108^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c321ceada044345cf9cb66890118d3138923538;p=thirdparty%2Flxc.git tests: use busybox in lxc-test-unpriv Signed-off-by: Christian Brauner --- diff --git a/src/tests/lxc-test-unpriv b/src/tests/lxc-test-unpriv index 787dd9091..3108a8605 100755 --- a/src/tests/lxc-test-unpriv +++ b/src/tests/lxc-test-unpriv @@ -65,7 +65,6 @@ fi which newuidmap >/dev/null 2>&1 || { echo "'newuidmap' command is missing" >&2; exit 1; } DONE=0 -KNOWN_RELEASES="precise trusty xenial yakkety zesty" UNPRIV_LOG=$(mktemp --dry-run) cleanup() { cd / @@ -105,11 +104,6 @@ run_cmd() { TUSER=lxcunpriv HDIR=/home/$TUSER -ARCH=i386 -if type dpkg >/dev/null 2>&1; then - ARCH=$(dpkg --print-architecture) -fi - trap cleanup EXIT SIGHUP SIGINT SIGTERM set -eu @@ -164,24 +158,7 @@ else done fi -# default release is trusty, or the systems release if recognized -release=trusty -if [ -f /etc/lsb-release ]; then - . /etc/lsb-release - rels=$(ubuntu-distro-info --supported 2>/dev/null) || - rels="$KNOWN_RELEASES" - for r in $rels; do - [ "$DISTRIB_CODENAME" = "$r" ] && release="$r" - done -fi - -# Copy the download template cache if available -run_cmd mkdir -p $HDIR/.cache/lxc -[ -d /var/cache/lxc/download ] && \ - cp -R /var/cache/lxc/download $HDIR/.cache/lxc && \ - chown -R $TUSER: $HDIR/.cache/lxc - -run_cmd lxc-create -t download -n c1 -l trace -o "${UNPRIV_LOG}" -- -d ubuntu -r $release -a $ARCH +run_cmd lxc-create -t busybox -n c1 -l trace -o "${UNPRIV_LOG}" # Make sure we can start it - twice