]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: lower the # of iterations when running with plain QEMU
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 27 Sep 2022 11:05:43 +0000 (13:05 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 27 Sep 2022 13:10:18 +0000 (15:10 +0200)
test/units/testsuite-64.sh

index 1bf894fa326ab764c6f6d84e7a8ba6e1d3bb98a8..505e949c0940398d13db3ae96ac2ddc61e19ef39 100755 (executable)
@@ -389,7 +389,11 @@ testcase_lvm_basic() {
         /dev/disk/by-id/ata-foobar_deadbeeflvm{0..3}
     )
 
-    [[ -n "${ASAN_OPTIONS:-}" ]] && timeout=180 || timeout=30
+    if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
+        timeout=180
+    else
+        timeout=30
+    fi
     # Make sure all the necessary soon-to-be-LVM devices exist
     ls -l "${devices[@]}"
 
@@ -438,7 +442,12 @@ testcase_lvm_basic() {
     helper_check_device_units
 
     # Same as above, but now with more "stress"
-    [[ -n "${ASAN_OPTIONS:-}" ]] && iterations=10 || iterations=50
+    if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
+        iterations=10
+    else
+        iterations=50
+    fi
+
     for ((i = 1; i <= iterations; i++)); do
         lvm vgchange -an "$vgroup"
         lvm vgchange -ay "$vgroup"
@@ -458,7 +467,12 @@ testcase_lvm_basic() {
     helper_check_device_units
 
     # Create & remove LVs in a loop, i.e. with more "stress"
-    [[ -n "${ASAN_OPTIONS:-}" ]] && iterations=8 || iterations=16
+    if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
+        iterations=8
+    else
+        iterations=16
+    fi
+
     for ((i = 1; i <= iterations; i++)); do
         # 1) Create 16 logical volumes
         for ((part = 0; part < 16; part++)); do