1
0
mirror of https://passt.top/passt synced 2024-11-05 20:31:11 +00:00
passt/test/distro/fedora
David Gibson 30ac86823b tests: Remove unused DNS6 calculation from fedora tests
The Fedora test file extracts some information from the host resolv.conf
into a DNS6 variable which is then never used.  Remove this unnecessary
step, which is presumably a leftover from an earlier iteration.

This was the only user of 'head' and 'sed' in the test file, so those can
also be removed from the required tools.  The debian and ubuntu test files
also listed 'head' and 'sed' as tools, although they don't use them,
I'm guessing because of an earlier version which had the same DNS6 code.
Remove those as well.

The opensuse test file still actually uses DNS6, so leave it there for now.
The DNS handling and network config handling for SuSE looks to be kind of
broken, but fixing that is a job for another day.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-07-14 01:36:05 +02:00

397 lines
10 KiB
Plaintext

# 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@redhat.com>
temp PIDFILE
htools cat kill qemu-system-x86_64
# Quick pasta test: send message from init to ns, and from ns to init
def distro_quick_pasta_test
host (ncat -6 -l ::1 10000 > /tmp/init_msg; echo "from_init" | ncat ::1 9999) &
hostb ./pasta
sleep 1
host PS1='$ '
host ncat -6 -l ::1 9999 > /tmp/ns_msg &
sleep 2
host echo "from_ns" | ncat ::1 10000
sleep 2
host echo
sleep 1
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
# Bracketed paste mode off, needed from Fedora 34
def distro_quick_pasta_test_fedora34
host bind 'set enable-bracketed-paste off'
host (ncat -6 -l ::1 10000 > /tmp/init_msg; echo "from_init" | ncat -6 ::1 9999) &
hostb ./pasta
sleep 1
host PS1='$ '
host bind 'set enable-bracketed-paste off'
host ncat -6 -l ::1 9999 > /tmp/ns_msg &
sleep 2
host echo "from_ns" | ncat -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
test Fedora 26, x86_64
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-26-1.5.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-27-1.6.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-28-1.1.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __BASEPATH__/prepared-Fedora-Cloud-Base-28-1.1.aarch64.qcow2 -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-29-1.2.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __BASEPATH__/prepared-Fedora-Cloud-Base-29-1.2.aarch64.qcow2 -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-30-1.2.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __BASEPATH__/prepared-Fedora-Cloud-Base-30-1.2.aarch64.qcow2 -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-31-1.9.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __BASEPATH__/prepared-Fedora-Cloud-Base-31-1.9.aarch64.qcow2 -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-32-1.6.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __BASEPATH__/prepared-Fedora-Cloud-Base-32-1.6.aarch64.qcow2 -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-33-1.2.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __BASEPATH__/prepared-Fedora-Cloud-Base-33-1.2.aarch64.qcow2 -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-34-1.2.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __BASEPATH__/prepared-Fedora-Cloud-Base-34-1.2.aarch64.qcow2 -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci -snapshot
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
host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __BASEPATH__/prepared-Fedora-Cloud-Base-35-1.2.x86_64.qcow2 -net socket,fd=5 -net nic,model=virtio -snapshot
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
host ./qrap 5 qemu-system-aarch64 -m 2048 -cpu cortex-a57 -smp 2 -M virt -bios __BASEPATH__/QEMU_EFI.fd -nodefaults -nographic -vga none -serial stdio __BASEPATH__/prepared-Fedora-Cloud-Base-35-1.2.aarch64.qcow2 -net socket,fd=5 -net nic,model=virtio -device virtio-rng-pci -snapshot
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__