* [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1
@ 2023-07-18 9:30 Thomas Huth
2023-07-18 9:30 ` [PULL 1/8] s390x: Fix QEMU abort by selecting S390_FLIC_KVM Thomas Huth
` (8 more replies)
0 siblings, 9 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
The following changes since commit 361d5397355276e3007825cc17217c1e4d4320f7:
Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-07-17 15:49:27 +0100)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2023-07-18
for you to fetch changes up to a5754847e0fc2bc08a414dd381803009e8bca390:
tests/avocado: Disable the test_sbsaref_edk2_firmware by default (2023-07-18 11:22:51 +0200)
----------------------------------------------------------------
* Fix s390x KVM guests when compiling with --without-default-devices
* Fix /proc/cpuinfo features list in s390x linux-user emulation
* Generate FreeBSD VM package list via lcitool
* Disable the flaky test_sbsaref_edk2_firmware avocado test by default
----------------------------------------------------------------
Cédric Le Goater (1):
s390x: Fix QEMU abort by selecting S390_FLIC_KVM
Fabiano Rosas (1):
tests/qtest: Fix typo in multifd cancel test
Ilya Leoshkevich (1):
linux-user/elfload: Fix /proc/cpuinfo features: on s390x
Philippe Mathieu-Daudé (4):
tests/lcitool: Generate distribution packages list in JSON format
tests/lcitool: Refresh generated files
tests/vm: Introduce get_qemu_packages_from_lcitool_json() helper
tests/vm/freebsd: Get up-to-date package list from lcitool vars file
Thomas Huth (1):
tests/avocado: Disable the test_sbsaref_edk2_firmware by default
docs/devel/testing.rst | 5 +++
include/elf.h | 66 +++++++++++++++++++--------
linux-user/elfload.c | 41 +++++++++--------
tests/qtest/migration-test.c | 2 +-
hw/intc/Kconfig | 1 -
hw/s390x/Kconfig | 1 +
tests/avocado/machine_aarch64_sbsaref.py | 2 +-
tests/lcitool/refresh | 11 +++++
tests/vm/basevm.py | 11 +++++
tests/vm/freebsd | 42 +----------------
tests/vm/generated/README | 5 +++
tests/vm/generated/freebsd.json | 77 ++++++++++++++++++++++++++++++++
12 files changed, 183 insertions(+), 81 deletions(-)
create mode 100644 tests/vm/generated/README
create mode 100644 tests/vm/generated/freebsd.json
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PULL 1/8] s390x: Fix QEMU abort by selecting S390_FLIC_KVM
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
@ 2023-07-18 9:30 ` Thomas Huth
2023-07-18 9:30 ` [PULL 2/8] linux-user/elfload: Fix /proc/cpuinfo features: on s390x Thomas Huth
` (7 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
Cc: Cédric Le Goater, Philippe Mathieu-Daudé
From: Cédric Le Goater <clg@redhat.com>
If QEMU is built with --without-default-devices, the s390-flic-kvm
device is missing and QEMU aborts when started with the KVM accelerator.
Make sure it's available by selecting S390_FLIC_KVM in Kconfig.
Consequently, this also fixes an abort in tests/qtest/migration-test.
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Message-Id: <20230711151440.716822-1-clg@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/intc/Kconfig | 1 -
hw/s390x/Kconfig | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
index 21441d0a0c..97d550b06b 100644
--- a/hw/intc/Kconfig
+++ b/hw/intc/Kconfig
@@ -49,7 +49,6 @@ config S390_FLIC
config S390_FLIC_KVM
bool
- default y
depends on S390_FLIC && KVM
config OMPIC
diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig
index e8d4d68ece..4c068d7960 100644
--- a/hw/s390x/Kconfig
+++ b/hw/s390x/Kconfig
@@ -8,6 +8,7 @@ config S390_CCW_VIRTIO
imply PCIE_DEVICES
select PCI_EXPRESS
select S390_FLIC
+ select S390_FLIC_KVM if KVM
select SCLPCONSOLE
select VIRTIO_CCW
select MSI_NONBROKEN
--
2.39.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 2/8] linux-user/elfload: Fix /proc/cpuinfo features: on s390x
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
2023-07-18 9:30 ` [PULL 1/8] s390x: Fix QEMU abort by selecting S390_FLIC_KVM Thomas Huth
@ 2023-07-18 9:30 ` Thomas Huth
2023-07-18 9:30 ` [PULL 3/8] tests/qtest: Fix typo in multifd cancel test Thomas Huth
` (6 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson; +Cc: Ilya Leoshkevich
From: Ilya Leoshkevich <iii@linux.ibm.com>
elf_hwcap_str() takes a bit number, but compares it for equality with
the HWCAP_S390_* masks. This causes /proc/cpuinfo to display incorrect
hwcaps.
Fix by introducing the HWCAP_S390_NR_* constants and using them in
elf_hwcap_str() instead of the HWCAP_S390_*. While at it, add the
missing nnpa, pcimio and sie hwcaps from the latest kernel.
Output before:
features : esan3 zarch stfle msa
Output after:
features : esan3 zarch stfle msa ldisp eimm etf3eh highgprs vx vxe
Fixes: e19807bee357 ("linux-user/elfload: Introduce elf_hwcap_str() on s390x")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230627151356.273259-1-iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/elf.h | 66 +++++++++++++++++++++++++++++++-------------
linux-user/elfload.c | 41 ++++++++++++++-------------
2 files changed, 69 insertions(+), 38 deletions(-)
diff --git a/include/elf.h b/include/elf.h
index 2f4d0e56d1..ec9755e73b 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -596,25 +596,53 @@ typedef struct {
/* Bits present in AT_HWCAP for s390. */
-#define HWCAP_S390_ESAN3 1
-#define HWCAP_S390_ZARCH 2
-#define HWCAP_S390_STFLE 4
-#define HWCAP_S390_MSA 8
-#define HWCAP_S390_LDISP 16
-#define HWCAP_S390_EIMM 32
-#define HWCAP_S390_DFP 64
-#define HWCAP_S390_HPAGE 128
-#define HWCAP_S390_ETF3EH 256
-#define HWCAP_S390_HIGH_GPRS 512
-#define HWCAP_S390_TE 1024
-#define HWCAP_S390_VXRS 2048
-#define HWCAP_S390_VXRS_BCD 4096
-#define HWCAP_S390_VXRS_EXT 8192
-#define HWCAP_S390_GS 16384
-#define HWCAP_S390_VXRS_EXT2 32768
-#define HWCAP_S390_VXRS_PDE 65536
-#define HWCAP_S390_SORT 131072
-#define HWCAP_S390_DFLT 262144
+#define HWCAP_S390_NR_ESAN3 0
+#define HWCAP_S390_NR_ZARCH 1
+#define HWCAP_S390_NR_STFLE 2
+#define HWCAP_S390_NR_MSA 3
+#define HWCAP_S390_NR_LDISP 4
+#define HWCAP_S390_NR_EIMM 5
+#define HWCAP_S390_NR_DFP 6
+#define HWCAP_S390_NR_HPAGE 7
+#define HWCAP_S390_NR_ETF3EH 8
+#define HWCAP_S390_NR_HIGH_GPRS 9
+#define HWCAP_S390_NR_TE 10
+#define HWCAP_S390_NR_VXRS 11
+#define HWCAP_S390_NR_VXRS_BCD 12
+#define HWCAP_S390_NR_VXRS_EXT 13
+#define HWCAP_S390_NR_GS 14
+#define HWCAP_S390_NR_VXRS_EXT2 15
+#define HWCAP_S390_NR_VXRS_PDE 16
+#define HWCAP_S390_NR_SORT 17
+#define HWCAP_S390_NR_DFLT 18
+#define HWCAP_S390_NR_VXRS_PDE2 19
+#define HWCAP_S390_NR_NNPA 20
+#define HWCAP_S390_NR_PCI_MIO 21
+#define HWCAP_S390_NR_SIE 22
+
+#define HWCAP_S390_ESAN3 (1 << HWCAP_S390_NR_ESAN3)
+#define HWCAP_S390_ZARCH (1 << HWCAP_S390_NR_ZARCH)
+#define HWCAP_S390_STFLE (1 << HWCAP_S390_NR_STFLE)
+#define HWCAP_S390_MSA (1 << HWCAP_S390_NR_MSA)
+#define HWCAP_S390_LDISP (1 << HWCAP_S390_NR_LDISP)
+#define HWCAP_S390_EIMM (1 << HWCAP_S390_NR_EIMM)
+#define HWCAP_S390_DFP (1 << HWCAP_S390_NR_DFP)
+#define HWCAP_S390_HPAGE (1 << HWCAP_S390_NR_HPAGE)
+#define HWCAP_S390_ETF3EH (1 << HWCAP_S390_NR_ETF3EH)
+#define HWCAP_S390_HIGH_GPRS (1 << HWCAP_S390_NR_HIGH_GPRS)
+#define HWCAP_S390_TE (1 << HWCAP_S390_NR_TE)
+#define HWCAP_S390_VXRS (1 << HWCAP_S390_NR_VXRS)
+#define HWCAP_S390_VXRS_BCD (1 << HWCAP_S390_NR_VXRS_BCD)
+#define HWCAP_S390_VXRS_EXT (1 << HWCAP_S390_NR_VXRS_EXT)
+#define HWCAP_S390_GS (1 << HWCAP_S390_NR_GS)
+#define HWCAP_S390_VXRS_EXT2 (1 << HWCAP_S390_NR_VXRS_EXT2)
+#define HWCAP_S390_VXRS_PDE (1 << HWCAP_S390_NR_VXRS_PDE)
+#define HWCAP_S390_SORT (1 << HWCAP_S390_NR_SORT)
+#define HWCAP_S390_DFLT (1 << HWCAP_S390_NR_DFLT)
+#define HWCAP_S390_VXRS_PDE2 (1 << HWCAP_S390_NR_VXRS_PDE2)
+#define HWCAP_S390_NNPA (1 << HWCAP_S390_NR_NNPA)
+#define HWCAP_S390_PCI_MIO (1 << HWCAP_S390_NR_PCI_MIO)
+#define HWCAP_S390_SIE (1 << HWCAP_S390_NR_SIE)
/* M68K specific definitions. */
/* We use the top 24 bits to encode information about the
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index a26200d9f3..861ec07abc 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1621,25 +1621,28 @@ uint32_t get_elf_hwcap(void)
const char *elf_hwcap_str(uint32_t bit)
{
static const char *hwcap_str[] = {
- [HWCAP_S390_ESAN3] = "esan3",
- [HWCAP_S390_ZARCH] = "zarch",
- [HWCAP_S390_STFLE] = "stfle",
- [HWCAP_S390_MSA] = "msa",
- [HWCAP_S390_LDISP] = "ldisp",
- [HWCAP_S390_EIMM] = "eimm",
- [HWCAP_S390_DFP] = "dfp",
- [HWCAP_S390_HPAGE] = "edat",
- [HWCAP_S390_ETF3EH] = "etf3eh",
- [HWCAP_S390_HIGH_GPRS] = "highgprs",
- [HWCAP_S390_TE] = "te",
- [HWCAP_S390_VXRS] = "vx",
- [HWCAP_S390_VXRS_BCD] = "vxd",
- [HWCAP_S390_VXRS_EXT] = "vxe",
- [HWCAP_S390_GS] = "gs",
- [HWCAP_S390_VXRS_EXT2] = "vxe2",
- [HWCAP_S390_VXRS_PDE] = "vxp",
- [HWCAP_S390_SORT] = "sort",
- [HWCAP_S390_DFLT] = "dflt",
+ [HWCAP_S390_NR_ESAN3] = "esan3",
+ [HWCAP_S390_NR_ZARCH] = "zarch",
+ [HWCAP_S390_NR_STFLE] = "stfle",
+ [HWCAP_S390_NR_MSA] = "msa",
+ [HWCAP_S390_NR_LDISP] = "ldisp",
+ [HWCAP_S390_NR_EIMM] = "eimm",
+ [HWCAP_S390_NR_DFP] = "dfp",
+ [HWCAP_S390_NR_HPAGE] = "edat",
+ [HWCAP_S390_NR_ETF3EH] = "etf3eh",
+ [HWCAP_S390_NR_HIGH_GPRS] = "highgprs",
+ [HWCAP_S390_NR_TE] = "te",
+ [HWCAP_S390_NR_VXRS] = "vx",
+ [HWCAP_S390_NR_VXRS_BCD] = "vxd",
+ [HWCAP_S390_NR_VXRS_EXT] = "vxe",
+ [HWCAP_S390_NR_GS] = "gs",
+ [HWCAP_S390_NR_VXRS_EXT2] = "vxe2",
+ [HWCAP_S390_NR_VXRS_PDE] = "vxp",
+ [HWCAP_S390_NR_SORT] = "sort",
+ [HWCAP_S390_NR_DFLT] = "dflt",
+ [HWCAP_S390_NR_NNPA] = "nnpa",
+ [HWCAP_S390_NR_PCI_MIO] = "pcimio",
+ [HWCAP_S390_NR_SIE] = "sie",
};
return bit < ARRAY_SIZE(hwcap_str) ? hwcap_str[bit] : NULL;
--
2.39.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 3/8] tests/qtest: Fix typo in multifd cancel test
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
2023-07-18 9:30 ` [PULL 1/8] s390x: Fix QEMU abort by selecting S390_FLIC_KVM Thomas Huth
2023-07-18 9:30 ` [PULL 2/8] linux-user/elfload: Fix /proc/cpuinfo features: on s390x Thomas Huth
@ 2023-07-18 9:30 ` Thomas Huth
2023-07-18 9:30 ` [PULL 4/8] tests/lcitool: Generate distribution packages list in JSON format Thomas Huth
` (5 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson; +Cc: Fabiano Rosas, Daniel P . Berrangé
From: Fabiano Rosas <farosas@suse.de>
This wasn't noticed because the test is currently disabled.
Fixes: 02f56e3de ("tests/qtest: massively speed up migration-test")
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20230711212131.2370-1-farosas@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/migration-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index efa8c729db..e256da1216 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -2481,7 +2481,7 @@ static void test_multifd_tcp_cancel(void)
migrate_qmp(from, uri, "{}");
- migrate_wait_for_dirty_mem(from, to);
+ migrate_wait_for_dirty_mem(from, to2);
migrate_ensure_converge(from);
--
2.39.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 4/8] tests/lcitool: Generate distribution packages list in JSON format
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
` (2 preceding siblings ...)
2023-07-18 9:30 ` [PULL 3/8] tests/qtest: Fix typo in multifd cancel test Thomas Huth
@ 2023-07-18 9:30 ` Thomas Huth
2023-07-18 9:30 ` [PULL 5/8] tests/lcitool: Refresh generated files Thomas Huth
` (4 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
Cc: Philippe Mathieu-Daudé, Erik Skultety,
Daniel P . Berrangé, Warner Losh
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Add the generate_pkglist() helper to generate a list of packages
required by a distribution to build QEMU.
Since we can not add a "THIS FILE WAS AUTO-GENERATED" comment in
JSON, create the files under tests/vm/generated/ sub-directory;
add a README mentioning the files are generated.
Suggested-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20230711144922.67491-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/lcitool/refresh | 11 +++++++++++
tests/vm/generated/README | 5 +++++
2 files changed, 16 insertions(+)
create mode 100644 tests/vm/generated/README
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index b54566edcc..4584870ea1 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -84,6 +84,12 @@ def generate_cirrus(target, trailer=None):
generate(filename, cmd, trailer)
+def generate_pkglist(vm, target):
+ filename = Path(src_dir, "tests", "vm", "generated", vm + ".json")
+ cmd = lcitool_cmd + ["variables", "--format", "json", target, "qemu"]
+ generate(filename, cmd, None)
+
+
# Netmap still needs to be manually built as it is yet to be packaged
# into a distro. We also add cscope and gtags which are used in the CI
# test
@@ -191,6 +197,11 @@ try:
generate_cirrus("freebsd-13")
generate_cirrus("macos-12")
+ #
+ # VM packages lists
+ #
+ generate_pkglist("freebsd", "freebsd-13")
+
sys.exit(0)
except Exception as ex:
print(str(ex), file=sys.stderr)
diff --git a/tests/vm/generated/README b/tests/vm/generated/README
new file mode 100644
index 0000000000..7ccc6ffd3d
--- /dev/null
+++ b/tests/vm/generated/README
@@ -0,0 +1,5 @@
+# FILES IN THIS FOLDER WERE AUTO-GENERATED
+#
+# $ make lcitool-refresh
+#
+# https://gitlab.com/libvirt/libvirt-ci
--
2.39.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 5/8] tests/lcitool: Refresh generated files
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
` (3 preceding siblings ...)
2023-07-18 9:30 ` [PULL 4/8] tests/lcitool: Generate distribution packages list in JSON format Thomas Huth
@ 2023-07-18 9:30 ` Thomas Huth
2023-07-18 9:30 ` [PULL 6/8] tests/vm: Introduce get_qemu_packages_from_lcitool_json() helper Thomas Huth
` (3 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
Cc: Philippe Mathieu-Daudé, Daniel P . Berrangé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Refresh the generated files by running:
$ make lcitool-refresh
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230711144922.67491-3-philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[thuth: Drop changes to libpmem-dev and libxen-dev]
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/vm/generated/freebsd.json | 77 +++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 tests/vm/generated/freebsd.json
diff --git a/tests/vm/generated/freebsd.json b/tests/vm/generated/freebsd.json
new file mode 100644
index 0000000000..7c435cf23e
--- /dev/null
+++ b/tests/vm/generated/freebsd.json
@@ -0,0 +1,77 @@
+{
+ "ccache": "/usr/local/bin/ccache",
+ "cpan_pkgs": [],
+ "cross_pkgs": [],
+ "make": "/usr/local/bin/gmake",
+ "ninja": "/usr/local/bin/ninja",
+ "packaging_command": "pkg",
+ "pip3": "/usr/local/bin/pip-3.8",
+ "pkgs": [
+ "alsa-lib",
+ "bash",
+ "bison",
+ "bzip2",
+ "ca_root_nss",
+ "capstone4",
+ "ccache",
+ "cmocka",
+ "ctags",
+ "curl",
+ "cyrus-sasl",
+ "dbus",
+ "diffutils",
+ "dtc",
+ "flex",
+ "fusefs-libs3",
+ "gettext",
+ "git",
+ "glib",
+ "gmake",
+ "gnutls",
+ "gsed",
+ "gtk3",
+ "json-c",
+ "libepoxy",
+ "libffi",
+ "libgcrypt",
+ "libjpeg-turbo",
+ "libnfs",
+ "libslirp",
+ "libspice-server",
+ "libssh",
+ "libtasn1",
+ "llvm",
+ "lzo2",
+ "meson",
+ "mtools",
+ "ncurses",
+ "nettle",
+ "ninja",
+ "opencv",
+ "pixman",
+ "pkgconf",
+ "png",
+ "py39-numpy",
+ "py39-pillow",
+ "py39-pip",
+ "py39-sphinx",
+ "py39-sphinx_rtd_theme",
+ "py39-yaml",
+ "python3",
+ "rpm2cpio",
+ "sdl2",
+ "sdl2_image",
+ "snappy",
+ "sndio",
+ "socat",
+ "spice-protocol",
+ "tesseract",
+ "usbredir",
+ "virglrenderer",
+ "vte3",
+ "xorriso",
+ "zstd"
+ ],
+ "pypi_pkgs": [],
+ "python": "/usr/local/bin/python3"
+}
--
2.39.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 6/8] tests/vm: Introduce get_qemu_packages_from_lcitool_json() helper
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
` (4 preceding siblings ...)
2023-07-18 9:30 ` [PULL 5/8] tests/lcitool: Refresh generated files Thomas Huth
@ 2023-07-18 9:30 ` Thomas Huth
2023-07-18 9:30 ` [PULL 7/8] tests/vm/freebsd: Get up-to-date package list from lcitool vars file Thomas Huth
` (2 subsequent siblings)
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
Cc: Philippe Mathieu-Daudé, Daniel P . Berrangé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Add the get_qemu_packages_from_lcitool_json() helper which return
such package list from a lcitool env var file in JSON format.
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230711144922.67491-4-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/vm/basevm.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 23229e23d1..a97e23b0ce 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -27,6 +27,7 @@
import multiprocessing
import traceback
import shlex
+import json
from qemu.machine import QEMUMachine
from qemu.utils import get_info_usernet_hostfwd_port, kvm_available
@@ -501,6 +502,16 @@ def gen_cloud_init_iso(self):
stderr=self._stdout)
return os.path.join(cidir, "cloud-init.iso")
+ def get_qemu_packages_from_lcitool_json(self, json_path=None):
+ """Parse a lcitool variables json file and return the PKGS list."""
+ if json_path is None:
+ json_path = os.path.join(
+ os.path.dirname(__file__), "generated", self.name + ".json"
+ )
+ with open(json_path, "r") as fh:
+ return json.load(fh)["pkgs"]
+
+
def get_qemu_path(arch, build_path=None):
"""Fetch the path to the qemu binary."""
# If QEMU environment variable set, it takes precedence
--
2.39.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 7/8] tests/vm/freebsd: Get up-to-date package list from lcitool vars file
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
` (5 preceding siblings ...)
2023-07-18 9:30 ` [PULL 6/8] tests/vm: Introduce get_qemu_packages_from_lcitool_json() helper Thomas Huth
@ 2023-07-18 9:30 ` Thomas Huth
2023-07-18 9:30 ` [PULL 8/8] tests/avocado: Disable the test_sbsaref_edk2_firmware by default Thomas Huth
2023-07-19 12:40 ` [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Peter Maydell
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
Cc: Philippe Mathieu-Daudé, Daniel P . Berrangé
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Get an up-to-date package list from lcitool, that way we
don't need to manually keep this array in sync.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Inspired-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230711144922.67491-5-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/vm/freebsd | 42 ++----------------------------------------
1 file changed, 2 insertions(+), 40 deletions(-)
diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index 11de6473f4..ac51376c82 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -31,45 +31,6 @@ class FreeBSDVM(basevm.BaseVM):
link = "https://download.freebsd.org/releases/CI-IMAGES/13.2-RELEASE/amd64/Latest/FreeBSD-13.2-RELEASE-amd64-BASIC-CI.raw.xz"
csum = "a4fb3b6c7b75dd4d58fb0d75e4caf72844bffe0ca00e66459c028b198ffb3c0e"
size = "20G"
- pkgs = [
- # build tools
- "git",
- "pkgconf",
- "bzip2",
- "python39",
- "ninja",
-
- # gnu tools
- "bash",
- "gmake",
- "gsed",
- "gettext",
-
- # libs: crypto
- "gnutls",
-
- # libs: images
- "jpeg-turbo",
- "png",
-
- # libs: ui
- "sdl2",
- "gtk3",
- "libxkbcommon",
-
- # libs: opengl
- "libepoxy",
- "mesa-libs",
-
- # libs: migration
- "zstd",
-
- # libs: networking
- "libslirp",
-
- # libs: sndio
- "sndio",
- ]
BUILD_SCRIPT = """
set -e;
@@ -151,8 +112,9 @@ class FreeBSDVM(basevm.BaseVM):
self.console_wait(prompt)
self.console_send("echo 'chmod 666 /dev/vtbd1' >> /etc/rc.local\n")
+ pkgs = self.get_qemu_packages_from_lcitool_json()
self.print_step("Installing packages")
- self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs))
+ self.ssh_root_check("pkg install -y %s\n" % " ".join(pkgs))
# shutdown
self.ssh_root(self.poweroff)
--
2.39.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PULL 8/8] tests/avocado: Disable the test_sbsaref_edk2_firmware by default
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
` (6 preceding siblings ...)
2023-07-18 9:30 ` [PULL 7/8] tests/vm/freebsd: Get up-to-date package list from lcitool vars file Thomas Huth
@ 2023-07-18 9:30 ` Thomas Huth
2023-07-19 12:40 ` [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Peter Maydell
8 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2023-07-18 9:30 UTC (permalink / raw)
To: qemu-devel, Richard Henderson
The test fails occasionally, see e.g.:
https://gitlab.com/thuth/qemu/-/jobs/4196177756#L489
https://gitlab.com/thuth/qemu/-/jobs/4623296271#L290
It also fails on my laptop in ca. 50% of all runs. Thus disable it by
default by using the QEMU_TEST_FLAKY_TESTS environment variable to fence
it (which we also already use in flaky qtests). While we're at it, also
document this variable in docs/devel/testing.rst.
Message-Id: <20230710170155.7192-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
docs/devel/testing.rst | 5 +++++
tests/avocado/machine_aarch64_sbsaref.py | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index fb651eae11..b6ad21bed1 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -1384,6 +1384,11 @@ variable as shown on the code snippet below to skip the test:
def test(self):
do_something()
+QEMU_TEST_FLAKY_TESTS
+^^^^^^^^^^^^^^^^^^^^^
+Some tests are not working reliably and thus are disabled by default.
+Set this environment variable to enable them.
+
Uninstalling Avocado
~~~~~~~~~~~~~~~~~~~~
diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py
index cce6ef9f65..a794245e7e 100644
--- a/tests/avocado/machine_aarch64_sbsaref.py
+++ b/tests/avocado/machine_aarch64_sbsaref.py
@@ -8,7 +8,6 @@
import os
-from avocado import skip
from avocado import skipUnless
from avocado.utils import archive
@@ -76,6 +75,7 @@ def fetch_firmware(self):
"sbsa-ref",
)
+ @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is not reliable')
def test_sbsaref_edk2_firmware(self):
"""
:avocado: tags=cpu:cortex-a57
--
2.39.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
` (7 preceding siblings ...)
2023-07-18 9:30 ` [PULL 8/8] tests/avocado: Disable the test_sbsaref_edk2_firmware by default Thomas Huth
@ 2023-07-19 12:40 ` Peter Maydell
2023-07-19 15:05 ` Philippe Mathieu-Daudé
8 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2023-07-19 12:40 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, Richard Henderson
On Tue, 18 Jul 2023 at 10:31, Thomas Huth <thuth@redhat.com> wrote:
>
> The following changes since commit 361d5397355276e3007825cc17217c1e4d4320f7:
>
> Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-07-17 15:49:27 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/thuth/qemu.git tags/pull-request-2023-07-18
>
> for you to fetch changes up to a5754847e0fc2bc08a414dd381803009e8bca390:
>
> tests/avocado: Disable the test_sbsaref_edk2_firmware by default (2023-07-18 11:22:51 +0200)
>
> ----------------------------------------------------------------
> * Fix s390x KVM guests when compiling with --without-default-devices
> * Fix /proc/cpuinfo features list in s390x linux-user emulation
> * Generate FreeBSD VM package list via lcitool
> * Disable the flaky test_sbsaref_edk2_firmware avocado test by default
>
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1
2023-07-19 12:40 ` [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Peter Maydell
@ 2023-07-19 15:05 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-19 15:05 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, Thomas Huth, Richard Henderson
On 19/7/23 14:40, Peter Maydell wrote:
> On Tue, 18 Jul 2023 at 10:31, Thomas Huth <thuth@redhat.com> wrote:
>>
>> The following changes since commit 361d5397355276e3007825cc17217c1e4d4320f7:
>>
>> Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-07-17 15:49:27 +0100)
>>
>> are available in the Git repository at:
>>
>> https://gitlab.com/thuth/qemu.git tags/pull-request-2023-07-18
>>
>> for you to fetch changes up to a5754847e0fc2bc08a414dd381803009e8bca390:
>>
>> tests/avocado: Disable the test_sbsaref_edk2_firmware by default (2023-07-18 11:22:51 +0200)
>>
>> ----------------------------------------------------------------
>> * Fix s390x KVM guests when compiling with --without-default-devices
>> * Fix /proc/cpuinfo features list in s390x linux-user emulation
>> * Generate FreeBSD VM package list via lcitool
>> * Disable the flaky test_sbsaref_edk2_firmware avocado test by default
>>
>
>
>
> Applied to target-arm.next, thanks.
s/target-arm.next/master/ ;)
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-07-19 15:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 9:30 [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Thomas Huth
2023-07-18 9:30 ` [PULL 1/8] s390x: Fix QEMU abort by selecting S390_FLIC_KVM Thomas Huth
2023-07-18 9:30 ` [PULL 2/8] linux-user/elfload: Fix /proc/cpuinfo features: on s390x Thomas Huth
2023-07-18 9:30 ` [PULL 3/8] tests/qtest: Fix typo in multifd cancel test Thomas Huth
2023-07-18 9:30 ` [PULL 4/8] tests/lcitool: Generate distribution packages list in JSON format Thomas Huth
2023-07-18 9:30 ` [PULL 5/8] tests/lcitool: Refresh generated files Thomas Huth
2023-07-18 9:30 ` [PULL 6/8] tests/vm: Introduce get_qemu_packages_from_lcitool_json() helper Thomas Huth
2023-07-18 9:30 ` [PULL 7/8] tests/vm/freebsd: Get up-to-date package list from lcitool vars file Thomas Huth
2023-07-18 9:30 ` [PULL 8/8] tests/avocado: Disable the test_sbsaref_edk2_firmware by default Thomas Huth
2023-07-19 12:40 ` [PULL 0/8] s390x, qtest and misc patches for QEMU 8.1 rc1 Peter Maydell
2023-07-19 15:05 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).