From: Frantisek Sumsal Date: Tue, 27 Sep 2022 11:05:43 +0000 (+0200) Subject: test: lower the # of iterations when running with plain QEMU X-Git-Tag: v252-rc1~82^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd2b99ee7f49f49e916d3f8bb976c08800aad8de;p=thirdparty%2Fsystemd.git test: lower the # of iterations when running with plain QEMU --- diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index 1bf894fa326..505e949c094 100755 --- a/test/units/testsuite-64.sh +++ b/test/units/testsuite-64.sh @@ -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