Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH kvm-unit-tests 0/6] Test runner TLC
@ 2026-11-26 10:29 Paolo Bonzini
  2026-11-26 10:29 ` [PATCH kvm-unit-tests 1/6] arm: remove usage of the errata mechanism Paolo Bonzini
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-26 10:29 UTC (permalink / raw)
  To: kvm; +Cc: thuth, andrew.jones

Some cleanups of the test runner, dropping some fat and preparing
for future reorganization of its functionality.  In particular I
would like to introduce a better waiver mechanism that does not
require changes to the tests.

Patches 1-2 remove the errata mechanism, as it has seen little use
and kernel version checks *in the test* are not a good way to decide
whether a test result should be waived.  While the original purpose
was to block tests that are unsafe and could cause the host to hang,
unsafe tests arguably shouldn't exist at all...

Patches 3-5 cut some of the environment functionality, specifically
not passing anymore host information to the test as they were not
read by any test.

Patch 6 finally makes unittests.cfg parsable by standard .ini syntax
parsers, such as Python's configparser.

Paolo

Paolo Bonzini (6):
  arm: remove usage of the errata mechanism
  remove errata mechanism
  omit "#" from printed command line if INITRD is empty
  do not pass information about kernel, QEMU or target via environment
  drop --enable/--disable-default-environ
  switch unittests.cfg parsing to be ConfigParser-compatible

 README.md               |  44 +------
 arm/debug.c             |   1 -
 arm/gic.c               |  10 --
 arm/pmu.c               |   8 +-
 arm/psci.c              |   9 +-
 arm/timer.c             |   5 +-
 configure               |  26 ----
 errata.txt              |   9 --
 lib/errata.h            |  58 ---------
 run_tests.sh            |   4 +-
 s390x/unittests.cfg     | 257 ++++++++++++++++++++--------------------
 scripts/arch-run.bash   | 131 +-------------------
 scripts/common.bash     |  85 ++++++++-----
 scripts/mkstandalone.sh |  11 --
 14 files changed, 198 insertions(+), 460 deletions(-)
 delete mode 100644 errata.txt
 delete mode 100644 lib/errata.h

-- 
2.56.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH kvm-unit-tests 1/6] arm: remove usage of the errata mechanism
  2026-11-26 10:29 [PATCH kvm-unit-tests 0/6] Test runner TLC Paolo Bonzini
@ 2026-11-26 10:29 ` Paolo Bonzini
  2026-11-26 10:29 ` [PATCH kvm-unit-tests 2/6] remove " Paolo Bonzini
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-26 10:29 UTC (permalink / raw)
  To: kvm; +Cc: thuth, andrew.jones

The errata mechanism has never seen widespread use, and the few instances
of it date back to 2019.  Drop it from the tests.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arm/debug.c |  1 -
 arm/gic.c   | 10 ----------
 arm/pmu.c   |  8 ++------
 arm/psci.c  |  9 ++-------
 arm/timer.c |  5 +----
 5 files changed, 5 insertions(+), 28 deletions(-)

diff --git a/arm/debug.c b/arm/debug.c
index 0299fd28..8cd04604 100644
--- a/arm/debug.c
+++ b/arm/debug.c
@@ -1,6 +1,5 @@
 #include <libcflat.h>
 #include <migrate.h>
-#include <errata.h>
 #include <asm/setup.h>
 #include <asm/processor.h>
 #include <asm/delay.h>
diff --git a/arm/gic.c b/arm/gic.c
index 256dd80d..e76de2b7 100644
--- a/arm/gic.c
+++ b/arm/gic.c
@@ -13,7 +13,6 @@
  */
 #include <libcflat.h>
 #include <migrate.h>
-#include <errata.h>
 #include <asm/setup.h>
 #include <asm/processor.h>
 #include <asm/delay.h>
@@ -811,8 +810,6 @@ static void test_its_migration(void)
 	check_spurious();
 }
 
-#define ERRATA_UNMAPPED_COLLECTIONS "ERRATA_8c58be34494b"
-
 static void test_migrate_unmapped_collection(void)
 {
 	struct its_collection *col = NULL;
@@ -826,13 +823,6 @@ static void test_migrate_unmapped_collection(void)
 		return;
 	}
 
-	if (!errata(ERRATA_UNMAPPED_COLLECTIONS)) {
-		report_skip("Skipping test, as this test hangs without the fix. "
-			    "Set %s=y to enable.", ERRATA_UNMAPPED_COLLECTIONS);
-		migrate_skip();
-		return;
-	}
-
 	col = its_create_collection(pe0, pe0);
 	dev2 = its_get_device(2);
 	dev7 = its_get_device(7);
diff --git a/arm/pmu.c b/arm/pmu.c
index 2fcec71a..59ace986 100644
--- a/arm/pmu.c
+++ b/arm/pmu.c
@@ -14,7 +14,6 @@
  * for more details.
  */
 #include "libcflat.h"
-#include "errata.h"
 #include "asm/barrier.h"
 #include "asm/sysreg.h"
 #include "asm/processor.h"
@@ -1171,11 +1170,8 @@ static void pmccntr64_test(void)
 {
 #ifdef __arm__
 	if (pmu.version == ID_DFR0_PMU_V3) {
-		if (ERRATA(9e3f7a296940)) {
-			write_sysreg(0xdead, PMCCNTR64);
-			report(read_sysreg(PMCCNTR64) == 0xdead, "pmccntr64");
-		} else
-			report_skip("Skipping unsafe pmccntr64 test. Set ERRATA_9e3f7a296940=y to enable.");
+		write_sysreg(0xdead, PMCCNTR64);
+		report(read_sysreg(PMCCNTR64) == 0xdead, "pmccntr64");
 	}
 #endif
 }
diff --git a/arm/psci.c b/arm/psci.c
index 5800c0ac..33dce081 100644
--- a/arm/psci.c
+++ b/arm/psci.c
@@ -7,7 +7,6 @@
  *
  * This work is licensed under the terms of the GNU LGPL, version 2.
  */
-#include <errata.h>
 #include <libcflat.h>
 
 #include <asm/delay.h>
@@ -250,14 +249,10 @@ int main(void)
 	report(psci_affinity_info_on(), "affinity-info-on");
 	report(psci_affinity_info_off(), "affinity-info-off");
 
-	if (ERRATA(6c7a5dce22b3))
-		report(psci_cpu_on_test(), "cpu-on");
-	else
-		report_skip("Skipping unsafe cpu-on test. Set ERRATA_6c7a5dce22b3=y to enable.");
-
+	report(psci_cpu_on_test(), "cpu-on");
 	assert(!cpu_idle(0));
 
-	if (!ERRATA(6c7a5dce22b3) || cpumask_weight(&cpu_idle_mask) == nr_cpus - 1)
+	if (cpumask_weight(&cpu_idle_mask) == nr_cpus - 1)
 		report(psci_cpu_off_test(), "cpu-off");
 	else
 		report_skip("Skipping cpu-off test because the cpu-on test failed");
diff --git a/arm/timer.c b/arm/timer.c
index 898043f0..2d419859 100644
--- a/arm/timer.c
+++ b/arm/timer.c
@@ -7,7 +7,6 @@
  */
 #include <libcflat.h>
 #include <devicetree.h>
-#include <errata.h>
 #include <asm/timer.h>
 #include <asm/delay.h>
 #include <asm/processor.h>
@@ -360,9 +359,7 @@ static void test_init(void)
 	ptimer_info.read_ctl();
 	install_exception_handler(EL1H_SYNC, ESR_ELx_EC_UNKNOWN, NULL);
 
-	if (ptimer_unsupported && !ERRATA(7b6b46311a85)) {
-		report_skip("Skipping ptimer tests. Set ERRATA_7b6b46311a85=y to enable.");
-	} else if (ptimer_unsupported) {
+	if (ptimer_unsupported) {
 		report_fail("ptimer: read CNTP_CTL_EL0");
 		report_info("ptimer: skipping remaining tests");
 	}
-- 
2.56.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH kvm-unit-tests 2/6] remove errata mechanism
  2026-11-26 10:29 [PATCH kvm-unit-tests 0/6] Test runner TLC Paolo Bonzini
  2026-11-26 10:29 ` [PATCH kvm-unit-tests 1/6] arm: remove usage of the errata mechanism Paolo Bonzini
@ 2026-11-26 10:29 ` Paolo Bonzini
  2026-11-26 10:29 ` [PATCH kvm-unit-tests 3/6] omit "#" from printed command line if INITRD is empty Paolo Bonzini
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-26 10:29 UTC (permalink / raw)
  To: kvm; +Cc: thuth, andrew.jones

The mechanism has no users anymore, and kernel version checks are
not a good way to implement test waivers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 README.md               | 32 ++----------------
 configure               | 15 ---------
 errata.txt              |  9 -----
 lib/errata.h            | 58 -------------------------------
 run_tests.sh            |  4 +--
 scripts/arch-run.bash   | 75 -----------------------------------------
 scripts/mkstandalone.sh | 10 ------
 7 files changed, 4 insertions(+), 199 deletions(-)
 delete mode 100644 errata.txt
 delete mode 100644 lib/errata.h

diff --git a/README.md b/README.md
index cbd8a994..7e377680 100644
--- a/README.md
+++ b/README.md
@@ -137,11 +137,9 @@ Additionally these self-explanatory variables are reserved
 # Guarding unsafe tests
 
 Some tests are not safe to run by default, as they may crash the
-host. kvm-unit-tests provides two ways to handle tests like those.
-
- 1) Adding 'nodefault' to the groups field for the unit test in the
-    unittests.cfg file.  When a unit test is in the nodefault group
-    it is only run when invoked
+host. To avoid this, you can add 'nodefault' to the groups field for
+the unit test in the unittests.cfg file.  When a unit test is in the
+nodefault group it is only run when invoked
 
      a) independently, `ARCH-run ARCH/test`
 
@@ -150,30 +148,6 @@ host. kvm-unit-tests provides two ways to handle tests like those.
 
      c) by specifying all tests should be run, `./run_tests.sh -a`
 
- 2) Making the test conditional on errata in the code,
-    ```
-    if (ERRATA(abcdef012345)) {
-        do_unsafe_test();
-    }
-    ```
-
-    With the errata condition the unsafe unit test is only run
-    when
-
-    a) the ERRATA_abcdef012345 environment variable is provided and 'y'
-
-    b) the ERRATA_FORCE environment variable is provided and 'y'
-
-    c) by specifying all tests should be run, `./run_tests.sh -a`
-       (The -a switch ensures the ERRATA_FORCE is provided and set
-        to 'y'.)
-
-The ./errata.txt file provides a mapping of the commits needed by errata
-conditionals to their respective minimum kernel versions.  By default,
-when the user does not provide an environ, then an environ generated
-from the ./errata.txt file and the host's kernel version is provided to
-all unit tests.
-
 # Contributing
 
 ## Directory structure
diff --git a/configure b/configure
index 974ef4b4..7c9ebd49 100755
--- a/configure
+++ b/configure
@@ -57,8 +57,6 @@ environ_default=yes
 u32_long=
 wa_divide=
 target=
-errata_force=0
-erratatxt="$srcdir/errata.txt"
 host_key_document=
 gen_se_header=
 enable_dump=no
@@ -102,8 +100,6 @@ usage() {
 	    --[enable|disable]-default-environ
 	                           enable or disable the generation of a default environ when
 	                           no environ is provided by the user (enabled by default)
-	    --erratatxt=FILE       specify a file to use instead of errata.txt. Use
-	                           '--erratatxt=' to ensure no file is used.
 	    --host-key-document=HOST_KEY_DOCUMENT
 	                           Specify the machine-specific host-key document for creating
 	                           a PVM image with 'genprotimg' (s390x only)
@@ -199,10 +195,6 @@ while [[ $optno -le $argc ]]; do
 	--disable-default-environ)
 	    environ_default=no
 	    ;;
-	--erratatxt)
-	    erratatxt=
-	    [ "$arg" ] && erratatxt=$(eval realpath "$arg")
-	    ;;
 	--host-key-document)
 	    host_key_document="$arg"
 	    ;;
@@ -266,11 +258,6 @@ if [ -n "$host_key_document" ] && [ ! -f "$host_key_document" ]; then
     exit 1
 fi
 
-if [ "$erratatxt" ] && [ ! -f "$erratatxt" ]; then
-    echo "erratatxt: $erratatxt does not exist or is not a regular file"
-    exit 1
-fi
-
 arch_name=$arch
 [ "$arch" = "aarch64" ] && arch="arm64"
 [ "$arch" = "powerpc" ] && arch="ppc64"
@@ -518,7 +505,6 @@ FIRMWARE=$firmware
 ENDIAN=$endian
 PRETTY_PRINT_STACKS=$pretty_print_stacks
 ENVIRON_DEFAULT=$environ_default
-ERRATATXT=$erratatxt
 U32_LONG_FMT=$u32_long
 WA_DIVIDE=$wa_divide
 GENPROTIMG=${GENPROTIMG-genprotimg}
@@ -547,7 +533,6 @@ if [ "$arch" = "arm" ] || [ "$arch" = "arm64" ]; then
 cat <<EOF >> lib/config.h
 
 #define CONFIG_UART_EARLY_BASE ${uart_early_addr}
-#define CONFIG_ERRATA_FORCE ${errata_force}
 
 EOF
 fi
diff --git a/errata.txt b/errata.txt
deleted file mode 100644
index b66afaa9..00000000
--- a/errata.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-#---------------:-------------------------------:---------------------------------------------------
-# commit        : minimum kernel                : summary
-# 12 hex digits : version                       :
-#---------------:-------------------------------:---------------------------------------------------
-9e3f7a296940    : 4.9                           : arm64: KVM: pmu: Fix AArch32 cycle counter access
-7b6b46311a85    : 4.11                          : KVM: arm/arm64: Emulate the EL1 phys timer registers
-6c7a5dce22b3    : 4.12                          : KVM: arm/arm64: fix races in kvm_psci_vcpu_on
-8c58be34494b    : 5.6                           : KVM: arm/arm64: vgic-its: Fix restoration of unmapped collections
-#---------------:-------------------------------:---------------------------------------------------
diff --git a/lib/errata.h b/lib/errata.h
deleted file mode 100644
index de8205d8..00000000
--- a/lib/errata.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * errata functions
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License version 2.
- */
-#ifndef _ERRATA_H_
-#define _ERRATA_H_
-#include <libcflat.h>
-
-#include "config.h"
-
-#ifndef CONFIG_ERRATA_FORCE
-#define CONFIG_ERRATA_FORCE 0
-#endif
-
-#define _ERRATA(erratum) errata("ERRATA_" # erratum)
-#define ERRATA(erratum) _ERRATA(erratum)
-
-#define _ERRATA_RELAXED(erratum) errata_relaxed("ERRATA_" # erratum)
-#define ERRATA_RELAXED(erratum) _ERRATA_RELAXED(erratum)
-
-static inline bool errata_force(void)
-{
-	char *s;
-
-	if (CONFIG_ERRATA_FORCE == 1)
-		return true;
-
-	s = getenv("ERRATA_FORCE");
-	return s && (*s == '1' || *s == 'y' || *s == 'Y');
-}
-
-static inline bool errata(const char *erratum)
-{
-	char *s;
-
-	if (errata_force())
-		return true;
-
-	s = getenv(erratum);
-
-	return s && (*s == '1' || *s == 'y' || *s == 'Y');
-}
-
-static inline bool errata_relaxed(const char *erratum)
-{
-	char *s;
-
-	if (errata_force())
-		return true;
-
-	s = getenv(erratum);
-
-	return !(s && (*s == '0' || *s == 'n' || *s == 'N'));
-}
-
-#endif
diff --git a/run_tests.sh b/run_tests.sh
index 4cfc3cd9..87d89751 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -20,8 +20,7 @@ Usage: $0 [-h] [-v] [-a] [-g group] [-j NUM-TASKS] [-t] [-l]
 
     -h, --help          Output this help text
     -v, --verbose       Enables verbose mode
-    -a, --all           Run all tests, including those flagged as 'nodefault'
-                        and those guarded by errata.
+    -a, --all           Run all tests, including those flagged as 'nodefault'.
     -g, --group         Only execute tests in the given group
     -j, --parallel      Execute tests in parallel
     -t, --tap13         Output test results in TAP format
@@ -63,7 +62,6 @@ while [ $# -gt 0 ]; do
     case "$1" in
         -a | --all)
             run_all_tests="yes"
-            export ERRATA_FORCE=y
             ;;
         -g | --group)
             shift
diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 41a903e4..2b3154ce 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -399,7 +399,6 @@ initrd_create ()
 		KVM_UNIT_TESTS_ENV=$(mktemp)
 		env_params
 		env_file
-		env_errata || return $?
 	fi
 
 	unset INITRD
@@ -470,80 +469,6 @@ env_file ()
 	done
 }
 
-env_errata ()
-{
-	local new_env
-
-	if [ "$ACCEL" = "tcg" ]; then
-		export "ERRATA_FORCE=y"
-	elif [ "$ERRATATXT" ] && [ ! -f "$ERRATATXT" ]; then
-		echo "$ERRATATXT not found. (ERRATATXT=$ERRATATXT)" >&2
-		return 2
-	elif [ "$ERRATATXT" ]; then
-		env_generate_errata
-	fi
-	new_env=$(sort <(env | grep '^ERRATA_') <(grep '^ERRATA_' $KVM_UNIT_TESTS_ENV) | uniq -u)
-	echo "$new_env" >>$KVM_UNIT_TESTS_ENV
-}
-
-env_generate_errata ()
-{
-	local line commit minver errata rest v p s x have
-
-	for line in $(grep -v '^#' "$ERRATATXT" | tr -d '[:blank:]' | cut -d: -f1,2); do
-		commit=${line%:*}
-		minver=${line#*:}
-
-		test -z "$commit" && continue
-		errata="ERRATA_$commit"
-		[ -n "${!errata}" ] && continue
-
-		IFS=. read -r v p rest <<<"$minver"
-		IFS=- read -r s x <<<"$rest"
-		s=${s%%[!0-9]*}
-		x=${x%%[!0-9]*}
-
-		if ! [[ $v =~ ^[0-9]+$ ]] || ! [[ $p =~ ^[0-9]+$ ]]; then
-			echo "Bad minimum kernel version in $ERRATATXT, $minver"
-			return 2
-		fi
-		! [[ $s =~ ^[0-9]+$ ]] && unset $s
-		! [[ $x =~ ^[0-9]+$ ]] && unset $x
-
-		if (( $KERNEL_VERSION > $v ||
-		      ($KERNEL_VERSION == $v && $KERNEL_PATCHLEVEL > $p) )); then
-			have=y
-		elif (( $KERNEL_VERSION == $v && $KERNEL_PATCHLEVEL == $p )); then
-			if [ "$KERNEL_SUBLEVEL" ] && [ "$s" ]; then
-				if (( $KERNEL_SUBLEVEL > $s )); then
-					have=y
-				elif (( $KERNEL_SUBLEVEL == $s )); then
-					if [ "$KERNEL_EXTRAVERSION" ] && [ "$x" ]; then
-						if (( $KERNEL_EXTRAVERSION >= $x )); then
-							have=y
-						else
-							have=n
-						fi
-					elif [ "$x" ] && (( $x != 0 )); then
-						have=n
-					else
-						have=y
-					fi
-				else
-					have=n
-				fi
-			elif [ "$s" ] && (( $s != 0 )); then
-				have=n
-			else
-				have=y
-			fi
-		else
-			have=n
-		fi
-		eval export "$errata=$have"
-	done
-}
-
 trap_exit_push ()
 {
 	local old_exit
diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
index 6f46a4c3..90507cc3 100755
--- a/scripts/mkstandalone.sh
+++ b/scripts/mkstandalone.sh
@@ -67,11 +67,6 @@ generate_test ()
 		echo 'export FIRMWARE'
 	fi
 
-	if [ "$ENVIRON_DEFAULT" = "yes" ] && [ "$ERRATATXT" ]; then
-		temp_file ERRATATXT "$ERRATATXT"
-		echo 'export ERRATATXT'
-	fi
-
 	temp_file bin "$kernel"
 	# Don't want to expand $bin but print it as-is.
 	# shellcheck disable=SC2016
@@ -107,11 +102,6 @@ function mkstandalone()
 	echo Written $standalone.
 }
 
-if [ "$ENVIRON_DEFAULT" = "yes" ] && [ "$ERRATATXT" ] && [ ! -f "$ERRATATXT" ]; then
-	echo "$ERRATATXT not found. (ERRATATXT=$ERRATATXT)" >&2
-	exit 2
-fi
-
 trap 'rm -f $cfg' EXIT
 cfg=$(mktemp)
 
-- 
2.56.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH kvm-unit-tests 3/6] omit "#" from printed command line if INITRD is empty
  2026-11-26 10:29 [PATCH kvm-unit-tests 0/6] Test runner TLC Paolo Bonzini
  2026-11-26 10:29 ` [PATCH kvm-unit-tests 1/6] arm: remove usage of the errata mechanism Paolo Bonzini
  2026-11-26 10:29 ` [PATCH kvm-unit-tests 2/6] remove " Paolo Bonzini
@ 2026-11-26 10:29 ` Paolo Bonzini
  2026-11-26 10:30 ` [PATCH kvm-unit-tests 4/6] do not pass information about kernel, QEMU or target via environment Paolo Bonzini
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-26 10:29 UTC (permalink / raw)
  To: kvm; +Cc: thuth, andrew.jones

If INITRD were empty, run_test would still print a "#" at the end of
the line.  Simplify the code and make the result nicer, by making "#"
conditional on $INITRD rather than $ENVIRON_DEFAULT.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/arch-run.bash | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 2b3154ce..f585de7b 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -3,9 +3,7 @@ run_test ()
 	local stdout errors ret
 
 	initrd_create || return $?
-	echo -n "$@"
-	[ "$ENVIRON_DEFAULT" = "yes" ] && echo -n " #"
-	echo " $INITRD"
+	echo "$*${INITRD:+ # $INITRD}"
 
 	# stdout to {stdout}, stderr to $errors and stderr
 	exec {stdout}>&1
-- 
2.56.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH kvm-unit-tests 4/6] do not pass information about kernel, QEMU or target via environment
  2026-11-26 10:29 [PATCH kvm-unit-tests 0/6] Test runner TLC Paolo Bonzini
                   ` (2 preceding siblings ...)
  2026-11-26 10:29 ` [PATCH kvm-unit-tests 3/6] omit "#" from printed command line if INITRD is empty Paolo Bonzini
@ 2026-11-26 10:30 ` Paolo Bonzini
  2026-11-26 10:30 ` [PATCH kvm-unit-tests 5/6] drop --enable/--disable-default-environ Paolo Bonzini
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-26 10:30 UTC (permalink / raw)
  To: kvm; +Cc: thuth, andrew.jones

No test is using these environment variables, and for good reasons since
filtering of bad test results is not something that individual tests
should care about.  Rip out the code and documentation.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 README.md             | 12 +----------
 scripts/arch-run.bash | 50 +------------------------------------------
 2 files changed, 2 insertions(+), 60 deletions(-)

diff --git a/README.md b/README.md
index 7e377680..ae763b5d 100644
--- a/README.md
+++ b/README.md
@@ -122,17 +122,7 @@ Additionally a file of the form
 
 may be passed with '-initrd file' to become the unit test's environ,
 which can then be accessed in the usual ways, e.g. VAL = getenv("KEY").
-Any key=val strings can be passed, but some have reserved meanings in
-the framework.  The list of reserved environment variables is below
-
-    QEMU_ACCEL                   either kvm, hvf or tcg
-    QEMU_VERSION_STRING          string of the form `qemu -h | head -1`
-    KERNEL_VERSION_STRING        string of the form `uname -r`
-
-Additionally these self-explanatory variables are reserved
-
-    QEMU_MAJOR, QEMU_MINOR, QEMU_MICRO, KERNEL_VERSION, KERNEL_PATCHLEVEL,
-    KERNEL_SUBLEVEL, KERNEL_EXTRAVERSION
+Any key=val strings can be passed.
 
 # Guarding unsafe tests
 
diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index f585de7b..4e48585f 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -395,63 +395,15 @@ initrd_create ()
 		[ -f "$KVM_UNIT_TESTS_ENV" ] && export KVM_UNIT_TESTS_ENV_OLD="$KVM_UNIT_TESTS_ENV"
 		export KVM_UNIT_TESTS_ENV
 		KVM_UNIT_TESTS_ENV=$(mktemp)
-		env_params
 		env_file
 	fi
 
 	unset INITRD
-	[ -f "$KVM_UNIT_TESTS_ENV" ] && INITRD="$(vmm_optname_initrd) $KVM_UNIT_TESTS_ENV"
+	[ -s "$KVM_UNIT_TESTS_ENV" ] && INITRD="$(vmm_optname_initrd) $KVM_UNIT_TESTS_ENV"
 
 	return 0
 }
 
-env_add_params ()
-{
-	local p
-
-	for p in "$@"; do
-		if eval test -v $p; then
-			eval export "$p"
-		else
-			eval export "$p="
-		fi
-		grep "^$p=" <(env) >>$KVM_UNIT_TESTS_ENV
-	done
-}
-
-env_params ()
-{
-	local qemu have_qemu
-	local _ rest
-
-	env_add_params TARGET
-
-	# kvmtool's versioning has been broken since it was split from the
-	# kernel source.
-	if [ "$(vmm_get_target)" = "qemu" ]; then
-		qemu=$(search_qemu_binary) && have_qemu=1
-		if [ "$have_qemu" ]; then
-			if [ -n "$ACCEL" ] || [ -n "$QEMU_ACCEL" ]; then
-				[ -n "$ACCEL" ] && QEMU_ACCEL=$ACCEL
-			fi
-			QEMU_VERSION_STRING="$($qemu -h | head -1)"
-			# Shellcheck does not see QEMU_MAJOR|MINOR|MICRO are used
-			# shellcheck disable=SC2034
-			IFS='[ .]' read -r _ _ _ QEMU_MAJOR QEMU_MINOR QEMU_MICRO rest <<<"$QEMU_VERSION_STRING"
-		fi
-		env_add_params QEMU_ACCEL QEMU_VERSION_STRING QEMU_MAJOR QEMU_MINOR QEMU_MICRO
-	fi
-
-	KERNEL_VERSION_STRING=$(uname -r)
-	IFS=. read -r KERNEL_VERSION KERNEL_PATCHLEVEL rest <<<"$KERNEL_VERSION_STRING"
-	IFS=- read -r KERNEL_SUBLEVEL KERNEL_EXTRAVERSION <<<"$rest"
-	KERNEL_SUBLEVEL=${KERNEL_SUBLEVEL%%[!0-9]*}
-	KERNEL_EXTRAVERSION=${KERNEL_EXTRAVERSION%%[!0-9]*}
-	! [[ $KERNEL_SUBLEVEL =~ ^[0-9]+$ ]] && unset $KERNEL_SUBLEVEL
-	! [[ $KERNEL_EXTRAVERSION =~ ^[0-9]+$ ]] && unset $KERNEL_EXTRAVERSION
-	env_add_params KERNEL_VERSION_STRING KERNEL_VERSION KERNEL_PATCHLEVEL KERNEL_SUBLEVEL KERNEL_EXTRAVERSION
-}
-
 env_file ()
 {
 	local line var
-- 
2.56.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH kvm-unit-tests 5/6] drop --enable/--disable-default-environ
  2026-11-26 10:29 [PATCH kvm-unit-tests 0/6] Test runner TLC Paolo Bonzini
                   ` (3 preceding siblings ...)
  2026-11-26 10:30 ` [PATCH kvm-unit-tests 4/6] do not pass information about kernel, QEMU or target via environment Paolo Bonzini
@ 2026-11-26 10:30 ` Paolo Bonzini
  2026-11-26 16:02   ` Andrew Jones
  2026-11-26 10:30 ` [PATCH kvm-unit-tests 6/6] switch unittests.cfg parsing to be ConfigParser-compatible Paolo Bonzini
  2026-11-26 16:03 ` [PATCH kvm-unit-tests 0/6] Test runner TLC Andrew Jones
  6 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-26 10:30 UTC (permalink / raw)
  To: kvm; +Cc: thuth, andrew.jones

I would be very surprised if anyone is using this option, which was
probably meant to be used together with the errata system.  Keep
the variable as it is used internally to prevent generation of an
initrd, but drop it from ./configure.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure               | 11 -----------
 scripts/arch-run.bash   |  2 ++
 scripts/mkstandalone.sh |  1 -
 3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index 7c9ebd49..9b325b54 100755
--- a/configure
+++ b/configure
@@ -53,7 +53,6 @@ host=$arch
 cross_prefix=
 endian=""
 pretty_print_stacks=yes
-environ_default=yes
 u32_long=
 wa_divide=
 target=
@@ -97,9 +96,6 @@ usage() {
 	    --endian=ENDIAN        endianness to compile for (little or big, ppc64 only)
 	    --[enable|disable]-pretty-print-stacks
 	                           enable or disable pretty stack printing (enabled by default)
-	    --[enable|disable]-default-environ
-	                           enable or disable the generation of a default environ when
-	                           no environ is provided by the user (enabled by default)
 	    --host-key-document=HOST_KEY_DOCUMENT
 	                           Specify the machine-specific host-key document for creating
 	                           a PVM image with 'genprotimg' (s390x only)
@@ -189,12 +185,6 @@ while [[ $optno -le $argc ]]; do
 	--disable-pretty-print-stacks)
 	    pretty_print_stacks=no
 	    ;;
-	--enable-default-environ)
-	    environ_default=yes
-	    ;;
-	--disable-default-environ)
-	    environ_default=no
-	    ;;
 	--host-key-document)
 	    host_key_document="$arg"
 	    ;;
@@ -504,7 +494,6 @@ TEST_SUBDIR=$testsubdir
 FIRMWARE=$firmware
 ENDIAN=$endian
 PRETTY_PRINT_STACKS=$pretty_print_stacks
-ENVIRON_DEFAULT=$environ_default
 U32_LONG_FMT=$u32_long
 WA_DIVIDE=$wa_divide
 GENPROTIMG=${GENPROTIMG-genprotimg}
diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 4e48585f..542da600 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -1,3 +1,5 @@
+ENVIRON_DEFAULT=yes
+
 run_test ()
 {
 	local stdout errors ret
diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
index 90507cc3..123be6ea 100755
--- a/scripts/mkstandalone.sh
+++ b/scripts/mkstandalone.sh
@@ -42,7 +42,6 @@ generate_test ()
 
 	echo "#!/usr/bin/env bash"
 	echo "export KUT_STANDALONE=yes"
-	echo "export ENVIRON_DEFAULT=$ENVIRON_DEFAULT"
 	echo "export HOST=\$(uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/')"
 	echo "export PRETTY_PRINT_STACKS=no"
 
-- 
2.56.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH kvm-unit-tests 6/6] switch unittests.cfg parsing to be ConfigParser-compatible
  2026-11-26 10:29 [PATCH kvm-unit-tests 0/6] Test runner TLC Paolo Bonzini
                   ` (4 preceding siblings ...)
  2026-11-26 10:30 ` [PATCH kvm-unit-tests 5/6] drop --enable/--disable-default-environ Paolo Bonzini
@ 2026-11-26 10:30 ` Paolo Bonzini
  2026-11-26 16:03 ` [PATCH kvm-unit-tests 0/6] Test runner TLC Andrew Jones
  6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-11-26 10:30 UTC (permalink / raw)
  To: kvm; +Cc: thuth, andrew.jones

Replace the """...""" syntax for multiline strings with
continuation by indentation; this is similar to other .ini-style
parsers like the Python ConfigParser.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 s390x/unittests.cfg | 257 ++++++++++++++++++++++----------------------
 scripts/common.bash |  85 ++++++++++-----
 2 files changed, 184 insertions(+), 158 deletions(-)

diff --git a/s390x/unittests.cfg b/s390x/unittests.cfg
index 64bc998d..228bdbee 100644
--- a/s390x/unittests.cfg
+++ b/s390x/unittests.cfg
@@ -253,135 +253,134 @@ qemu_params = -cpu max,ctop=on -smp sockets=31,cores=8,maxcpus=248
 [topology-3]
 file = topology.elf
 test_args = '-drawers 2 -books 2 -sockets 2 -cores 16'
-qemu_params = """-cpu max,ctop=on -smp cpus=1,drawers=2,books=2,sockets=2,cores=16,maxcpus=128 \
--device max-s390x-cpu,core-id=31,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=11,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=95,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=73,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=78,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=13,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=40,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=101,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=29,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=56,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=92,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=30,drawer-id=0,book-id=0,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=118,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=71,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=93,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=16,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=5,drawer-id=0,book-id=0,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=42,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=98,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=44,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=23,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=65,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=102,drawer-id=0,book-id=0,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=57,drawer-id=0,book-id=0,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=125,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=127,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=82,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=14,drawer-id=0,book-id=0,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=91,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=12,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=8,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=112,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=109,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=19,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=96,drawer-id=0,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=67,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=80,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=108,drawer-id=0,book-id=1,socket-id=0,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=34,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=18,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=39,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=53,drawer-id=0,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=46,drawer-id=0,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=3,drawer-id=0,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=76,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=15,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=7,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=81,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=1,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=113,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=38,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=90,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=117,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=62,drawer-id=0,book-id=1,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=85,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=49,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=24,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=107,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=103,drawer-id=0,book-id=1,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=33,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=51,drawer-id=0,book-id=1,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=21,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=72,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=63,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=105,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=74,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=50,drawer-id=1,book-id=0,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=60,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=22,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=43,drawer-id=1,book-id=0,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=48,drawer-id=1,book-id=0,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=35,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=58,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=106,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=123,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=122,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=9,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=10,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=25,drawer-id=1,book-id=0,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=116,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=26,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=17,drawer-id=1,book-id=0,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=20,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=59,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=54,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=70,drawer-id=1,book-id=0,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=88,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=6,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=52,drawer-id=1,book-id=0,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=55,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=124,drawer-id=1,book-id=0,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=61,drawer-id=1,book-id=0,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=84,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=68,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=86,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=4,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=75,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=115,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=28,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=120,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=41,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=87,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=119,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=114,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=104,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=27,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=121,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=126,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=37,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=32,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=94,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=110,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=77,drawer-id=1,book-id=1,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=36,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=66,drawer-id=1,book-id=1,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=83,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=47,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=99,drawer-id=1,book-id=1,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=79,drawer-id=1,book-id=1,socket-id=1,entitlement=low,dedicated=false \
--device max-s390x-cpu,core-id=100,drawer-id=1,book-id=1,socket-id=1,entitlement=medium,dedicated=false \
--device max-s390x-cpu,core-id=89,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=false \
--device max-s390x-cpu,core-id=2,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=45,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=69,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=64,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=97,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true \
--device max-s390x-cpu,core-id=111,drawer-id=1,book-id=1,socket-id=1,entitlement=medium,dedicated=false \
-"""
+qemu_params = -cpu max,ctop=on -smp cpus=1,drawers=2,books=2,sockets=2,cores=16,maxcpus=128
+	-device max-s390x-cpu,core-id=31,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=11,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=95,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=73,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=78,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=13,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=40,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=101,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=29,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=56,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=92,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=30,drawer-id=0,book-id=0,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=118,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=71,drawer-id=0,book-id=0,socket-id=0,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=93,drawer-id=0,book-id=0,socket-id=0,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=16,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=5,drawer-id=0,book-id=0,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=42,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=98,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=44,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=23,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=65,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=102,drawer-id=0,book-id=0,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=57,drawer-id=0,book-id=0,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=125,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=127,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=82,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=14,drawer-id=0,book-id=0,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=91,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=12,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=8,drawer-id=0,book-id=0,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=112,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=109,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=19,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=96,drawer-id=0,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=67,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=80,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=108,drawer-id=0,book-id=1,socket-id=0,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=34,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=18,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=39,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=53,drawer-id=0,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=46,drawer-id=0,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=3,drawer-id=0,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=76,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=15,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=7,drawer-id=0,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=81,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=1,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=113,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=38,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=90,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=117,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=62,drawer-id=0,book-id=1,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=85,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=49,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=24,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=107,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=103,drawer-id=0,book-id=1,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=33,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=51,drawer-id=0,book-id=1,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=21,drawer-id=0,book-id=1,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=72,drawer-id=0,book-id=1,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=63,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=105,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=74,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=50,drawer-id=1,book-id=0,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=60,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=22,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=43,drawer-id=1,book-id=0,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=48,drawer-id=1,book-id=0,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=35,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=58,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=106,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=123,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=122,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=9,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=10,drawer-id=1,book-id=0,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=25,drawer-id=1,book-id=0,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=116,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=26,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=17,drawer-id=1,book-id=0,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=20,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=59,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=54,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=70,drawer-id=1,book-id=0,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=88,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=6,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=52,drawer-id=1,book-id=0,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=55,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=124,drawer-id=1,book-id=0,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=61,drawer-id=1,book-id=0,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=84,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=68,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=86,drawer-id=1,book-id=0,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=4,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=75,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=115,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=28,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=120,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=41,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=87,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=119,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=114,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=104,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=27,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=121,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=126,drawer-id=1,book-id=1,socket-id=0,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=37,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=32,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=94,drawer-id=1,book-id=1,socket-id=0,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=110,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=77,drawer-id=1,book-id=1,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=36,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=66,drawer-id=1,book-id=1,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=83,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=47,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=99,drawer-id=1,book-id=1,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=79,drawer-id=1,book-id=1,socket-id=1,entitlement=low,dedicated=false
+	-device max-s390x-cpu,core-id=100,drawer-id=1,book-id=1,socket-id=1,entitlement=medium,dedicated=false
+	-device max-s390x-cpu,core-id=89,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=false
+	-device max-s390x-cpu,core-id=2,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=45,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=69,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=64,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=97,drawer-id=1,book-id=1,socket-id=1,entitlement=high,dedicated=true
+	-device max-s390x-cpu,core-id=111,drawer-id=1,book-id=1,socket-id=1,entitlement=medium,dedicated=false
 
 [sie-dat]
 file = sie-dat.elf
diff --git a/scripts/common.bash b/scripts/common.bash
index 41310701..47c45660 100644
--- a/scripts/common.bash
+++ b/scripts/common.bash
@@ -18,13 +18,35 @@ function for_each_unittest()
 	local timeout
 	local disabled_if
 	local rematch
+	local raw
+	local current
+	local value
 
 	# shellcheck disable=SC2155
 	local params_name=$(vmm_unittest_params_name)
 
 	exec {fd}<"$unittests"
 
-	while read -r -u $fd line; do
+	while IFS= read -r -u $fd raw; do
+		read -r line <<<"$raw"
+		# parse in the same order as the Python configparser: detect comments
+		# and blanks first, then continuation by indentation, then section
+		# headers, then individual keys.
+		case "$line" in
+		"" | \#*)
+			current=""
+			continue
+			;;
+		esac
+
+		case "$raw" in
+		[[:blank:]]*)
+			# Append continuation lines to the previous key, joined by a space.
+			[ -n "$current" ] && eval "$current=\"\$$current \$line\""
+			continue
+			;;
+		esac
+
 		if [[ "$line" =~ ^\[(.*)\]$ ]]; then
 			rematch=${BASH_REMATCH[1]}
 			if [ -n "${testname}" ]; then
@@ -46,45 +68,50 @@ function for_each_unittest()
 			accel=""
 			timeout=""
 			disabled_if=""
-		elif [[ $line =~ ^file\ *=\ *(.*)$ ]]; then
-			kernel=$TEST_DIR/${BASH_REMATCH[1]}
+			continue
+		fi
+
+		# value *is* used below via eval
+		# shellcheck disable=SC2034
+		if [[ $line =~ ^file\ *=\ *(.*)$ ]]; then
+			current=kernel
+			value=$TEST_DIR/${BASH_REMATCH[1]}
 		elif [[ $line =~ ^smp\ *=\ *(.*)$ ]]; then
-			smp="$(vmm_optname_nr_cpus) ${BASH_REMATCH[1]}"
+			current=smp
+			value="$(vmm_optname_nr_cpus) ${BASH_REMATCH[1]}"
 		elif [[ $line =~ ^test_args\ *=\ *(.*)$ ]]; then
-			test_args="$(vmm_optname_args) ${BASH_REMATCH[1]}"
-		elif [[ $line =~ ^($params_name)\ *=\ *'"""'(.*)$ ]]; then
-			opts="$(vmm_default_opts) ${BASH_REMATCH[2]}$'\n'"
-			while read -r -u $fd; do
-				#escape backslash newline, but not double backslash
-				if [[ $opts =~ [^\\]*(\\*)$'\n'$ ]]; then
-					if (( ${#BASH_REMATCH[1]} % 2 == 1 )); then
-						opts=${opts%\\$'\n'}
-					fi
-				fi
-				if [[ "$REPLY" =~ ^(.*)'"""'[:blank:]*$ ]]; then
-					opts+=${BASH_REMATCH[1]}
-					break
-				else
-					opts+=$REPLY$'\n'
-				fi
-			done
+			current=test_args
+			value="$(vmm_optname_args) ${BASH_REMATCH[1]}"
 		elif [[ $line =~ ^($params_name)\ *=\ *(.*)$ ]]; then
-			opts="$(vmm_default_opts) ${BASH_REMATCH[2]}"
+			current=opts
+			value="$(vmm_default_opts) ${BASH_REMATCH[2]}"
 		elif [[ $line =~ ^groups\ *=\ *(.*)$ ]]; then
-			groups=${BASH_REMATCH[1]}
+			current=groups
+			value=${BASH_REMATCH[1]}
 		elif [[ $line =~ ^arch\ *=\ *(.*)$ ]]; then
-			arch=${BASH_REMATCH[1]}
+			current=arch
+			value=${BASH_REMATCH[1]}
 		elif [[ $line =~ ^machine\ *=\ *(.*)$ ]]; then
-			machine=${BASH_REMATCH[1]}
+			current=machine
+			value=${BASH_REMATCH[1]}
 		elif [[ $line =~ ^check\ *=\ *(.*)$ ]]; then
-			check=${BASH_REMATCH[1]}
+			current=check
+			value=${BASH_REMATCH[1]}
 		elif [[ $line =~ ^disabled_if\ *=\ *(.*)$ ]]; then
-			disabled_if=${BASH_REMATCH[1]}
+			current=disabled_if
+			value=${BASH_REMATCH[1]}
 		elif [[ $line =~ ^accel\ *=\ *(.*)$ ]]; then
-			accel=${BASH_REMATCH[1]}
+			current=accel
+			value=${BASH_REMATCH[1]}
 		elif [[ $line =~ ^timeout\ *=\ *(.*)$ ]]; then
-			timeout=${BASH_REMATCH[1]}
+			current=timeout
+			value=${BASH_REMATCH[1]}
+		else
+			# ignore
+			current=""
+			continue
 		fi
+		[ -n "$current" ] && eval "$current=\$value"
 	done
 	if [ -n "${testname}" ]; then
 		$(arch_cmd) "$cmd" "$testname" "$groups" "$smp" "$kernel" "$test_args" "$opts" "$arch" "$machine" "$check" "$accel" "$timeout"
-- 
2.56.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH kvm-unit-tests 5/6] drop --enable/--disable-default-environ
  2026-11-26 10:30 ` [PATCH kvm-unit-tests 5/6] drop --enable/--disable-default-environ Paolo Bonzini
@ 2026-11-26 16:02   ` Andrew Jones
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Jones @ 2026-11-26 16:02 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, thuth

On Thu, Nov 26, 2026 at 11:30:01AM +0100, Paolo Bonzini wrote:
> I would be very surprised if anyone is using this option, which was
> probably meant to be used together with the errata system.  Keep
> the variable as it is used internally to prevent generation of an
> initrd, but drop it from ./configure.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure               | 11 -----------
>  scripts/arch-run.bash   |  2 ++
>  scripts/mkstandalone.sh |  1 -
>  3 files changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/configure b/configure
> index 7c9ebd49..9b325b54 100755
> --- a/configure
> +++ b/configure
> @@ -53,7 +53,6 @@ host=$arch
>  cross_prefix=
>  endian=""
>  pretty_print_stacks=yes
> -environ_default=yes
>  u32_long=
>  wa_divide=
>  target=
> @@ -97,9 +96,6 @@ usage() {
>  	    --endian=ENDIAN        endianness to compile for (little or big, ppc64 only)
>  	    --[enable|disable]-pretty-print-stacks
>  	                           enable or disable pretty stack printing (enabled by default)
> -	    --[enable|disable]-default-environ
> -	                           enable or disable the generation of a default environ when
> -	                           no environ is provided by the user (enabled by default)
>  	    --host-key-document=HOST_KEY_DOCUMENT
>  	                           Specify the machine-specific host-key document for creating
>  	                           a PVM image with 'genprotimg' (s390x only)
> @@ -189,12 +185,6 @@ while [[ $optno -le $argc ]]; do
>  	--disable-pretty-print-stacks)
>  	    pretty_print_stacks=no
>  	    ;;
> -	--enable-default-environ)
> -	    environ_default=yes
> -	    ;;
> -	--disable-default-environ)
> -	    environ_default=no
> -	    ;;

We're probably safe to remove them, but I can't recall if we've ever
removed configure parameters before. I'd probably conservatively keep
them as no-ops and document them as deprecated, since I think it might
be possible that people discovered --disable-default-environ, knew they
didn't want an environ, and then added that parameter to their
build/install/run scripts embedded deep in their test system.

Thanks,
drew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH kvm-unit-tests 0/6] Test runner TLC
  2026-11-26 10:29 [PATCH kvm-unit-tests 0/6] Test runner TLC Paolo Bonzini
                   ` (5 preceding siblings ...)
  2026-11-26 10:30 ` [PATCH kvm-unit-tests 6/6] switch unittests.cfg parsing to be ConfigParser-compatible Paolo Bonzini
@ 2026-11-26 16:03 ` Andrew Jones
  6 siblings, 0 replies; 9+ messages in thread
From: Andrew Jones @ 2026-11-26 16:03 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, thuth

On Thu, Nov 26, 2026 at 11:29:56AM +0100, Paolo Bonzini wrote:
> Some cleanups of the test runner, dropping some fat and preparing
> for future reorganization of its functionality.  In particular I
> would like to introduce a better waiver mechanism that does not
> require changes to the tests.
> 
> Patches 1-2 remove the errata mechanism, as it has seen little use
> and kernel version checks *in the test* are not a good way to decide
> whether a test result should be waived.  While the original purpose
> was to block tests that are unsafe and could cause the host to hang,
> unsafe tests arguably shouldn't exist at all...
> 
> Patches 3-5 cut some of the environment functionality, specifically
> not passing anymore host information to the test as they were not
> read by any test.
> 
> Patch 6 finally makes unittests.cfg parsable by standard .ini syntax
> parsers, such as Python's configparser.
> 
> Paolo
> 
> Paolo Bonzini (6):
>   arm: remove usage of the errata mechanism
>   remove errata mechanism
>   omit "#" from printed command line if INITRD is empty
>   do not pass information about kernel, QEMU or target via environment
>   drop --enable/--disable-default-environ
>   switch unittests.cfg parsing to be ConfigParser-compatible
> 
>  README.md               |  44 +------
>  arm/debug.c             |   1 -
>  arm/gic.c               |  10 --
>  arm/pmu.c               |   8 +-
>  arm/psci.c              |   9 +-
>  arm/timer.c             |   5 +-
>  configure               |  26 ----
>  errata.txt              |   9 --
>  lib/errata.h            |  58 ---------
>  run_tests.sh            |   4 +-
>  s390x/unittests.cfg     | 257 ++++++++++++++++++++--------------------
>  scripts/arch-run.bash   | 131 +-------------------
>  scripts/common.bash     |  85 ++++++++-----
>  scripts/mkstandalone.sh |  11 --
>  14 files changed, 198 insertions(+), 460 deletions(-)
>  delete mode 100644 errata.txt
>  delete mode 100644 lib/errata.h
> 
> -- 
> 2.56.1
>

Besides the suggestion to keep/deprecate the configure parameters,

For the series,

Acked-by: Andrew Jones <andrew.jones@linux.dev>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-26 16:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 10:29 [PATCH kvm-unit-tests 0/6] Test runner TLC Paolo Bonzini
2026-11-26 10:29 ` [PATCH kvm-unit-tests 1/6] arm: remove usage of the errata mechanism Paolo Bonzini
2026-11-26 10:29 ` [PATCH kvm-unit-tests 2/6] remove " Paolo Bonzini
2026-11-26 10:29 ` [PATCH kvm-unit-tests 3/6] omit "#" from printed command line if INITRD is empty Paolo Bonzini
2026-11-26 10:30 ` [PATCH kvm-unit-tests 4/6] do not pass information about kernel, QEMU or target via environment Paolo Bonzini
2026-11-26 10:30 ` [PATCH kvm-unit-tests 5/6] drop --enable/--disable-default-environ Paolo Bonzini
2026-11-26 16:02   ` Andrew Jones
2026-11-26 10:30 ` [PATCH kvm-unit-tests 6/6] switch unittests.cfg parsing to be ConfigParser-compatible Paolo Bonzini
2026-11-26 16:03 ` [PATCH kvm-unit-tests 0/6] Test runner TLC Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox