]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
test: use busybox in lxc-test-apparmor-generated
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 16 Aug 2021 15:33:59 +0000 (17:33 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 17 Aug 2021 11:51:27 +0000 (13:51 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/tests/lxc-test-apparmor-generated

index be2e32619a8b69b880fd5f3922d2ff1834f334c9..25057e0c8caccfa03c931898dc60000fa72b8c0e 100755 (executable)
@@ -24,7 +24,6 @@ fi
 exit 0
 
 DONE=0
-KNOWN_RELEASES="precise trusty xenial yakkety zesty"
 LOGFILE="/tmp/lxc-test-$$.log"
 cleanup() {
        lxc-destroy -n $CONTAINER_NAME >/dev/null 2>&1 || true
@@ -39,29 +38,13 @@ cleanup() {
        echo "PASS"
 }
 
-ARCH=i386
-if type dpkg >/dev/null 2>&1; then
-       ARCH=$(dpkg --print-architecture)
-fi
-
 trap cleanup EXIT HUP INT TERM
 set -eu
 
 # Create a container
 CONTAINER_NAME=lxc-test-apparmor-generated
 
-# 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
-
-lxc-create -t download -n $CONTAINER_NAME -B dir -- -d ubuntu -r $release -a $ARCH
+lxc-create -t busybox -n $CONTAINER_NAME -B dir
 CONTAINER_PATH=$(dirname $(lxc-info -n $CONTAINER_NAME -c lxc.rootfs.path -H) | sed -e 's/dir://')
 cp $CONTAINER_PATH/config $CONTAINER_PATH/config.bak