Merge pull request #23264 from keszybz/shorten-test-names
Shorten test names
This commit is contained in:
+12
-10
@@ -1,5 +1,7 @@
|
||||
The extended testsuite only works with UID=0. It contains of several
|
||||
subdirectories named "test/TEST-??-*", which are run one by one.
|
||||
The extended testsuite only works with UID=0. It consists of the subdirectories
|
||||
named "test/TEST-??-*", each of which contains a description of an OS image and
|
||||
a test which consists of systemd units and scripts to execute in this image.
|
||||
The same image is used for execution under `systemd-nspawn` and `qemu`.
|
||||
|
||||
To run the extended testsuite do the following:
|
||||
|
||||
@@ -53,10 +55,10 @@ Configuration variables
|
||||
=======================
|
||||
|
||||
TEST_NO_QEMU=1
|
||||
Don't run tests under QEMU
|
||||
Don't run tests under qemu
|
||||
|
||||
TEST_QEMU_ONLY=1
|
||||
Run only tests that require QEMU
|
||||
Run only tests that require qemu
|
||||
|
||||
TEST_NO_NSPAWN=1
|
||||
Don't run tests under systemd-nspawn
|
||||
@@ -65,8 +67,8 @@ TEST_PREFER_NSPAWN=1
|
||||
Run all tests that do not require qemu under systemd-nspawn
|
||||
|
||||
TEST_NO_KVM=1
|
||||
Disable QEMU KVM auto-detection (may be necessary when you're trying to run the
|
||||
*vanilla* QEMU and have both qemu and qemu-kvm installed)
|
||||
Disable qemu KVM auto-detection (may be necessary when you're trying to run the
|
||||
*vanilla* qemu and have both qemu and qemu-kvm installed)
|
||||
|
||||
TEST_NESTED_KVM=1
|
||||
Allow tests to run with nested KVM. By default, the testsuite disables
|
||||
@@ -74,10 +76,10 @@ TEST_NESTED_KVM=1
|
||||
variable disables such checks
|
||||
|
||||
QEMU_MEM=512M
|
||||
Configure amount of memory for QEMU VMs (defaults to 512M)
|
||||
Configure amount of memory for qemu VMs (defaults to 512M)
|
||||
|
||||
QEMU_SMP=1
|
||||
Configure number of CPUs for QEMU VMs (defaults to 1)
|
||||
Configure number of CPUs for qemu VMs (defaults to 1)
|
||||
|
||||
KERNEL_APPEND='...'
|
||||
Append additional parameters to the kernel command line
|
||||
@@ -86,7 +88,7 @@ NSPAWN_ARGUMENTS='...'
|
||||
Specify additional arguments for systemd-nspawn
|
||||
|
||||
QEMU_TIMEOUT=infinity
|
||||
Set a timeout for tests under QEMU (defaults to infinity)
|
||||
Set a timeout for tests under qemu (defaults to infinity)
|
||||
|
||||
NSPAWN_TIMEOUT=infinity
|
||||
Set a timeout for tests under systemd-nspawn (defaults to infinity)
|
||||
@@ -99,7 +101,7 @@ INTERACTIVE_DEBUG=1
|
||||
The kernel and initramfs can be specified with $KERNEL_BIN and $INITRD.
|
||||
(Fedora's or Debian's default kernel path and initramfs are used by default)
|
||||
|
||||
A script will try to find your QEMU binary. If you want to specify a different
|
||||
A script will try to find your qemu binary. If you want to specify a different
|
||||
one with $QEMU_BIN.
|
||||
|
||||
Debugging the qemu image
|
||||
|
||||
@@ -101,7 +101,7 @@ test_run_one() {
|
||||
local test_id="${1:?}"
|
||||
|
||||
if run_qemu "$test_id"; then
|
||||
check_result_qemu || { echo "QEMU test failed"; return 1; }
|
||||
check_result_qemu || { echo "qemu test failed"; return 1; }
|
||||
fi
|
||||
|
||||
return 0
|
||||
@@ -117,7 +117,7 @@ test_run() {
|
||||
mount_initdir
|
||||
|
||||
if get_bool "${TEST_NO_QEMU:=}" || ! find_qemu_bin; then
|
||||
dwarn "can't run QEMU, skipping"
|
||||
dwarn "can't run qemu, skipping"
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# but it assumes (and checks at the beginning) that networkd is not currently
|
||||
# running.
|
||||
#
|
||||
# This can be run on a normal installation, in QEMU, nspawn (with
|
||||
# This can be run on a normal installation, in qemu, systemd-nspawn (with
|
||||
# --private-network), LXD (with "--config raw.lxc=lxc.aa_profile=unconfined"),
|
||||
# or LXC system containers. You need at least the "ip" tool from the iproute
|
||||
# package; it is recommended to install dnsmasq too to get full test coverage.
|
||||
|
||||
+9
-9
@@ -60,7 +60,7 @@ get_bool() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Decide if we can (and want to) run QEMU with KVM acceleration.
|
||||
# Decide if we can (and want to) run qemu with KVM acceleration.
|
||||
# Check if nested KVM is explicitly enabled (TEST_NESTED_KVM). If not,
|
||||
# check if it's not explicitly disabled (TEST_NO_KVM) and we're not already
|
||||
# running under KVM. If these conditions are met, enable KVM (and possibly
|
||||
@@ -310,7 +310,7 @@ find_qemu_bin() {
|
||||
esac
|
||||
|
||||
if [[ ! -e "$QEMU_BIN" ]]; then
|
||||
echo "Could not find a suitable QEMU binary" >&2
|
||||
echo "Could not find a suitable qemu binary" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
@@ -334,8 +334,8 @@ qemu_min_version() {
|
||||
printf "%s\n%s\n" "$1" "$qemu_ver" | sort -V -C
|
||||
}
|
||||
|
||||
# Return 0 if QEMU did run (then you must check the result state/logs for actual
|
||||
# success), or 1 if QEMU is not available.
|
||||
# Return 0 if qemu did run (then you must check the result state/logs for actual
|
||||
# success), or 1 if qemu is not available.
|
||||
run_qemu() {
|
||||
if [ -f /etc/machine-id ]; then
|
||||
read -r MACHINE_ID </etc/machine-id
|
||||
@@ -480,7 +480,7 @@ run_qemu() {
|
||||
derror "Test timed out after ${QEMU_TIMEOUT}s"
|
||||
TIMED_OUT=1
|
||||
else
|
||||
[ "$rc" != 0 ] && derror "QEMU failed with exit code $rc"
|
||||
[ "$rc" != 0 ] && derror "qemu failed with exit code $rc"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
@@ -2877,9 +2877,9 @@ test_run() {
|
||||
|
||||
if ! get_bool "${TEST_NO_QEMU:=}"; then
|
||||
if run_qemu "$test_id"; then
|
||||
check_result_qemu || { echo "QEMU test failed"; return 1; }
|
||||
check_result_qemu || { echo "qemu test failed"; return 1; }
|
||||
else
|
||||
dwarn "can't run QEMU, skipping"
|
||||
dwarn "can't run qemu, skipping"
|
||||
fi
|
||||
fi
|
||||
if ! get_bool "${TEST_NO_NSPAWN:=}"; then
|
||||
@@ -2909,12 +2909,12 @@ do_test() {
|
||||
fi
|
||||
|
||||
if get_bool "${TEST_NO_QEMU:=}" && get_bool "${TEST_NO_NSPAWN:=}"; then
|
||||
echo "TEST: $TEST_DESCRIPTION [SKIPPED]: both QEMU and nspawn disabled" >&2
|
||||
echo "TEST: $TEST_DESCRIPTION [SKIPPED]: both qemu and nspawn disabled" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if get_bool "${TEST_QEMU_ONLY:=}" && ! get_bool "$TEST_NO_NSPAWN"; then
|
||||
echo "TEST: $TEST_DESCRIPTION [SKIPPED]: QEMU-only tests requested" >&2
|
||||
echo "TEST: $TEST_DESCRIPTION [SKIPPED]: qemu-only tests requested" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user