From ea91b45e0ed7eea49724ec732900eac59d32823d Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 1 Mar 2023 11:06:42 +0100 Subject: [PATCH] test: skip the hwdb update related tests w/ sanitizers and w/o accel systemd-hwdb update is an expensive operation by itself, and when running with sanitizers and in a VM without acceleration this cost is exacerbated even further, making the test run for a very long time. For example, in the daily CentOS CI ppc64le job with ASan+UBSan one systemd-hwdb update takes more than 7 minutes; in the regular Arch job with KVM it takes over 2 minutes. Since the hwdb update is also tested in other places (like TEST-01-BASIC and the test-hwdb meson test), let's skip it if we detect we run with sanitizers and with plain QEMU. --- test/units/testsuite-17.10.sh | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/test/units/testsuite-17.10.sh b/test/units/testsuite-17.10.sh index 5262f80bb8..7136ed16f5 100755 --- a/test/units/testsuite-17.10.sh +++ b/test/units/testsuite-17.10.sh @@ -11,10 +11,6 @@ set -o pipefail cleanup_17_10() { set +e - rmmod scsi_debug - rm -f /etc/udev/hwdb.d/99-test.hwdb - systemd-hwdb update - losetup -d "$loopdev" rm -f "$blk" @@ -33,14 +29,6 @@ blk="$(mktemp)" dd if=/dev/null of="$blk" bs=1M count=1 loopdev="$(losetup --show -f "$blk")" -modprobe scsi_debug -scsidev=$(readlink -f /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/[0-9]*) -cat > /etc/udev/hwdb.d/99-test.hwdb < /etc/udev/hwdb.d/99-test.hwdb <