]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests: use busybox in lxc-test-usernic.in 3940/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 16 Aug 2021 15:46:39 +0000 (17:46 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 17 Aug 2021 15:35:48 +0000 (17:35 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/tests/lxc-test-usernic.in

index 3fb4e9e5e4fbc8ec9da6cd22834cff90502ae483..47fa62db566a32c24b225109ec6228a96bd76295 100755 (executable)
@@ -24,7 +24,6 @@
 # This test assumes an Ubuntu host
 
 DONE=0
-KNOWN_RELEASES="precise trusty xenial yakkety zesty"
 LXC_USER_NIC="@LIBEXECDIR@/lxc/lxc-user-nic"
 
 cleanup() {
@@ -64,11 +63,6 @@ run_cmd() {
                UBSAN_OPTIONS=${UBSAN_OPTIONS:-} $*
 }
 
-ARCH=i386
-if type dpkg >/dev/null 2>&1; then
-       ARCH=$(dpkg --print-architecture)
-fi
-
 set -eu
 trap cleanup EXIT SIGHUP SIGINT SIGTERM
 
@@ -117,37 +111,14 @@ fi
 mkdir -p /run/user/$(id -u usernic-user)
 chown -R usernic-user: /run/user/$(id -u usernic-user) /home/usernic-user
 
-# Copy the download template cache if available
-run_cmd "mkdir -p /home/usernic-user/.cache/lxc"
-[ -d /var/cache/lxc/download ] && \
-    cp -R /var/cache/lxc/download /home/usernic-user/.cache/lxc && \
-    chown -R usernic-user: /home/usernic-user/.cache/lxc
-
-
 # Create two test bridges
 brctl addbr usernic-br0
 brctl addbr usernic-br1
 ifconfig usernic-br0 0.0.0.0 up
 ifconfig usernic-br1 0.0.0.0 up
 
-ARCH=i386
-if type dpkg >/dev/null 2>&1; then
-       ARCH=$(dpkg --print-architecture)
-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
-
 # Create three containers
-run_cmd "lxc-create -t download -n b1 -- -d ubuntu -r $release -a $ARCH"
+run_cmd "lxc-create -t busybox -n b1"
 run_cmd "lxc-start -n b1 -d"
 p1=$(run_cmd "lxc-info -n b1 -p -H")