* [PATCH 3/4] test: Add distribution tests for several architectures and kernel versions
2022-01-28 18:34 [PATCH 0/4] Tests for multiple architectures and distributions Stefano Brivio
2022-01-28 18:34 ` [PATCH 1/4] test/lib/term: Allow for a wider variety of prompt characters in pane_wait() Stefano Brivio
2022-01-28 18:34 ` [PATCH 2/4] test/lib/test: Introduce 'def' directive for frequently used patterns Stefano Brivio
@ 2022-01-28 18:34 ` Stefano Brivio
2022-01-28 18:34 ` [PATCH 4/4] test: Add basic documentation about test suite, and cool-retro-term profile Stefano Brivio
3 siblings, 0 replies; 5+ messages in thread
From: Stefano Brivio @ 2022-01-28 18:34 UTC (permalink / raw)
To: passt-dev
[-- Attachment #1: Type: text/plain, Size: 57242 bytes --]
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 <sbrivio(a)redhat.com>
---
README.md | 4 +-
test/distro/debian | 343 ++++++++++++++++++++++++++
test/distro/fedora | 563 +++++++++++++++++++++++++++++++++++++++++++
test/distro/opensuse | 182 ++++++++++++++
test/distro/ubuntu | 208 ++++++++++++++++
test/run | 1 +
6 files changed, 1299 insertions(+), 2 deletions(-)
create mode 100644 test/distro/debian
create mode 100644 test/distro/fedora
create mode 100644 test/distro/opensuse
create mode 100644 test/distro/ubuntu
diff --git a/README.md b/README.md
index 7f3cd58..d16b705 100644
--- a/README.md
+++ b/README.md
@@ -217,7 +217,7 @@ speeding up local connections, and usually requiring NAT. _pasta_:
### Portability
* Linux
* ✅ starting from 4.18 kernel version
- * 🛠 starting from 3.8 kernel version
+ * ✅ starting from 3.13 kernel version
* 🛠 build-time selection of AVX2 instructions (as much as possible)
* ⌚ [_musl_](https://bugs.passt.top/show_bug.cgi?id=4) and
[_uClibc-ng_](https://bugs.passt.top/show_bug.cgi?id=5)
@@ -284,9 +284,9 @@ speeding up local connections, and usually requiring NAT. _pasta_:
### Availability
* ✅ convenience unofficial packages for Debian, RPM-based distributions on
x86_64 (static builds)
+* ✅ testing on non-x86 architectures
* 🛠 official
[OpenSUSE packages](https://build.opensuse.org/package/show/home:mnhauke/passt)
-* 🛠 testing on non-x86 architectures
* ⌚ packages for Debian, Fedora, etc.
### Services
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 <sbrivio(a)redhat.com>
+
+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(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
+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(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/
+
+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(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/
+
+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(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
+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(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
+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(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/
+
+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(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
+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(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
+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(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/
+
+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(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/
+
+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(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/
+
+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 <sbrivio(a)redhat.com>
+
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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(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
+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 <sbrivio(a)redhat.com>
+
+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(a)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(a)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(a)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(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/
+
+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(a).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'
+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 <sbrivio(a)redhat.com>
+
+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(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
+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(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
+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__
diff --git a/test/run b/test/run
index 2586e85..dadd983 100755
--- a/test/run
+++ b/test/run
@@ -64,6 +64,7 @@ run() {
setup build
test build
+ test distro
setup pasta
test ndp
--
@@ -64,6 +64,7 @@ run() {
setup build
test build
+ test distro
setup pasta
test ndp
--
2.33.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] test: Add basic documentation about test suite, and cool-retro-term profile
2022-01-28 18:34 [PATCH 0/4] Tests for multiple architectures and distributions Stefano Brivio
` (2 preceding siblings ...)
2022-01-28 18:34 ` [PATCH 3/4] test: Add distribution tests for several architectures and kernel versions Stefano Brivio
@ 2022-01-28 18:34 ` Stefano Brivio
3 siblings, 0 replies; 5+ messages in thread
From: Stefano Brivio @ 2022-01-28 18:34 UTC (permalink / raw)
To: passt-dev
[-- Attachment #1: Type: text/plain, Size: 4060 bytes --]
Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
---
test/README.md | 104 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
create mode 100644 test/README.md
diff --git a/test/README.md b/test/README.md
new file mode 100644
index 0000000..647100f
--- /dev/null
+++ b/test/README.md
@@ -0,0 +1,104 @@
+<!---
+SPDX-License-Identifier: AGPL-3.0-or-later
+Copyright (c) 2021-2022 Red Hat GmbH
+Author: Stefano Brivio <sbrivio(a)redhat.com>
+-->
+
+# Scope
+
+This directory contains test cases for _passt_ and _pasta_ and a simple
+POSIX shell-based framework to define them, and run them as a suite.
+
+These tests can be run as part of a continuous integration workflow, and are
+also used to provide short usage demos, with video recording, for _passt_ and
+_pasta_ basic use cases.
+
+# Run
+
+## Dependencies
+
+### Packages
+
+The tests require some package dependencies commonly available in Linux
+distributions. If some packages are not available, the test groups that need
+them will be selectively skipped.
+
+This is a non-exhaustive list of packages that might not commonly be installed
+on a system, i.e. common utilities such as a shell are not included here.
+
+Example for Debian, and possibly most Debian-based distributions:
+
+ build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bc
+ clang-tidy cppcheck isc-dhcp-common udhcpc psmisc linux-cpupower
+ netcat-openbsd fakeroot lz4 lm-sensors qemu-system-arm qemu-system-ppc
+ qemu-system-misc qemu-system-x86`
+
+### Other tools
+
+Test measuring request-response and connect-request-response latencies use
+`neper`, which is not commonly packaged by distributions and needs to be built
+and installed manually:
+
+ git clone https://github.com/google/neper
+ cd neper; make
+ cp tcp_crr tcp_rr udp_rr /usr/local/bin
+
+Virtual machine images are built during test executions using
+[mbuto](https://mbuto.lameexcu.se/), the shell script is sourced via _git_
+as needed, so there's no need to actually install it.
+
+### Special requirements for continuous integration and demo modes
+
+Running the test suite as continuous integration or demo modes will record a
+video of the steps being executed, and create binary packages. The demo mode
+uses _cool-retro-term_ as terminal, whereas the continuous integration mode uses
+_MATE Terminal_ by default.
+
+The following additional packages are commonly needed as well:
+
+ dbus-x11 xdotool x11-utils xvfb ffmpeg mate-terminal cool-retro-term xauth
+ dconf-cli alien linux-perf tshark sqlite3`
+
+For convenience, suitable profiles for _MATE Terminal_ and _cool-retro-term_ are
+provided under the `env` directory. To source them:
+
+ dconf load /org/mate/terminal/profiles/ < env/mate-terminal.profile
+ cp env/cool_retro_term.sqlite ~/.local/share/cool-retro-term/QML/OfflineStorage/Databases/*.sqlite
+
+## Regular test
+
+Just issue:
+
+ ./run
+
+from the `test` directory. Elevated privileges are not needed.
+
+## Continuous integration
+
+Issuing:
+
+ ./ci
+
+will run the whole test suite while recording a video of the execution, and it
+will also build JavaScript fragments used on http://passt.top/ for performance
+data tables and links to specific video offsets.
+
+## Demo mode
+
+Issuing:
+
+ ./demo
+
+will run the demo cases under `demo`, recording videos as well.
+
+# Framework
+
+The implementation of the testing framework is under `lib`, and it provides
+facilities for terminal and _tmux_ session management, interpretation of test
+directives, video recording, and suchlike. Test cases are organised in the
+remaining directories.
+
+Test cases can be implemented as POSIX shell scripts, or as a set of directives,
+which are not formally documented here, but should be clear enough from the
+existing cases. The entry point for interpretation of test directives is
+implemented in `lib/test`.
--
@@ -0,0 +1,104 @@
+<!---
+SPDX-License-Identifier: AGPL-3.0-or-later
+Copyright (c) 2021-2022 Red Hat GmbH
+Author: Stefano Brivio <sbrivio(a)redhat.com>
+-->
+
+# Scope
+
+This directory contains test cases for _passt_ and _pasta_ and a simple
+POSIX shell-based framework to define them, and run them as a suite.
+
+These tests can be run as part of a continuous integration workflow, and are
+also used to provide short usage demos, with video recording, for _passt_ and
+_pasta_ basic use cases.
+
+# Run
+
+## Dependencies
+
+### Packages
+
+The tests require some package dependencies commonly available in Linux
+distributions. If some packages are not available, the test groups that need
+them will be selectively skipped.
+
+This is a non-exhaustive list of packages that might not commonly be installed
+on a system, i.e. common utilities such as a shell are not included here.
+
+Example for Debian, and possibly most Debian-based distributions:
+
+ build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bc
+ clang-tidy cppcheck isc-dhcp-common udhcpc psmisc linux-cpupower
+ netcat-openbsd fakeroot lz4 lm-sensors qemu-system-arm qemu-system-ppc
+ qemu-system-misc qemu-system-x86`
+
+### Other tools
+
+Test measuring request-response and connect-request-response latencies use
+`neper`, which is not commonly packaged by distributions and needs to be built
+and installed manually:
+
+ git clone https://github.com/google/neper
+ cd neper; make
+ cp tcp_crr tcp_rr udp_rr /usr/local/bin
+
+Virtual machine images are built during test executions using
+[mbuto](https://mbuto.lameexcu.se/), the shell script is sourced via _git_
+as needed, so there's no need to actually install it.
+
+### Special requirements for continuous integration and demo modes
+
+Running the test suite as continuous integration or demo modes will record a
+video of the steps being executed, and create binary packages. The demo mode
+uses _cool-retro-term_ as terminal, whereas the continuous integration mode uses
+_MATE Terminal_ by default.
+
+The following additional packages are commonly needed as well:
+
+ dbus-x11 xdotool x11-utils xvfb ffmpeg mate-terminal cool-retro-term xauth
+ dconf-cli alien linux-perf tshark sqlite3`
+
+For convenience, suitable profiles for _MATE Terminal_ and _cool-retro-term_ are
+provided under the `env` directory. To source them:
+
+ dconf load /org/mate/terminal/profiles/ < env/mate-terminal.profile
+ cp env/cool_retro_term.sqlite ~/.local/share/cool-retro-term/QML/OfflineStorage/Databases/*.sqlite
+
+## Regular test
+
+Just issue:
+
+ ./run
+
+from the `test` directory. Elevated privileges are not needed.
+
+## Continuous integration
+
+Issuing:
+
+ ./ci
+
+will run the whole test suite while recording a video of the execution, and it
+will also build JavaScript fragments used on http://passt.top/ for performance
+data tables and links to specific video offsets.
+
+## Demo mode
+
+Issuing:
+
+ ./demo
+
+will run the demo cases under `demo`, recording videos as well.
+
+# Framework
+
+The implementation of the testing framework is under `lib`, and it provides
+facilities for terminal and _tmux_ session management, interpretation of test
+directives, video recording, and suchlike. Test cases are organised in the
+remaining directories.
+
+Test cases can be implemented as POSIX shell scripts, or as a set of directives,
+which are not formally documented here, but should be clear enough from the
+existing cases. The entry point for interpretation of test directives is
+implemented in `lib/test`.
--
2.33.0
^ permalink raw reply related [flat|nested] 5+ messages in thread