diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2022-09-27 13:57:04 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2022-09-27 15:10:18 +0200 |
commit | 998fb5c5e30dc8d0abcd20fb9199a01e2b9307c8 (patch) | |
tree | 6c07037caa2cbccba1b2af71a2a0c90e41bc62e6 /test | |
parent | test: make the symlink helpers a bit more quiet (diff) | |
download | systemd-998fb5c5e30dc8d0abcd20fb9199a01e2b9307c8.tar.xz systemd-998fb5c5e30dc8d0abcd20fb9199a01e2b9307c8.zip |
test: use fewer partitions/LVs when running with plain QEMU
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/testsuite-64.sh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index 8ded8b6e2d..83377a4728 100755 --- a/test/units/testsuite-64.sh +++ b/test/units/testsuite-64.sh @@ -380,7 +380,7 @@ EOF } testcase_lvm_basic() { - local i iterations part timeout + local i iterations partitions part timeout local vgroup="MyTestGroup$RANDOM" local devices=( /dev/disk/by-id/ata-foobar_deadbeeflvm{0..3} @@ -464,25 +464,30 @@ testcase_lvm_basic() { helper_check_device_units # Create & remove LVs in a loop, i.e. with more "stress" - if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then + if [[ -n "${ASAN_OPTIONS:-}" ]]; then + iterations=8 + iterations=16 + elif [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then iterations=8 + partitions=8 else iterations=16 + partitions=16 fi for ((i = 1; i <= iterations; i++)); do - # 1) Create 16 logical volumes - for ((part = 0; part < 16; part++)); do + # 1) Create some logical volumes + for ((part = 0; part < partitions; part++)); do lvm lvcreate -y -L 4M "$vgroup" -n "looppart$part" done # 2) Immediately remove them - lvm lvremove -y "$vgroup"/looppart{0..15} + lvm lvremove -y $(seq -f "$vgroup/looppart%g" 0 "$((partitions - 1))") # 3) On every 4th iteration settle udev and check if all partitions are # indeed gone, and if all symlinks are still valid if ((i % 4 == 0)); then - for ((part = 0; part < 16; part++)); do + for ((part = 0; part < partitions; part++)); do udevadm wait --settle --timeout="$timeout" --removed "/dev/$vgroup/looppart$part" done helper_check_device_symlinks "/dev/disk" "/dev/$vgroup" |