From 6e61b4040a0bc495a53ff413dbf2555aab98d89a Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 26 Jan 2022 07:45:16 +0100 Subject: test: Add distribution tests for several architectures and kernel versions The new tests check build and a simple case with pasta sending a short message in both directions (namespace to init, init to namespace). Tests cover a mix of Debian, Fedora, OpenSUSE and Ubuntu combinations on aarch64, i386, ppc64, ppc64le, s390x, x86_64. Builds tested starting from approximately glibc 2.19, gcc 4.7, and actual functionality approximately from 4.4 kernels, glibc 2.25, gcc 4.8, all the way up to current glibc/gcc/kernel versions. Signed-off-by: Stefano Brivio --- test/distro/debian | 343 +++++++++++++++++++++++++++++++ test/distro/fedora | 563 +++++++++++++++++++++++++++++++++++++++++++++++++++ test/distro/opensuse | 182 +++++++++++++++++ test/distro/ubuntu | 208 +++++++++++++++++++ 4 files changed, 1296 insertions(+) create mode 100644 test/distro/debian create mode 100644 test/distro/fedora create mode 100644 test/distro/opensuse create mode 100644 test/distro/ubuntu (limited to 'test/distro') diff --git a/test/distro/debian b/test/distro/debian new file mode 100644 index 0000000..6ba0b10 --- /dev/null +++ b/test/distro/debian @@ -0,0 +1,343 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# +# PASST - Plug A Simple Socket Transport +# for qemu/UNIX domain socket mode +# +# PASTA - Pack A Subtle Tap Abstraction +# for network namespace/tap device mode +# +# test/distro/debian - Debian builds, get packages via passt, test pasta +# +# Copyright (c) 2021 Red Hat GmbH +# Author: Stefano Brivio + +temp PIDFILE +htools wget virt-edit guestfish head sed cat kill qemu-system-aarch64 qemu-system-ppc64le + +# Quick pasta test: send message from init to ns, and from ns to init +def distro_quick_pasta_test +host export SHELL="/bin/dash" +host dash +host (nc -w1 -6 -l -p 10000 > /tmp/init_msg; echo "from_init" | nc -q0 ::1 9999) & +hostb ./pasta +sleep 1 +host nc -w1 -6 -l -p 9999 > /tmp/ns_msg & +sleep 2 +host echo "from_ns" | nc -q0 ::1 10000 +sleep 2 +host echo +hout NS_MSG cat /tmp/ns_msg +check [ __NS_MSG__ = "from_init" ] +hostb exit +host echo +hout INIT_MSG cat /tmp/init_msg +check [ __INIT_MSG__ = "from_ns" ] +endef + +# Start passt, set common variables +hostb ./passt -P __PIDFILE__ & +sleep 1 +host echo +hout GUEST_FILES ls -1 *.c *.h *.sh 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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.service +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-config +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-final +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init-local +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none -drive file=__IMG__,if=virtio -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Wno-missing-field-initializers -Wno-missing-braces -Wno-type-limits" make; echo $? +check [ __RET__ -eq 0 ] + +# TODO: pasta test skipped for the moment: clone() as called by NS_CALL hangs +# with wrapper provided by glibc 2.19, probably wrong argument order. + +hint +sleep 1 + +# PIDFILE is cleaned up when the next test starts, read it now +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-config +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-final +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init-local +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-config +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-final +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init-local +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-ppc64le -m 2048 -smp 2 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-config +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-final +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init-local +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-config +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-final +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init +host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init-local +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-ppc64le -m 2048 -smp 2 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.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/ + +host ./qrap 5 qemu-system-ppc64le -m 2048 -smp 2 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +hostb reset + + +sleep 1 +host kill __PID__ diff --git a/test/distro/fedora b/test/distro/fedora new file mode 100644 index 0000000..0a80555 --- /dev/null +++ b/test/distro/fedora @@ -0,0 +1,563 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# +# PASST - Plug A Simple Socket Transport +# for qemu/UNIX domain socket mode +# +# PASTA - Pack A Subtle Tap Abstraction +# for network namespace/tap device mode +# +# test/distro/fedora - Fedora builds, get packages via passt, test pasta +# +# Copyright (c) 2021 Red Hat GmbH +# Author: Stefano Brivio + +temp PIDFILE +htools wget virt-edit guestfish head sed cat kill + +# Quick pasta test: send message from init to ns, and from ns to init +def distro_quick_pasta_test +host (nc -6 -l -p 10000 > /tmp/init_msg; echo "from_init" | nc ::1 9999) & +hostb ./pasta +sleep 1 +host PS1='$ ' +host nc -6 -l -p 9999 > /tmp/ns_msg & +sleep 2 +host echo "from_ns" | nc ::1 10000 +sleep 2 +host echo +hout NS_MSG cat /tmp/ns_msg +check [ __NS_MSG__ = "from_init" ] +hostb exit +host echo +hout INIT_MSG cat /tmp/init_msg +check [ __INIT_MSG__ = "from_ns" ] +endef + +# Explicit listening address, bracketed paste mode off, needed from Fedora 34 +def distro_quick_pasta_test_fedora34 +host bind 'set enable-bracketed-paste off' +host (nc -6 -l -p 10000 > /tmp/init_msg; echo "from_init" | nc -6 ::1 9999) & +hostb ./pasta +sleep 1 +host PS1='$ ' +host bind 'set enable-bracketed-paste off' +host nc -6 -l ::1 9999 > /tmp/ns_msg & +sleep 2 +host echo "from_ns" | nc -6 ::1 10000 +sleep 2 +host echo +hout NS_MSG cat /tmp/ns_msg +check [ __NS_MSG__ = "from_init" ] +hostb exit +host echo +hout INIT_MSG cat /tmp/init_msg +check [ __INIT_MSG__ = "from_ns" ] +endef + +# Start passt, set common variables +hostb ./passt -P __PIDFILE__ & +sleep 1 +host echo +hout DNS6 sed -n 's/^nameserver \([^:]*:\)\([^%]*\).*/\1\2/p' /etc/resolv.conf | head -1 +hout GUEST_FILES ls -1 *.c *.h *.sh 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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.service +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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 + +# PIDFILE is cleaned up when the next test starts, read it now +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.service +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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@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@.service +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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test_fedora34 + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test_fedora34 + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test_fedora34 + +hint +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci +host PS1='$ ' +sleep 2 +host yum -y install make gcc nmap-ncat + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test_fedora34 + +hint +sleep 1 +hostb reset +sleep 1 +host echo + + +host kill __PID__ diff --git a/test/distro/opensuse b/test/distro/opensuse new file mode 100644 index 0000000..740108a --- /dev/null +++ b/test/distro/opensuse @@ -0,0 +1,182 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# +# PASST - Plug A Simple Socket Transport +# for qemu/UNIX domain socket mode +# +# PASTA - Pack A Subtle Tap Abstraction +# for network namespace/tap device mode +# +# test/distro/opensuse - OpenSUSE builds, get packages via passt, test pasta +# +# Copyright (c) 2021 Red Hat GmbH +# Author: Stefano Brivio + +temp PIDFILE +htools wget virt-edit guestfish head sed cat kill kvm qemu-system-aarch64 xzcat tr + +# Quick pasta test: send message from init to ns, and from ns to init +def distro_quick_pasta_test +host (nc -6 -l -p 10000 > /tmp/init_msg; echo "from_init" | nc -N ::1 9999) & +hostb ./pasta +sleep 1 +host PS1='$ ' +host nc -6 -l -p 9999 > /tmp/ns_msg & +sleep 2 +host echo "from_ns" | nc -N ::1 10000 +sleep 2 +host echo +hout NS_MSG cat /tmp/ns_msg +check [ __NS_MSG__ = "from_init" ] +hostb exit +host echo +hout INIT_MSG cat /tmp/init_msg +check [ __INIT_MSG__ = "from_ns" ] +endef + +# Start passt, set common variables +hostb ./passt -P __PIDFILE__ & +sleep 1 +host echo +hout DNS6 sed -n 's/^nameserver \([^:]*:\)\([^%]*\).*/\1\2/p' /etc/resolv.conf | head -1 +hout GUEST_FILES ls -1 *.c *.h *.sh 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 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@tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g' +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +host ip link set eth0 up +sleep 2 +host echo "DNSSERVERS='__DNS6__'" | netconfig modify -s dns_resolver -i eth0 +# zypper sometimes segfaults, hence the retries +host for i in $(seq 1 10); do zypper install -y gcc make netcat-openbsd && break; done; echo + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 + +# PIDFILE is cleaned up when the next test starts, read it now +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 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@tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g' +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +host ip link set eth0 up +sleep 2 +host echo "DNSSERVERS='__DNS6__'" | netconfig modify -s dns_resolver -i eth0 +# zypper sometimes segfaults, hence the retries +host for i in $(seq 1 10); do zypper install -y gcc make netcat-openbsd && break; done; echo + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 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@tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g' +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +# Multiple prompt logins might come up here +sleep 10 +host PS1='$ ' +host ip link set eth0 up +sleep 2 +host echo "DNSSERVERS='__DNS6__'" | netconfig modify -s dns_resolver -i eth0 +# zypper sometimes segfaults, hence the retries +host for i in $(seq 1 10); do zypper install -y gcc make netcat-openbsd && break; done; echo + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 virt-edit -a __IMG__ -m /dev/sda3 /usr/lib/systemd/system/serial-getty@.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/ + +host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +host ip link set enp0s1 up +sleep 10 +host echo "DNSSERVERS='__DNS6__'" | netconfig modify -s dns_resolver -i enp0s1 +sleep 10 +# No segfaults ever seen with this +host zypper install -y gcc make netcat-openbsd; echo + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +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 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@.service +host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty@tty1.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --timeout 5000 --autologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g' +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +host ip link set ens2 up +sleep 2 +host echo "DNSSERVERS='__DNS6__'" | netconfig modify -s dns_resolver -i ens2 +# zypper sometimes segfaults, hence the retries +host for i in $(seq 1 10); do zypper install -y gcc make netcat-openbsd && break; done; echo + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 + + +host kill __PID__ diff --git a/test/distro/ubuntu b/test/distro/ubuntu new file mode 100644 index 0000000..fcd3861 --- /dev/null +++ b/test/distro/ubuntu @@ -0,0 +1,208 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# +# PASST - Plug A Simple Socket Transport +# for qemu/UNIX domain socket mode +# +# PASTA - Pack A Subtle Tap Abstraction +# for network namespace/tap device mode +# +# test/distro/ubuntu - Ubuntu builds, get packages via passt, test pasta +# +# Copyright (c) 2021 Red Hat GmbH +# Author: Stefano Brivio + +temp PIDFILE +htools wget virt-edit guestfish head sed cat kill qemu-system-ppc64le qemu-system-s390x + +# Quick pasta test: send message from init to ns, and from ns to init +def distro_quick_pasta_test +host (nc -w1 -6 -l -p 10000 > /tmp/init_msg; echo "from_init" | nc -q0 ::1 9999) & +hostb ./pasta +sleep 1 +host PS1='$ ' +host nc -w1 -6 -l -p 9999 > /tmp/ns_msg & +sleep 2 +host echo "from_ns" | nc -q0 ::1 10000 +sleep 2 +host echo +hout NS_MSG cat /tmp/ns_msg +check [ __NS_MSG__ = "from_init" ] +hostb exit +host echo +hout INIT_MSG cat /tmp/init_msg +check [ __INIT_MSG__ = "from_ns" ] +endef + +# Start passt, set common variables +hostb ./passt -P __PIDFILE__ & +sleep 1 +host echo +hout GUEST_FILES ls -1 *.c *.h *.sh 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 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 +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-container.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-local.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-nonet.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-log-shutdown.conf +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none -drive file=__IMG__,if=virtio -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Wno-missing-field-initializers -Wno-missing-braces -Wno-type-limits" make; echo $? +check [ __RET__ -eq 0 ] + +# TODO: pasta test skipped for the moment: clone() as called by NS_CALL hangs +# with wrapper provided by glibc 2.19, probably wrong argument order. + +hint +sleep 1 + +# PIDFILE is cleaned up when the next test starts, read it now +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 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 +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-container.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-local.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-nonet.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-log-shutdown.conf +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none -drive file=__IMG__,if=virtio -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Wno-missing-field-initializers -Wno-missing-braces -Wno-type-limits -Wno-sign-compare" make; echo $? +check [ __RET__ -eq 0 ] + +# TODO: pasta test skipped for the moment: clone() as called by NS_CALL hangs +# with wrapper provided by glibc 2.19, probably wrong argument order. + +hint +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 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 +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-container.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-local.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init-nonet.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init.conf +host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-log-shutdown.conf +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-ppc64le -m 2048 -smp 2 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Wno-missing-field-initializers -Wno-missing-braces -Wno-type-limits -Wno-sign-compare" make; echo $? +check [ __RET__ -eq 0 ] + +# TODO: pasta test skipped for the moment: clone() as called by NS_CALL hangs +# with wrapper provided by glibc 2.19, probably wrong argument order. + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/cloud-init.target.wants/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/cloud-init.target.wants/cloud-init.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ + +host ./qrap 5 qemu-system-ppc64 -m 1024 -M pseries -nographic -nodefaults -serial stdio -no-reboot -nographic -vga none -hda __IMG__ -net socket,fd=5 -net nic,model=virtio +host PS1='$ ' +host dhclient +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +distro_quick_pasta_test + +hint +sleep 1 +hostb reset +sleep 1 +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 virt-edit -a __IMG__ /usr/lib/systemd/system/serial-getty@.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 +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.service +host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service +host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/multi-user.target.wants/snapd.service +host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/snap.lxd.activate.service +host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/snap.lxd.daemon.service +host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ +host ./qrap 5 qemu-system-s390x -m 2048 -smp 2 -serial stdio -nodefaults -nographic __IMG__ -net socket,fd=5 -net nic,model=virtio -device virtio-rng-ccw + +host service systemd-resolved stop +host apt-get -y remove needrestart snapd +host dhclient +sleep 2 +host apt-get update +host apt-get -y install make gcc netcat-openbsd + +host make clean +hout RET CFLAGS="-Werror" make; echo $? +check [ __RET__ -eq 0 ] + +host export SHELL="/bin/dash" +host dash +distro_quick_pasta_test + +hint +sleep 1 +hostb reset +sleep 1 +host echo + + +host kill __PID__ -- cgit v1.2.3