Merge pull request #24440 from mrc0mmand/TEST-64-tweaks
A couple of TEST-64 tweaks to make it usable without KVM
This commit is contained in:
@@ -9,7 +9,7 @@ TEST_NO_NSPAWN=1
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
|
||||
if qemu_min_version "5.2.0"; then
|
||||
QEMU_OPTIONS="-object memory-backend-ram,id=mem0,size=${QEMU_MEM:-512M} -numa node,memdev=mem0,nodeid=0"
|
||||
QEMU_OPTIONS="-object memory-backend-ram,id=mem0,size=${QEMU_MEM:-768M} -numa node,memdev=mem0,nodeid=0"
|
||||
else
|
||||
QEMU_OPTIONS="-numa node,nodeid=0"
|
||||
fi
|
||||
|
||||
@@ -20,11 +20,6 @@ QEMU_TIMEOUT="${QEMU_TIMEOUT:-600}"
|
||||
USER_QEMU_OPTIONS="${QEMU_OPTIONS:-}"
|
||||
USER_KERNEL_APPEND="${KERNEL_APPEND:-}"
|
||||
|
||||
if ! get_bool "$QEMU_KVM"; then
|
||||
echo "This test requires KVM, skipping..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
_host_has_feature() {(
|
||||
set -e
|
||||
|
||||
@@ -213,6 +208,11 @@ testcase_nvme_basic() {
|
||||
|
||||
# Test for issue https://github.com/systemd/systemd/issues/20212
|
||||
testcase_virtio_scsi_identically_named_partitions() {
|
||||
if ! get_bool "$QEMU_KVM"; then
|
||||
echo "This test requires KVM, skipping..."
|
||||
return 77
|
||||
fi
|
||||
|
||||
if ! "${QEMU_BIN:?}" -device help | grep 'name "virtio-scsi-pci"'; then
|
||||
echo "virtio-scsi-pci device driver is not available, skipping test..."
|
||||
return 77
|
||||
@@ -286,8 +286,8 @@ EOF
|
||||
mkfs.ext4 -U "deadbeef-dead-dead-beef-111111111111" -L "failover_vol" "${lodev}p2"
|
||||
losetup -d "$lodev"
|
||||
|
||||
# Add 64 multipath devices, each backed by 4 paths
|
||||
for ndisk in {0..63}; do
|
||||
# Add 16 multipath devices, each backed by 4 paths
|
||||
for ndisk in {0..15}; do
|
||||
wwn="0xDEADDEADBEEF$(printf "%.4d" "$ndisk")"
|
||||
# Use a partitioned disk for the first device to test failover
|
||||
[[ $ndisk -eq 0 ]] && image="$partdisk" || image="${TESTDIR:?}/disk$ndisk.img"
|
||||
|
||||
+2
-2
@@ -92,7 +92,7 @@ add_at_exit_handler() {
|
||||
# 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
|
||||
# nested KVM), otherwise disable it.
|
||||
if get_bool "${TEST_NESTED_KVM:=}" || (! get_bool "${TEST_NO_KVM:=}" && [[ "$(systemd-detect-virt -v)" != kvm ]]); then
|
||||
if get_bool "${TEST_NESTED_KVM:=}" || (! get_bool "${TEST_NO_KVM:=}" && ! systemd-detect-virt -v); then
|
||||
QEMU_KVM=yes
|
||||
else
|
||||
QEMU_KVM=no
|
||||
@@ -483,7 +483,7 @@ run_qemu() {
|
||||
qemu_options+=(
|
||||
-smp "$QEMU_SMP"
|
||||
-net none
|
||||
-m "${QEMU_MEM:-512M}"
|
||||
-m "${QEMU_MEM:-768M}"
|
||||
-nographic
|
||||
-kernel "$KERNEL_BIN"
|
||||
-drive "format=raw,cache=unsafe,file=$image"
|
||||
|
||||
@@ -82,7 +82,7 @@ EOF
|
||||
udevadm settle
|
||||
ls -l /dev/disk/by-id/
|
||||
|
||||
for i in {0..63}; do
|
||||
for i in {0..15}; do
|
||||
wwid="deaddeadbeef$(printf "%.4d" "$i")"
|
||||
path="/dev/disk/by-id/wwn-0x$wwid"
|
||||
dmpath="$(readlink -f "$path")"
|
||||
@@ -178,7 +178,7 @@ EOF
|
||||
# leading to dead symlinks in /dev/disk/
|
||||
iterations=100
|
||||
timeout=30
|
||||
if [[ -n "${ASAN_OPTIONS:-}" ]]; then
|
||||
if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
||||
iterations=10
|
||||
timeout=180
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user