diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-28 14:08:18 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-29 15:24:03 +0200 |
commit | ac09c21d4576f0b72165d9c13a701924b0916406 (patch) | |
tree | 1a0a68bc2e5525ab153e8d55315d090e5f932649 /test | |
parent | Merge pull request #33065 from DaanDeMeyer/nspawn (diff) | |
download | systemd-ac09c21d4576f0b72165d9c13a701924b0916406.tar.xz systemd-ac09c21d4576f0b72165d9c13a701924b0916406.zip |
TEST-64-UDEV-STORAGE: Replace megasas2 controller with virtio scsi controller
The virtio-scsi driver is available in the KVM/cloud kernel
packages provided by distributions whereas the megasas2 driver is
not. Let's switch to virtio-scsi so we can switch back to the KVM/cloud
kernel packages.
Diffstat (limited to 'test')
-rw-r--r-- | test/TEST-64-UDEV-STORAGE/meson.build | 2 | ||||
-rwxr-xr-x | test/TEST-64-UDEV-STORAGE/nvme_basic.configure | 3 | ||||
-rwxr-xr-x | test/TEST-64-UDEV-STORAGE/test.sh | 14 | ||||
-rwxr-xr-x | test/TEST-64-UDEV-STORAGE/virtio_scsi_basic.configure (renamed from test/TEST-64-UDEV-STORAGE/megasas2_basic.configure) | 10 | ||||
-rwxr-xr-x | test/units/TEST-64-UDEV-STORAGE.sh | 2 |
5 files changed, 10 insertions, 21 deletions
diff --git a/test/TEST-64-UDEV-STORAGE/meson.build b/test/TEST-64-UDEV-STORAGE/meson.build index 363104d861..d54c262386 100644 --- a/test/TEST-64-UDEV-STORAGE/meson.build +++ b/test/TEST-64-UDEV-STORAGE/meson.build @@ -14,11 +14,11 @@ foreach testcase : [ 'lvm_basic', 'mdadm_basic', 'mdadm_lvm', - 'megasas2_basic', 'multipath_basic_failover', 'nvme_basic', 'nvme_subsystem', 'simultaneous_events', + 'virtio_scsi_basic', 'virtio_scsi_identically_named_partitions', ] integration_tests += [ diff --git a/test/TEST-64-UDEV-STORAGE/nvme_basic.configure b/test/TEST-64-UDEV-STORAGE/nvme_basic.configure index 68cbd728c3..37d0d356fd 100755 --- a/test/TEST-64-UDEV-STORAGE/nvme_basic.configure +++ b/test/TEST-64-UDEV-STORAGE/nvme_basic.configure @@ -15,9 +15,6 @@ if 'name "nvme"' not in result.stdout: print("nvme device driver is not available, skipping test...", file=sys.stderr) exit(77) -for i in range(4): - config["QemuArgs"] += ["-device", f"megasas-gen2,id=scsi{i}"] - def add_drive(i: int, serial: str) -> None: global config id = f"nvme{i}" diff --git a/test/TEST-64-UDEV-STORAGE/test.sh b/test/TEST-64-UDEV-STORAGE/test.sh index ddcb938588..b5a70cafaf 100755 --- a/test/TEST-64-UDEV-STORAGE/test.sh +++ b/test/TEST-64-UDEV-STORAGE/test.sh @@ -159,18 +159,18 @@ test_run() { return 0 } -testcase_megasas2_basic() { - if ! "${QEMU_BIN:?}" -device help | grep 'name "megasas-gen2"'; then - echo "megasas-gen2 device driver is not available, skipping test..." +testcase_virtio_scsi_basic() { + if ! "${QEMU_BIN:?}" -device help | grep 'name "virtio-scsi-pci"'; then + echo "virtio-scsi-pci device driver is not available, skipping test..." return 77 fi local i local qemu_opts=( - "-device megasas-gen2,id=scsi0" - "-device megasas-gen2,id=scsi1" - "-device megasas-gen2,id=scsi2" - "-device megasas-gen2,id=scsi3" + "-device virtio-scsi-pci,id=scsi0" + "-device virtio-scsi-pci,id=scsi1" + "-device virtio-scsi-pci,id=scsi2" + "-device virtio-scsi-pci,id=scsi3" ) for i in {0..127}; do diff --git a/test/TEST-64-UDEV-STORAGE/megasas2_basic.configure b/test/TEST-64-UDEV-STORAGE/virtio_scsi_basic.configure index 632e2de5b0..ab8d530a3e 100755 --- a/test/TEST-64-UDEV-STORAGE/megasas2_basic.configure +++ b/test/TEST-64-UDEV-STORAGE/virtio_scsi_basic.configure @@ -2,21 +2,13 @@ # SPDX-License-Identifier: LGPL-2.1-or-later import json -import os -import subprocess import sys config = json.load(sys.stdin) -qemu = f"qemu-system-{os.environ["QEMU_ARCHITECTURE"]}" -result = subprocess.run([qemu, '-device', 'help'], check=True, text=True, stdout=subprocess.PIPE) -if 'name "megasas-gen2"' not in result.stdout: - print("megasas-gen2 device driver is not available, skipping test...", file=sys.stderr) - exit(77) - for i in range(4): - config["QemuArgs"] += ['-device', f"megasas-gen2,id=scsi{i}"] + config["QemuArgs"] += ['-device', f"virtio-scsi-pci,id=scsi{i}"] for i in range(128): id = f"drive{i}" diff --git a/test/units/TEST-64-UDEV-STORAGE.sh b/test/units/TEST-64-UDEV-STORAGE.sh index f8d49ea29d..5ddddf549b 100755 --- a/test/units/TEST-64-UDEV-STORAGE.sh +++ b/test/units/TEST-64-UDEV-STORAGE.sh @@ -168,7 +168,7 @@ helper_check_device_units() {( check_device_units 1 "$@" )} -testcase_megasas2_basic() { +testcase_virtio_scsi_basic() { lsblk -S [[ "$(lsblk --scsi --noheadings | wc -l)" -ge 128 ]] } |