From 0bfe2aa378615caf8c9ee22cd00524b7661c3f75 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 28 Aug 2022 11:58:52 +0900 Subject: [PATCH] test-64: run one more subtest on non-KVM environment with relaxed condition --- test/TEST-64-UDEV-STORAGE/test.sh | 33 +++++++++++++++++-------------- test/units/testsuite-64.sh | 10 +++++++++- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/test/TEST-64-UDEV-STORAGE/test.sh b/test/TEST-64-UDEV-STORAGE/test.sh index 07b5df1d82e..6eed43cc25c 100755 --- a/test/TEST-64-UDEV-STORAGE/test.sh +++ b/test/TEST-64-UDEV-STORAGE/test.sh @@ -207,10 +207,6 @@ 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..." @@ -221,25 +217,26 @@ testcase_virtio_scsi_identically_named_partitions() { # and attach them to a virtio-scsi controller local qemu_opts=("-device virtio-scsi-pci,id=scsi0,num_queues=4") local diskpath="${TESTDIR:?}/namedpart0.img" - local i lodev qemu_timeout + local i lodev num_disk num_part qemu_timeout + + if get_bool "${IS_BUILT_WITH_ASAN:=}" || ! get_bool "$QEMU_KVM"; then + num_disk=4 + num_part=4 + else + num_disk=16 + num_part=8 + fi dd if=/dev/zero of="$diskpath" bs=1M count=18 lodev="$(losetup --show -f -P "$diskpath")" sfdisk "${lodev:?}" <