passt: Relicense to GPL 2.0, or any later version
In practical terms, passt doesn't benefit from the additional
protection offered by the AGPL over the GPL, because it's not
suitable to be executed over a computer network.
Further, restricting the distribution under the version 3 of the GPL
wouldn't provide any practical advantage either, as long as the passt
codebase is concerned, and might cause unnecessary compatibility
dilemmas.
Change licensing terms to the GNU General Public License Version 2,
or any later version, with written permission from all current and
past contributors, namely: myself, David Gibson, Laine Stump, Andrea
Bolognani, Paul Holzinger, Richard W.M. Jones, Chris Kuhn, Florian
Weimer, Giuseppe Scrivano, Stefan Hajnoczi, and Vasiliy Ulyanov.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-04-05 20:11:44 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
#
|
|
|
|
# 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@redhat.com>
|
|
|
|
|
2022-09-13 06:35:23 +02:00
|
|
|
set PIDFILE __STATEDIR__/passt.pid
|
2022-07-06 09:29:07 +02:00
|
|
|
htools qemu-img virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-system-aarch64 xzcat tr
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
# Quick pasta test: send message from init to ns, and from ns to init
|
|
|
|
def distro_quick_pasta_test
|
2022-08-18 08:13:49 +02:00
|
|
|
host (socat -u TCP6-LISTEN:10000 OPEN:/tmp/init_msg,create,trunc; echo "from_init" | socat -u STDIN TCP6:[::1]:9999) &
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
hostb ./pasta
|
|
|
|
sleep 1
|
|
|
|
host PS1='$ '
|
2022-08-18 08:13:49 +02:00
|
|
|
host socat -u TCP6-LISTEN:9999 OPEN:/tmp/ns_msg,create,trunc &
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
sleep 2
|
2022-08-18 08:13:49 +02:00
|
|
|
host echo "from_ns" | socat -u STDIN TCP6:[::1]:10000
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
sleep 2
|
|
|
|
host echo
|
2022-01-30 03:09:46 +01:00
|
|
|
sleep 1
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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
|
2022-11-04 02:16:21 +01:00
|
|
|
hostb ./passt -s __STATEDIR__/passt.socket -P __PIDFILE__ &
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
sleep 1
|
|
|
|
host echo
|
|
|
|
hout DNS6 sed -n 's/^nameserver \([^:]*:\)\([^%]*\).*/\1\2/p' /etc/resolv.conf | head -1
|
2022-08-10 00:21:09 +02:00
|
|
|
hout GUEST_FILES ls -1 *.c *.h *.sh passt.1 qrap.1 Makefile README.md | tr '\n' ' '; echo
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
test OpenSUSE Leap 15.1
|
|
|
|
|
2022-09-13 06:35:23 +02:00
|
|
|
set IMG __STATEDIR__/opensuse-15.1-x86_64.img
|
2022-07-06 09:29:07 +02:00
|
|
|
host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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/
|
|
|
|
|
2022-11-04 02:16:21 +01:00
|
|
|
host qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -device virtio-net-pci,netdev=s0 -netdev stream,id=s0,server=off,addr.type=unix,addr.path=__STATEDIR__/passt.socket
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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
|
2022-08-18 08:13:49 +02:00
|
|
|
host for i in $(seq 1 10); do zypper install -y gcc make socat && break; done; echo
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
host make clean
|
2022-05-12 08:43:33 +02:00
|
|
|
host CFLAGS="-Werror" make
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2022-09-13 06:35:23 +02:00
|
|
|
set IMG __STATEDIR__/opensuse-15.2-x86_64.img
|
2022-07-06 09:29:07 +02:00
|
|
|
host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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/
|
|
|
|
|
2022-11-04 02:16:21 +01:00
|
|
|
host qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -device virtio-net-pci,netdev=s0 -netdev stream,id=s0,server=off,addr.type=unix,addr.path=__STATEDIR__/passt.socket
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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
|
2022-08-18 08:13:49 +02:00
|
|
|
host for i in $(seq 1 10); do zypper install -y gcc make socat && break; done; echo
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
host make clean
|
2022-05-12 08:43:33 +02:00
|
|
|
host CFLAGS="-Werror" make
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
distro_quick_pasta_test
|
|
|
|
|
|
|
|
hint
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
|
|
|
|
test OpenSUSE Leap 15.3
|
|
|
|
|
2022-09-13 06:35:23 +02:00
|
|
|
set IMG __STATEDIR__/opensuse-15.3-x86_64.img
|
2022-07-06 09:29:07 +02:00
|
|
|
host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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/
|
|
|
|
|
2022-11-04 02:16:21 +01:00
|
|
|
host qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -device virtio-net-pci,netdev=s0 -netdev stream,id=s0,server=off,addr.type=unix,addr.path=__STATEDIR__/passt.socket
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
# 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
|
2022-08-18 08:13:49 +02:00
|
|
|
host for i in $(seq 1 10); do zypper install -y gcc make socat && break; done; echo
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
host make clean
|
2022-05-12 08:43:33 +02:00
|
|
|
host CFLAGS="-Werror" make
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
distro_quick_pasta_test
|
|
|
|
|
|
|
|
hint
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
|
|
|
|
test OpenSUSE Tumbleweed aarch64
|
|
|
|
|
2022-09-13 06:35:23 +02:00
|
|
|
set IMG __STATEDIR__/opensuse-tumbleweed-aarch64.img
|
2022-07-06 09:29:07 +02:00
|
|
|
host xzcat __BASEPATH__/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz > __IMG__
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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/
|
|
|
|
|
2022-11-04 02:16:21 +01:00
|
|
|
host qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __IMG__ -device virtio-net-pci,netdev=s0 -netdev stream,id=s0,server=off,addr.type=unix,addr.path=__STATEDIR__/passt.socket
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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
|
2022-08-18 08:13:49 +02:00
|
|
|
host zypper install -y gcc make socat; echo
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
host make clean
|
2022-05-12 08:43:33 +02:00
|
|
|
host CFLAGS="-Werror" make
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
distro_quick_pasta_test
|
|
|
|
|
|
|
|
hint
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
|
2022-02-28 04:25:53 +01:00
|
|
|
test OpenSUSE Tumbleweed armv7l
|
|
|
|
|
2022-09-13 06:35:23 +02:00
|
|
|
set IMG __STATEDIR__/opensuse-tumbleweed-armv7l.img
|
|
|
|
set ZIMAGE __STATEDIR__/opensuse-tumbleweed-armv7l.zimage
|
|
|
|
set INITRD __STATEDIR__/opensuse-tumbleweed-armv7l.initrd
|
2022-07-06 09:29:07 +02:00
|
|
|
host xzcat __BASEPATH__/openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz > __IMG__
|
2022-02-28 04:25:53 +01:00
|
|
|
host guestfish -a __IMG__ -i download /boot/zImage __ZIMAGE__
|
|
|
|
host guestfish -a __IMG__ -i download /boot/initrd __INITRD__
|
|
|
|
host virt-edit -a __IMG__ -m /dev/sda3 /usr/lib/systemd/system/serial-getty@.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/
|
|
|
|
|
2022-11-04 02:16:21 +01:00
|
|
|
host qemu-system-arm -M virt -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none -kernel __ZIMAGE__ -initrd __INITRD__ -append 'root=/dev/sda3' -drive if=none,file=__IMG__,format=raw,id=hd,media=disk -device virtio-scsi-device -device scsi-hd,drive=hd -netdev socket,fd=5,id=passt -device virtio-net-device,netdev=passt
|
2022-02-28 04:25:53 +01:00
|
|
|
host PS1='$ '
|
|
|
|
host ip link set eth0 up
|
|
|
|
sleep 10
|
|
|
|
host echo "DNSSERVERS='__DNS6__'" | netconfig modify -s dns_resolver -i eth0
|
|
|
|
sleep 10
|
2022-08-18 08:13:49 +02:00
|
|
|
host zypper install -y gcc make socat; echo
|
2022-02-28 04:25:53 +01:00
|
|
|
|
|
|
|
host make clean
|
2022-05-12 08:43:33 +02:00
|
|
|
host CFLAGS="-Werror" make
|
2022-02-28 04:25:53 +01:00
|
|
|
|
|
|
|
distro_quick_pasta_test
|
|
|
|
|
|
|
|
hint
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
test OpenSUSE Tumbleweed
|
|
|
|
|
2022-09-13 06:35:23 +02:00
|
|
|
set IMG __STATEDIR__/opensuse-tumbleweed-x86_64.img
|
2022-07-06 09:29:07 +02:00
|
|
|
host qemu-img create -f qcow2 -F qcow2 -b __BASEPATH__/openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2 __IMG__
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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/
|
|
|
|
|
2022-11-04 02:16:21 +01:00
|
|
|
host qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -device virtio-net-pci,netdev=s0 -netdev stream,id=s0,server=off,addr.type=unix,addr.path=__STATEDIR__/passt.socket
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
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
|
2022-08-18 08:13:49 +02:00
|
|
|
host for i in $(seq 1 10); do zypper install -y gcc make socat && break; done; echo
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
host make clean
|
2022-05-12 08:43:33 +02:00
|
|
|
host CFLAGS="-Werror" make
|
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 <sbrivio@redhat.com>
2022-01-26 07:45:16 +01:00
|
|
|
|
|
|
|
distro_quick_pasta_test
|
|
|
|
|
|
|
|
hint
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
|
|
|
|
host kill __PID__
|