summaryrefslogtreecommitdiffstats
path: root/tests/vm
diff options
context:
space:
mode:
authorStefan Hajnoczi2022-09-21 19:10:51 +0200
committerStefan Hajnoczi2022-09-21 19:10:51 +0200
commit8f3aeb012f86977e3a48fae062f8afafa32ffce9 (patch)
tree9f375b3d87f5d29a482a3b65f21fca6fe0e21199 /tests/vm
parentMerge tag 'pull-request-2022-09-20' of https://gitlab.com/thuth/qemu into sta... (diff)
parenttests/docker: remove the Debian base images (diff)
downloadqemu-8f3aeb012f86977e3a48fae062f8afafa32ffce9.tar.gz
qemu-8f3aeb012f86977e3a48fae062f8afafa32ffce9.tar.xz
qemu-8f3aeb012f86977e3a48fae062f8afafa32ffce9.zip
Merge tag 'pull-testing-next-200922-2' of https://github.com/stsquad/qemu into staging
Testing and CI changes: - reduce number of targets for cross_user_build - update avocado xlnx_versal test with new binaries - add explicit timeouts to a number of avocado TCG tests - reduce default timeout to 120s - update lcitool to support cross-amd64 - flatten a number of docker cross containers - clean up stale qemu/debian10 dependencies - remove obsolete Fedora VM test - add configure workaround for meson --disable-pie bug - disable --static-pie for aarch64 gitlab runner - update aarch32/aarch64 jobs to 22.04 - deprecate 32 bit big-endian MIPS as a host - remove FROM qemu/ support from docker.py - remove Debian base images now everything is flat # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmMp8Q8ACgkQ+9DbCVqe # KkQmlwf/awT+jOmAW7TjlQnUTgHJ2hyOo7EViY/nmRkPOCT3ZG32pWFHBorHPX7s # BeqZzpzCvhzaIfObnjIssx13C5QId5XjJGuTgMAnSsGhzTrp7VUJc1/bBfHcD9L2 # dJJduG+bfAkh95heBkry5EhFt2ZMui5yv9DjEH44hUUc9nwKtIQGts3H3fnVqzvv # rzLZ7c2lhdLpAxHjmjSiiD8H59lJ+DpoziaobW4D7teGgecnyGVvJ9m1YH4Rc+kM # gpLTOGMhADkQlysf5e5cvxXSJbP7YpXYrsr9X+DfEy5PMt2L3y4Yv0wiAz9ClYvm # obD4wMQS5echYvb77qS1G8A0VMEPqA== # =3oYu # -----END PGP SIGNATURE----- # gpg: Signature made Tue 20 Sep 2022 12:57:51 EDT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * tag 'pull-testing-next-200922-2' of https://github.com/stsquad/qemu: (30 commits) tests/docker: remove the Debian base images tests/docker: remove FROM qemu/ support from docker.py tests/docker: update and flatten debian-toolchain tests/docker: update and flatten debian-hexagon-cross tests/docker: update and flatten debian-loongarch-cross tests/docker: update and flatten debian-amd64-cross tests/lcitool: bump to latest version tests/docker: update and flatten debian-all-test-cross tests/docker: flatten debian-riscv64-test-cross Deprecate 32 bit big-endian MIPS gitlab-ci: update aarch32/aarch64 custom runner jobs gitlab-ci/custom-runners: Disable -static-pie for ubuntu-20.04-aarch64 configure: explicitly set cflags for --disable-pie tests/vm: Remove obsolete Fedora VM test tests/docker: remove amd64 qemu/debian10 dependency tests/docker: remove tricore qemu/debian10 dependency tests/docker: flatten debian-powerpc-test-cross tests/docker: update and flatten debian-sparc64-cross tests/docker: update and flatten debian-sh4-cross tests/docker: update and flatten debian-mips64-cross ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/Makefile.include3
-rwxr-xr-xtests/vm/fedora190
2 files changed, 1 insertions, 192 deletions
diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index 8d2a164552..2cc2203d09 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -15,7 +15,7 @@ endif
EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
-X86_IMAGES := freebsd netbsd openbsd fedora haiku.x86_64
+X86_IMAGES := freebsd netbsd openbsd haiku.x86_64
ifneq ($(GENISOIMAGE),)
X86_IMAGES += centos
ifneq ($(EFI_AARCH64),)
@@ -45,7 +45,6 @@ vm-help vm-test:
@echo " vm-build-freebsd - Build QEMU in FreeBSD VM"
@echo " vm-build-netbsd - Build QEMU in NetBSD VM"
@echo " vm-build-openbsd - Build QEMU in OpenBSD VM"
- @echo " vm-build-fedora - Build QEMU in Fedora VM"
ifneq ($(GENISOIMAGE),)
@echo " vm-build-centos - Build QEMU in CentOS VM, with Docker"
ifneq ($(EFI_AARCH64),)
diff --git a/tests/vm/fedora b/tests/vm/fedora
deleted file mode 100755
index 12eca919a0..0000000000
--- a/tests/vm/fedora
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/usr/bin/env python3
-#
-# Fedora VM image
-#
-# Copyright 2019 Red Hat Inc.
-#
-# Authors:
-# Gerd Hoffmann <kraxel@redhat.com>
-#
-# This code is licensed under the GPL version 2 or later. See
-# the COPYING file in the top-level directory.
-#
-
-import os
-import re
-import sys
-import time
-import socket
-import subprocess
-import basevm
-
-class FedoraVM(basevm.BaseVM):
- name = "fedora"
- arch = "x86_64"
-
- base = "https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/"
- link = base + "Server/x86_64/iso/Fedora-Server-netinst-x86_64-30-1.2.iso"
- repo = base + "Server/x86_64/os/"
- full = base + "Everything/x86_64/os/"
- csum = "5e4eac4566d8c572bfb3bcf54b7d6c82006ec3c6c882a2c9235c6d3494d7b100"
- size = "20G"
- pkgs = [
- # tools
- 'git-core',
- 'gcc', 'binutils', 'make', 'ninja-build',
-
- # perl
- 'perl',
-
- # libs: usb
- '"pkgconfig(libusb-1.0)"',
- '"pkgconfig(libusbredirparser-0.5)"',
-
- # libs: crypto
- '"pkgconfig(gnutls)"',
-
- # libs: ui
- '"pkgconfig(sdl2)"',
- '"pkgconfig(gtk+-3.0)"',
- '"pkgconfig(ncursesw)"',
-
- # libs: audio
- '"pkgconfig(libpulse)"',
- '"pkgconfig(alsa)"',
-
- # libs: migration
- '"pkgconfig(libzstd)"',
-]
-
- BUILD_SCRIPT = """
- set -e;
- rm -rf /home/qemu/qemu-test.*
- cd $(mktemp -d /home/qemu/qemu-test.XXXXXX);
- mkdir src build; cd src;
- tar -xf /dev/vdb;
- cd ../build
- ../src/configure --python=python3 {configure_opts};
- gmake --output-sync -j{jobs} {target} {verbose};
- """
-
- def build_image(self, img):
- self.print_step("Downloading install iso")
- cimg = self._download_with_cache(self.link, sha256sum=self.csum)
- img_tmp = img + ".tmp"
- iso = img + ".install.iso"
-
- self.print_step("Preparing iso and disk image")
- subprocess.check_call(["cp", "-f", cimg, iso])
- self.exec_qemu_img("create", "-f", "qcow2", img_tmp, self.size)
- self.print_step("Booting installer")
- self.boot(img_tmp, extra_args = [
- "-machine", "graphics=off",
- "-device", "VGA",
- "-cdrom", iso
- ])
- self.console_init(300)
- self.console_wait("installation process.")
- time.sleep(0.3)
- self.console_send("\t")
- time.sleep(0.3)
- self.console_send(" console=ttyS0")
- proxy = os.environ.get("http_proxy")
- if not proxy is None:
- self.console_send(" proxy=%s" % proxy)
- self.console_send(" inst.proxy=%s" % proxy)
- self.console_send(" inst.repo=%s" % self.repo)
- self.console_send("\n")
-
- self.console_wait_send("2) Use text mode", "2\n")
-
- self.console_wait_send("5) [!] Installation Dest", "5\n")
- self.console_wait_send("1) [x]", "c\n")
- self.console_wait_send("2) [ ] Use All Space", "2\n")
- self.console_wait_send("2) [x] Use All Space", "c\n")
- self.console_wait_send("1) [ ] Standard Part", "1\n")
- self.console_wait_send("1) [x] Standard Part", "c\n")
-
- self.console_wait_send("7) [!] Root password", "7\n")
- self.console_wait("Password:")
- self.console_send("%s\n" % self._config["root_pass"])
- self.console_wait("Password (confirm):")
- self.console_send("%s\n" % self._config["root_pass"])
-
- self.console_wait_send("8) [ ] User creation", "8\n")
- self.console_wait_send("1) [ ] Create user", "1\n")
- self.console_wait_send("3) User name", "3\n")
- self.console_wait_send("ENTER:", "%s\n" % self._config["guest_user"])
- self.console_wait_send("4) [ ] Use password", "4\n")
- self.console_wait_send("5) Password", "5\n")
- self.console_wait("Password:")
- self.console_send("%s\n" % self._config["guest_pass"])
- self.console_wait("Password (confirm):")
- self.console_send("%s\n" % self._config["guest_pass"])
- self.console_wait_send("7) Groups", "c\n")
-
- while True:
- good = self.console_wait("3) [x] Installation",
- "3) [!] Installation")
- self.console_send("r\n")
- if good:
- break
- time.sleep(10)
-
- while True:
- good = self.console_wait("4) [x] Software",
- "4) [!] Software")
- self.console_send("r\n")
- if good:
- break
- time.sleep(10)
- self.console_send("r\n" % self._config["guest_pass"])
-
- self.console_wait_send("'b' to begin install", "b\n")
-
- self.print_step("Installation started now, this will take a while")
-
- self.console_wait_send("Installation complete", "\n")
- self.print_step("Installation finished, rebooting")
-
- # setup qemu user
- prompt = " ~]$"
- self.console_ssh_init(prompt, self._config["guest_user"],
- self._config["guest_pass"])
- self.console_wait_send(prompt, "exit\n")
-
- # setup root user
- prompt = " ~]#"
- self.console_ssh_init(prompt, "root", self._config["root_pass"])
- self.console_sshd_config(prompt)
-
- # setup virtio-blk #1 (tarfile)
- self.console_wait(prompt)
- self.console_send("echo 'KERNEL==\"vdb\" MODE=\"666\"' >> %s\n" %
- "/etc/udev/rules.d/99-qemu.rules")
-
- self.print_step("Configuration finished, rebooting")
- self.console_wait_send(prompt, "reboot\n")
- self.console_wait("login:")
- self.wait_ssh()
-
- self.print_step("Installing packages")
- self.ssh_root_check("rm -vf /etc/yum.repos.d/fedora*.repo\n")
- self.ssh_root_check("echo '[fedora]' >> /etc/yum.repos.d/qemu.repo\n")
- self.ssh_root_check("echo 'baseurl=%s' >> /etc/yum.repos.d/qemu.repo\n" % self.full)
- self.ssh_root_check("echo 'gpgcheck=0' >> /etc/yum.repos.d/qemu.repo\n")
- self.ssh_root_check("dnf install -y %s\n" % " ".join(self.pkgs))
-
- # shutdown
- self.ssh_root(self.poweroff)
- self.console_wait("sleep state S5")
- self.wait()
-
- if os.path.exists(img):
- os.remove(img)
- os.rename(img_tmp, img)
- os.remove(iso)
- self.print_step("All done")
-
-if __name__ == "__main__":
- sys.exit(basevm.main(FedoraVM))