From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top
Subject: [PATCH 13/15] tests: Move distro image download to asset build makefile
Date: Wed, 06 Jul 2022 17:29:07 +1000 [thread overview]
Message-ID: <20220706072909.596805-14-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20220706072909.596805-1-david@gibson.dropbear.id.au>
[-- Attachment #1: Type: text/plain, Size: 36698 bytes --]
Rather than directly download distro images from the test scripts, handle
all the downloads during the test asset build, then just clone them for
the tests themselves. This avoids repeated downloads which can be very
slow when debugging failing tests.
Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au>
---
test/.gitignore | 2 +
test/Makefile | 131 ++++++++++++++++++++++++++++++++++++++++++-
test/distro/debian | 25 +++++----
test/distro/fedora | 38 ++++++-------
test/distro/opensuse | 14 ++---
test/distro/ubuntu | 14 ++---
6 files changed, 178 insertions(+), 46 deletions(-)
diff --git a/test/.gitignore b/test/.gitignore
index 360da92..225ecd9 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -3,3 +3,5 @@ test_logs/
mbuto/
*.img
QEMU_EFI.fd
+*.qcow2
+*.raw.xz
diff --git a/test/Makefile b/test/Makefile
index 9990841..b858e0e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -5,7 +5,54 @@
# Copyright Red Hat
# Author: David Gibson <david(a)gibson.dropbear.id.au>
-DOWNLOAD_ASSETS = mbuto
+WGET = wget -c
+
+DEBIAN_IMGS = debian-8.11.0-openstack-amd64.qcow2 \
+ debian-9-nocloud-amd64-daily-20200210-166.qcow2 \
+ debian-10-nocloud-amd64.qcow2 \
+ debian-10-generic-arm64.qcow2 \
+ debian-10-generic-ppc64el.qcow2 \
+ debian-11-nocloud-amd64.qcow2 \
+ debian-11-generic-arm64.qcow2 \
+ debian-11-generic-ppc64el.qcow2 \
+ debian-sid-nocloud-amd64-daily.qcow2 \
+ debian-sid-nocloud-arm64-daily.qcow2 \
+ debian-sid-nocloud-ppc64el-daily.qcow2
+
+FEDORA_IMGS = Fedora-Cloud-Base-26-1.5.x86_64.qcow2 \
+ Fedora-Cloud-Base-27-1.6.x86_64.qcow2 \
+ Fedora-Cloud-Base-28-1.1.x86_64.qcow2 \
+ Fedora-Cloud-Base-28-1.1.aarch64.qcow2 \
+ Fedora-Cloud-Base-29-1.2.x86_64.qcow2 \
+ Fedora-Cloud-Base-29-1.2.aarch64.qcow2 \
+ Fedora-Cloud-Base-30-1.2.x86_64.qcow2 \
+ Fedora-Cloud-Base-30-1.2.aarch64.qcow2 \
+ Fedora-Cloud-Base-31-1.9.x86_64.qcow2 \
+ Fedora-Cloud-Base-31-1.9.aarch64.qcow2 \
+ Fedora-Cloud-Base-32-1.6.x86_64.qcow2 \
+ Fedora-Cloud-Base-32-1.6.aarch64.qcow2 \
+ Fedora-Cloud-Base-33-1.2.x86_64.qcow2 \
+ Fedora-Cloud-Base-33-1.2.aarch64.qcow2 \
+ Fedora-Cloud-Base-34-1.2.x86_64.qcow2 \
+ Fedora-Cloud-Base-34-1.2.aarch64.qcow2 \
+ Fedora-Cloud-Base-35-1.2.x86_64.qcow2 \
+ Fedora-Cloud-Base-35-1.2.aarch64.qcow2
+
+OPENSUSE_IMGS = openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 \
+ openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2 \
+ openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2 \
+ openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz \
+ openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz \
+ openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2
+
+UBUNTU_IMGS = trusty-server-cloudimg-amd64-disk1.img \
+ trusty-server-cloudimg-i386-disk1.img \
+ trusty-server-cloudimg-ppc64el-disk1.img \
+ xenial-server-cloudimg-powerpc-disk1.img \
+ jammy-server-cloudimg-s390x.img
+
+DOWNLOAD_ASSETS = mbuto \
+ $(DEBIAN_IMGS) $(FEDORA_IMGS) $(OPENSUSE_IMGS) $(UBUNTU_IMGS)
LOCAL_ASSETS = mbuto.img QEMU_EFI.fd
ASSETS = $(DOWNLOAD_ASSETS) $(LOCAL_ASSETS)
@@ -34,3 +81,85 @@ clean:
realclean: clean
rm -rf $(DOWNLOAD_ASSETS)
+
+# Debian downloads
+debian-8.11.0-openstack-%.qcow2:
+ $(WGET) -O $@ https://cloud.debian.org/images/cloud/OpenStack/archive/8.11.0/debian-8.11.0-openstack-$*.qcow2
+
+debian-9-nocloud-%-daily-20200210-166.qcow2:
+ $(WGET) -O $@ https://cloud.debian.org/images/cloud/stretch/daily/20200210-166/debian-9-nocloud-$*-daily-20200210-166.qcow2
+
+debian-10-nocloud-%.qcow2:
+ $(WGET) -O $@ https://cloud.debian.org/images/cloud/buster/latest/debian-10-nocloud-$*.qcow2
+
+debian-10-generic-%.qcow2:
+ $(WGET) -O $@ https://cloud.debian.org/images/cloud/buster/latest/debian-10-generic-$*.qcow2
+
+debian-11-nocloud-%.qcow2:
+ $(WGET) -O $@ https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-nocloud-$*.qcow2
+
+debian-11-generic-%.qcow2:
+ $(WGET) -O $@ https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-$*.qcow2
+
+debian-sid-nocloud-%-daily.qcow2:
+ $(WGET) -O $@ https://cloud.debian.org/images/cloud/sid/daily/latest/debian-sid-nocloud-$*-daily.qcow2
+
+# Fedora downloads
+Fedora-Cloud-Base-26-1.5.%.qcow2:
+ $(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/CloudImages/$*/images/Fedora-Cloud-Base-26-1.5.$*.qcow2
+
+Fedora-Cloud-Base-27-1.6.%.qcow2:
+ $(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/27/CloudImages/$*/images/Fedora-Cloud-Base-27-1.6.$*.qcow2
+
+Fedora-Cloud-Base-28-1.1.%.qcow2:
+ $(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Cloud/$*/images/Fedora-Cloud-Base-28-1.1.$*.qcow2
+
+Fedora-Cloud-Base-29-1.2.%.qcow2:
+ $(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/29/Cloud/$*/images/Fedora-Cloud-Base-29-1.2.$*.qcow2
+
+Fedora-Cloud-Base-30-1.2.%.qcow2:
+ $(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Cloud/$*/images/Fedora-Cloud-Base-30-1.2.$*.qcow2
+
+Fedora-Cloud-Base-31-1.9.%.qcow2:
+ $(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Cloud/$*/images/Fedora-Cloud-Base-31-1.9.$*.qcow2
+
+Fedora-Cloud-Base-32-1.6.%.qcow2:
+ $(WGET) -O $@ https://download.fedoraproject.org/pub/fedora/linux/releases/32/Cloud/$*/images/Fedora-Cloud-Base-32-1.6.$*.qcow2
+
+Fedora-Cloud-Base-33-1.2.%.qcow2:
+ $(WGET) -O $@ https://download.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/$*/images/Fedora-Cloud-Base-33-1.2.$*.qcow2
+
+Fedora-Cloud-Base-34-1.2.%.qcow2:
+ $(WGET) -O $@ https://download.fedoraproject.org/pub/fedora/linux//releases/34/Cloud/$*/images/Fedora-Cloud-Base-34-1.2.$*.qcow2
+
+Fedora-Cloud-Base-35-1.2.%.qcow2:
+ $(WGET) -O $@ https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/$*/images/Fedora-Cloud-Base-35-1.2.$*.qcow2
+
+# OpenSuSE downloads
+openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2:
+ $(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.1/jeos/openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2
+
+openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2:
+ $(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.2/appliances/openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2
+
+openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2:
+ $(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2
+
+openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz:
+ $(WGET) -O $@ http://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz
+
+openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz:
+ $(WGET) -O $@ http://download.opensuse.org/ports/armv7hl/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz
+
+openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2:
+ $(WGET) -O $@ https://download.opensuse.org/tumbleweed/appliances/openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2
+
+# Ubuntu downloads
+trusty-server-cloudimg-%-disk1.img:
+ $(WGET) -O $@ https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-$*-disk1.img
+
+xenial-server-cloudimg-powerpc-disk1.img:
+ $(WGET) -O $@ https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-powerpc-disk1.img
+
+jammy-server-cloudimg-s390x.img:
+ $(WGET) -O $@ https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-s390x.img
diff --git a/test/distro/debian b/test/distro/debian
index 9992b69..a7a0f98 100644
--- a/test/distro/debian
+++ b/test/distro/debian
@@ -12,7 +12,7 @@
# Author: Stefano Brivio <sbrivio(a)redhat.com>
temp PIDFILE
-htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-aarch64 qemu-system-ppc64
+htools qemu-img virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-aarch64 qemu-system-ppc64
# Quick pasta test: send message from init to ns, and from ns to init
def distro_quick_pasta_test
@@ -45,7 +45,7 @@ hout GUEST_FILES ls -1 *.c *.h *.sh passt.1 qrap.1 Makefile | tr '\n' ' '; echo
test Debian GNU/Linux 8 (jessie), amd64
temp IMG
-host wget https://cloud.debian.org/images/cloud/OpenStack/archive/8.11.0/debian-8.11.0-openstack-amd64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-8.11.0-openstack-amd64.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).service
host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-config
@@ -76,7 +76,7 @@ hout PID cat __PIDFILE__
test Debian GNU/Linux 9 (stretch, oldoldstable), amd64
temp IMG
-host wget https://cloud.debian.org/images/cloud/stretch/daily/20200210-166/debian-9-nocloud-amd64-daily-20200210-166.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-9-nocloud-amd64-daily-20200210-166.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
@@ -100,7 +100,7 @@ sleep 1
test Debian GNU/Linux 10 (buster, oldstable), amd64
temp IMG
-host wget https://cloud.debian.org/images/cloud/buster/latest/debian-10-nocloud-amd64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-10-nocloud-amd64.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
@@ -124,7 +124,7 @@ sleep 1
test Debian GNU/Linux 10 (buster, oldstable), aarch64
temp IMG
-host wget https://cloud.debian.org/images/cloud/buster/latest/debian-10-generic-arm64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-10-generic-arm64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -155,7 +155,8 @@ sleep 1
test Debian GNU/Linux 10 (buster, oldstable), ppc64le
temp IMG
-host wget https://cloud.debian.org/images/cloud/buster/latest/debian-10-generic-ppc64el.qcow2 -O __IMG__
+
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-10-generic-ppc64el.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
@@ -188,7 +189,7 @@ hostb reset
test Debian GNU/Linux 11 (bullseye, stable), amd64
temp IMG
-host wget https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-nocloud-amd64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-11-nocloud-amd64.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
@@ -210,7 +211,7 @@ sleep 1
test Debian GNU/Linux 11 (bullseye, stable), aarch64
temp IMG
-host wget https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-arm64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-11-generic-arm64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -239,7 +240,7 @@ sleep 1
test Debian GNU/Linux 11 (bullseye, stable), ppc64le
temp IMG
-host wget https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-ppc64el.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-11-generic-ppc64el.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
@@ -270,7 +271,7 @@ hostb reset
test Debian GNU/Linux sid (experimental), amd64
temp IMG
-host wget https://cloud.debian.org/images/cloud/sid/daily/latest/debian-sid-nocloud-amd64-daily.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-sid-nocloud-amd64-daily.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
@@ -292,7 +293,7 @@ sleep 1
test Debian GNU/Linux sid (experimental), aarch64
temp IMG
-host wget https://cloud.debian.org/images/cloud/sid/daily/latest/debian-sid-nocloud-arm64-daily.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-sid-nocloud-arm64-daily.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
@@ -313,7 +314,7 @@ sleep 1
test Debian GNU/Linux sid (experimental), ppc64le
temp IMG
-host wget https://cloud.debian.org/images/cloud/sid/daily/latest/debian-sid-nocloud-ppc64el-daily.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/debian-sid-nocloud-ppc64el-daily.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
diff --git a/test/distro/fedora b/test/distro/fedora
index 9fbba6b..783d0ea 100644
--- a/test/distro/fedora
+++ b/test/distro/fedora
@@ -12,7 +12,7 @@
# Author: Stefano Brivio <sbrivio(a)redhat.com>
temp PIDFILE
-htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64
+htools qemu-img virt-edit guestfish head sed cat kill qemu-system-x86_64
# Quick pasta test: send message from init to ns, and from ns to init
def distro_quick_pasta_test
@@ -66,7 +66,7 @@ hout GUEST_FILES ls -1 *.c *.h *.sh passt.1 qrap.1 Makefile | tr '\n' ' '; echo
test Fedora 26, x86_64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/CloudImages/x86_64/images/Fedora-Cloud-Base-26-1.5.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-26-1.5.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
@@ -96,7 +96,7 @@ hout PID cat __PIDFILE__
test Fedora 27, x86_64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/27/CloudImages/x86_64/images/Fedora-Cloud-Base-27-1.6.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-27-1.6.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
@@ -123,7 +123,7 @@ sleep 1
test Fedora 28, x86_64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Cloud/x86_64/images/Fedora-Cloud-Base-28-1.1.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-28-1.1.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
@@ -150,7 +150,7 @@ sleep 1
test Fedora 28, aarch64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Cloud/aarch64/images/Fedora-Cloud-Base-28-1.1.aarch64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-28-1.1.aarch64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -179,7 +179,7 @@ host echo
test Fedora 29, x86_64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/29/Cloud/x86_64/images/Fedora-Cloud-Base-29-1.2.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-29-1.2.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -205,7 +205,7 @@ sleep 1
test Fedora 29, aarch64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/29/Cloud/aarch64/images/Fedora-Cloud-Base-29-1.2.aarch64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-29-1.2.aarch64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -234,7 +234,7 @@ host echo
test Fedora 30, x86_64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Cloud/x86_64/images/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-30-1.2.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -260,7 +260,7 @@ sleep 1
test Fedora 30, aarch64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Cloud/aarch64/images/Fedora-Cloud-Base-30-1.2.aarch64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-30-1.2.aarch64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -289,7 +289,7 @@ host echo
test Fedora 31, x86_64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Cloud/x86_64/images/Fedora-Cloud-Base-31-1.9.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-31-1.9.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -315,7 +315,7 @@ sleep 1
test Fedora 31, aarch64
temp IMG
-host wget http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Cloud/aarch64/images/Fedora-Cloud-Base-31-1.9.aarch64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-31-1.9.aarch64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -344,7 +344,7 @@ host echo
test Fedora 32, x86_64
temp IMG
-host wget https://download.fedoraproject.org/pub/fedora/linux/releases/32/Cloud/x86_64/images/Fedora-Cloud-Base-32-1.6.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-32-1.6.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -370,7 +370,7 @@ sleep 1
test Fedora 32, aarch64
temp IMG
-host wget https://download.fedoraproject.org/pub/fedora/linux/releases/32/Cloud/aarch64/images/Fedora-Cloud-Base-32-1.6.aarch64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-32-1.6.aarch64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -399,7 +399,7 @@ host echo
test Fedora 33, x86_64
temp IMG
-host wget https://download.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-33-1.2.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -425,7 +425,7 @@ sleep 1
test Fedora 33, aarch64
temp IMG
-host wget https://download.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/aarch64/images/Fedora-Cloud-Base-33-1.2.aarch64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-33-1.2.aarch64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -454,7 +454,7 @@ host echo
test Fedora 34, x86_64
temp IMG
-host wget https://download.fedoraproject.org/pub/fedora/linux//releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-34-1.2.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -480,7 +480,7 @@ sleep 1
test Fedora 34, aarch64
temp IMG
-host wget https://download.fedoraproject.org/pub/fedora/linux//releases/34/Cloud/aarch64/images/Fedora-Cloud-Base-34-1.2.aarch64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-34-1.2.aarch64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -509,7 +509,7 @@ host echo
test Fedora 35, x86_64
temp IMG
-host wget https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/x86_64/images/Fedora-Cloud-Base-35-1.2.x86_64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-35-1.2.x86_64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
@@ -535,7 +535,7 @@ sleep 1
test Fedora 35, aarch64
temp IMG
-host wget https://download.fedoraproject.org/pub/fedora/linux/releases/35/Cloud/aarch64/images/Fedora-Cloud-Base-35-1.2.aarch64.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/Fedora-Cloud-Base-35-1.2.aarch64.qcow2 __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
diff --git a/test/distro/opensuse b/test/distro/opensuse
index f2da9fe..f9ace68 100644
--- a/test/distro/opensuse
+++ b/test/distro/opensuse
@@ -12,7 +12,7 @@
# Author: Stefano Brivio <sbrivio(a)redhat.com>
temp PIDFILE
-htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-aarch64 xzcat tr
+htools qemu-img virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-aarch64 xzcat tr
# Quick pasta test: send message from init to ns, and from ns to init
def distro_quick_pasta_test
@@ -45,7 +45,7 @@ hout GUEST_FILES ls -1 *.c *.h *.sh passt.1 qrap.1 Makefile | tr '\n' ' '; echo
test OpenSUSE Leap 15.1
temp IMG
-host wget https://download.opensuse.org/distribution/leap/15.1/jeos/openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
host guestfish --rw -a __IMG__ -i rm '/usr/lib/systemd/system/systemd-journald.service'
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/default.target.wants/jeos-firstboot.service
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
@@ -73,7 +73,7 @@ hout PID cat __PIDFILE__
test OpenSUSE Leap 15.2
-host wget https://download.opensuse.org/distribution/leap/15.2/appliances/openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
host guestfish --rw -a __IMG__ -i rm '/usr/lib/systemd/system/systemd-journald.service'
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/default.target.wants/jeos-firstboot.service
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
@@ -98,7 +98,7 @@ sleep 1
test OpenSUSE Leap 15.3
-host wget https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
host guestfish --rw -a __IMG__ -i rm '/usr/lib/systemd/system/systemd-journald.service'
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/default.target.wants/jeos-firstboot.service
host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g'
@@ -126,7 +126,7 @@ sleep 1
test OpenSUSE Tumbleweed aarch64
temp IMG
-host wget http://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz -O - | xzcat > __IMG__
+host xzcat __BASEPATH__/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz > __IMG__
host virt-edit -a __IMG__ -m /dev/sda3 /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
@@ -153,7 +153,7 @@ test OpenSUSE Tumbleweed armv7l
temp IMG
temp ZIMAGE
temp INITRD
-host wget http://download.opensuse.org/ports/armv7hl/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz -O - | xz -d > __IMG__
+host xzcat __BASEPATH__/openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz -O > __IMG__
host guestfish -a __IMG__ -i download /boot/zImage __ZIMAGE__
host guestfish -a __IMG__ -i download /boot/initrd __INITRD__
host virt-edit -a __IMG__ -m /dev/sda3 /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 %I $TERM/g'
@@ -179,7 +179,7 @@ sleep 1
test OpenSUSE Tumbleweed
temp IMG
-host wget https://download.opensuse.org/tumbleweed/appliances/openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2 -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/systemd-journald.service
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/default.target.wants/jeos-firstboot.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/serial-getty(a).service
diff --git a/test/distro/ubuntu b/test/distro/ubuntu
index 20b861a..6e094d7 100644
--- a/test/distro/ubuntu
+++ b/test/distro/ubuntu
@@ -1,4 +1,4 @@
-<# SPDX-License-Identifier: AGPL-3.0-or-later
+# SPDX-License-Identifier: AGPL-3.0-or-later
#
# PASST - Plug A Simple Socket Transport
# for qemu/UNIX domain socket mode
@@ -12,7 +12,7 @@
# Author: Stefano Brivio <sbrivio(a)redhat.com>
temp PIDFILE
-htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-ppc64 qemu-system-s390x
+htools qemu-img virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-ppc64 qemu-system-s390x
# Quick pasta test: send message from init to ns, and from ns to init
def distro_quick_pasta_test
@@ -44,7 +44,7 @@ hout GUEST_FILES ls -1 *.c *.h *.sh passt.1 qrap.1 Makefile | tr '\n' ' '; echo
test Ubuntu 14.04.5 LTS (Trusty Tahr), amd64
temp IMG
-host wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/trusty-server-cloudimg-amd64-disk1.img __IMG__
host virt-edit -a __IMG__ /etc/init/ttyS0.conf -e 's/\/getty/\/getty --autologin root/'
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-config.conf
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-final.conf
@@ -77,7 +77,7 @@ hout PID cat __PIDFILE__
test Ubuntu 14.04.5 LTS (Trusty Tahr), i386
temp IMG
-host wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-i386-disk1.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/trusty-server-cloudimg-i386-disk1.img __IMG__
host virt-edit -a __IMG__ /etc/init/ttyS0.conf -e 's/\/getty/\/getty --autologin root/'
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-config.conf
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-final.conf
@@ -107,7 +107,7 @@ sleep 1
test Ubuntu 14.04.5 LTS (Trusty Tahr), ppc64le
temp IMG
-host wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-ppc64el-disk1.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/trusty-server-cloudimg-ppc64el-disk1.img __IMG__
host virt-edit -a __IMG__ /etc/init/hvc0.conf -e 's/\/getty/\/getty --autologin root/'
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-config.conf
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-final.conf
@@ -140,7 +140,7 @@ host echo
test Ubuntu 16.04 LTS (Xenial Xerus), ppc64 (be)
temp IMG
-host wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-powerpc-disk1.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/xenial-server-cloudimg-powerpc-disk1.img __IMG__
host virt-edit -a __IMG__ /lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/cloud-init.target.wants/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/cloud-init.target.wants/cloud-final.service
@@ -170,7 +170,7 @@ host echo
test Ubuntu 22.04 (Jammy Jellyfish), s390x
temp IMG
-host wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-s390x.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/jammy-server-cloudimg-s390x.img __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
--
@@ -1,4 +1,4 @@
-<# SPDX-License-Identifier: AGPL-3.0-or-later
+# SPDX-License-Identifier: AGPL-3.0-or-later
#
# PASST - Plug A Simple Socket Transport
# for qemu/UNIX domain socket mode
@@ -12,7 +12,7 @@
# Author: Stefano Brivio <sbrivio(a)redhat.com>
temp PIDFILE
-htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-ppc64 qemu-system-s390x
+htools qemu-img virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-ppc64 qemu-system-s390x
# Quick pasta test: send message from init to ns, and from ns to init
def distro_quick_pasta_test
@@ -44,7 +44,7 @@ hout GUEST_FILES ls -1 *.c *.h *.sh passt.1 qrap.1 Makefile | tr '\n' ' '; echo
test Ubuntu 14.04.5 LTS (Trusty Tahr), amd64
temp IMG
-host wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/trusty-server-cloudimg-amd64-disk1.img __IMG__
host virt-edit -a __IMG__ /etc/init/ttyS0.conf -e 's/\/getty/\/getty --autologin root/'
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-config.conf
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-final.conf
@@ -77,7 +77,7 @@ hout PID cat __PIDFILE__
test Ubuntu 14.04.5 LTS (Trusty Tahr), i386
temp IMG
-host wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-i386-disk1.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/trusty-server-cloudimg-i386-disk1.img __IMG__
host virt-edit -a __IMG__ /etc/init/ttyS0.conf -e 's/\/getty/\/getty --autologin root/'
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-config.conf
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-final.conf
@@ -107,7 +107,7 @@ sleep 1
test Ubuntu 14.04.5 LTS (Trusty Tahr), ppc64le
temp IMG
-host wget https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-ppc64el-disk1.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/trusty-server-cloudimg-ppc64el-disk1.img __IMG__
host virt-edit -a __IMG__ /etc/init/hvc0.conf -e 's/\/getty/\/getty --autologin root/'
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-config.conf
host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-final.conf
@@ -140,7 +140,7 @@ host echo
test Ubuntu 16.04 LTS (Xenial Xerus), ppc64 (be)
temp IMG
-host wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-powerpc-disk1.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/xenial-server-cloudimg-powerpc-disk1.img __IMG__
host virt-edit -a __IMG__ /lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/cloud-init.target.wants/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/cloud-init.target.wants/cloud-final.service
@@ -170,7 +170,7 @@ host echo
test Ubuntu 22.04 (Jammy Jellyfish), s390x
temp IMG
-host wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-s390x.img -O __IMG__
+host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/jammy-server-cloudimg-s390x.img __IMG__
host virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty(a).service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-config.service
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init.service
--
2.36.1
next prev parent reply other threads:[~2022-07-06 7:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 7:28 [PATCH 00/15] Test fixes, batch 4 David Gibson
2022-07-06 7:28 ` [PATCH 01/15] test: Add external mbuto profile, drop udhcpc, and switch to it David Gibson
2022-07-06 7:28 ` [PATCH 02/15] Handle the case of a DNS server on localhost David Gibson
2022-07-06 7:28 ` [PATCH 03/15] tests: qemu-system-ppc64le isn't a thing David Gibson
2022-07-06 7:28 ` [PATCH 04/15] Invoke specific qemu-system-* binaries David Gibson
2022-07-06 7:28 ` [PATCH 05/15] tests: Introduce makefile for building test assets David Gibson
2022-07-06 7:29 ` [PATCH 06/15] tests: Move mbuto download and execution to asset build David Gibson
2022-07-06 7:29 ` [PATCH 07/15] tests: Search multiple places for aarch64 EDK2 bios image David Gibson
2022-07-06 7:29 ` [PATCH 08/15] Clean up passt.pid file David Gibson
2022-07-06 7:29 ` [PATCH 09/15] tests: Remove unused set_mode() function David Gibson
2022-07-06 7:29 ` [PATCH 10/15] tests: Remove not-very-useful "req" directive David Gibson
2022-07-06 7:29 ` [PATCH 11/15] tests: Don't automatically traverse directories of test files David Gibson
2022-07-06 7:29 ` [PATCH 12/15] tests: Explicitly list test files in test/run, remove "onlyfor" support David Gibson
2022-07-06 7:29 ` David Gibson [this message]
2022-07-06 7:29 ` [PATCH 14/15] tests: Prepare distro images during asset build phase David Gibson
2022-07-06 7:29 ` [PATCH 15/15] tests: Remove unused DNS6 calculation from fedora tests David Gibson
2022-07-07 14:53 ` [PATCH 00/15] Test fixes, batch 4 Stefano Brivio
2022-07-11 9:42 ` Stefano Brivio
2022-07-12 8:26 ` David Gibson
2022-07-12 12:13 ` Stefano Brivio
2022-07-13 2:11 ` David Gibson
2022-07-13 6:04 ` Stefano Brivio
2022-07-13 10:19 ` David Gibson
2022-07-13 23:39 ` Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220706072909.596805-14-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).