|
|
ac3a84 |
From fa44b8d1e6b0d5e0ef4dfcb01e26e7907068bfa3 Mon Sep 17 00:00:00 2001
|
|
|
ac3a84 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
|
ac3a84 |
Date: Wed, 7 Dec 2022 09:52:35 +0100
|
|
|
ac3a84 |
Subject: [PATCH] TEST-65: use [[ -v ]] more
|
|
|
ac3a84 |
|
|
|
ac3a84 |
It's a bashism, but we use other bash features anyway, and it's cleaner
|
|
|
ac3a84 |
and much less verbose.
|
|
|
ac3a84 |
|
|
|
ac3a84 |
(cherry picked from commit 1f9caf28cafbec89b93b8e6b641d387ac5acdd24)
|
|
|
ac3a84 |
|
|
|
ac3a84 |
Related: #2138081
|
|
|
ac3a84 |
---
|
|
|
ac3a84 |
test/units/testsuite-64.sh | 10 +++++-----
|
|
|
ac3a84 |
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
ac3a84 |
|
|
|
ac3a84 |
diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh
|
|
|
ac3a84 |
index 7673036335..fd1ad7c041 100755
|
|
|
ac3a84 |
--- a/test/units/testsuite-64.sh
|
|
|
ac3a84 |
+++ b/test/units/testsuite-64.sh
|
|
|
ac3a84 |
@@ -192,7 +192,7 @@ testcase_nvme_subsystem() {
|
|
|
ac3a84 |
testcase_virtio_scsi_identically_named_partitions() {
|
|
|
ac3a84 |
local num
|
|
|
ac3a84 |
|
|
|
ac3a84 |
- if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
|
|
ac3a84 |
+ if [[ -v ASAN_OPTIONS || "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
|
|
ac3a84 |
num=$((4 * 4))
|
|
|
ac3a84 |
else
|
|
|
ac3a84 |
num=$((16 * 8))
|
|
|
ac3a84 |
@@ -305,7 +305,7 @@ testcase_simultaneous_events() {
|
|
|
ac3a84 |
local -a devices symlinks
|
|
|
ac3a84 |
local -A running
|
|
|
ac3a84 |
|
|
|
ac3a84 |
- if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
|
|
ac3a84 |
+ if [[ -v ASAN_OPTIONS || "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
|
|
ac3a84 |
num_part=2
|
|
|
ac3a84 |
iterations=10
|
|
|
ac3a84 |
timeout=240
|
|
|
ac3a84 |
@@ -400,7 +400,7 @@ testcase_lvm_basic() {
|
|
|
ac3a84 |
/dev/disk/by-id/ata-foobar_deadbeeflvm{0..3}
|
|
|
ac3a84 |
)
|
|
|
ac3a84 |
|
|
|
ac3a84 |
- if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
|
|
ac3a84 |
+ if [[ -v ASAN_OPTIONS || "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
|
|
ac3a84 |
timeout=180
|
|
|
ac3a84 |
else
|
|
|
ac3a84 |
timeout=30
|
|
|
ac3a84 |
@@ -453,7 +453,7 @@ testcase_lvm_basic() {
|
|
|
ac3a84 |
helper_check_device_units
|
|
|
ac3a84 |
|
|
|
ac3a84 |
# Same as above, but now with more "stress"
|
|
|
ac3a84 |
- if [[ -n "${ASAN_OPTIONS:-}" ]] || [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
|
|
ac3a84 |
+ if [[ -v ASAN_OPTIONS || "$(systemd-detect-virt -v)" == "qemu" ]]; then
|
|
|
ac3a84 |
iterations=10
|
|
|
ac3a84 |
else
|
|
|
ac3a84 |
iterations=50
|
|
|
ac3a84 |
@@ -478,7 +478,7 @@ testcase_lvm_basic() {
|
|
|
ac3a84 |
helper_check_device_units
|
|
|
ac3a84 |
|
|
|
ac3a84 |
# Create & remove LVs in a loop, i.e. with more "stress"
|
|
|
ac3a84 |
- if [[ -n "${ASAN_OPTIONS:-}" ]]; then
|
|
|
ac3a84 |
+ if [[ -v ASAN_OPTIONS ]]; then
|
|
|
ac3a84 |
iterations=8
|
|
|
ac3a84 |
partitions=16
|
|
|
ac3a84 |
elif [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
|