|
|
594167 |
From fe4bd1d397af0fef644c401ca5a94e4c82316b4c Mon Sep 17 00:00:00 2001
|
|
|
594167 |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
594167 |
Date: Thu, 27 Jan 2022 22:50:58 +0100
|
|
|
594167 |
Subject: [PATCH] test: don't leak local variable to outer scopes
|
|
|
594167 |
|
|
|
594167 |
(cherry picked from commit 888d0bc074c6d11593d28c6a876787ae864604ea)
|
|
|
594167 |
|
|
|
594167 |
Related: #2017035
|
|
|
594167 |
---
|
|
|
594167 |
test/TEST-64-UDEV-STORAGE/test.sh | 8 ++++++--
|
|
|
594167 |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
594167 |
|
|
|
594167 |
diff --git a/test/TEST-64-UDEV-STORAGE/test.sh b/test/TEST-64-UDEV-STORAGE/test.sh
|
|
|
594167 |
index f784e65984..c360c8b661 100755
|
|
|
594167 |
--- a/test/TEST-64-UDEV-STORAGE/test.sh
|
|
|
594167 |
+++ b/test/TEST-64-UDEV-STORAGE/test.sh
|
|
|
594167 |
@@ -171,6 +171,7 @@ testcase_megasas2_basic() {
|
|
|
594167 |
return 77
|
|
|
594167 |
fi
|
|
|
594167 |
|
|
|
594167 |
+ local i
|
|
|
594167 |
local qemu_opts=(
|
|
|
594167 |
"-device megasas-gen2,id=scsi0"
|
|
|
594167 |
"-device megasas-gen2,id=scsi1"
|
|
|
594167 |
@@ -197,6 +198,9 @@ testcase_nvme_basic() {
|
|
|
594167 |
return 77
|
|
|
594167 |
fi
|
|
|
594167 |
|
|
|
594167 |
+ local i
|
|
|
594167 |
+ local qemu_opts=()
|
|
|
594167 |
+
|
|
|
594167 |
for i in {0..27}; do
|
|
|
594167 |
qemu_opts+=(
|
|
|
594167 |
"-device nvme,drive=nvme$i,serial=deadbeef$i,num_queues=8"
|
|
|
594167 |
@@ -220,7 +224,7 @@ testcase_virtio_scsi_identically_named_partitions() {
|
|
|
594167 |
# and attach them to a virtio-scsi controller
|
|
|
594167 |
local qemu_opts=("-device virtio-scsi-pci,id=scsi0,num_queues=4")
|
|
|
594167 |
local diskpath="${TESTDIR:?}/namedpart0.img"
|
|
|
594167 |
- local lodev qemu_timeout
|
|
|
594167 |
+ local i lodev qemu_timeout
|
|
|
594167 |
|
|
|
594167 |
dd if=/dev/zero of="$diskpath" bs=1M count=18
|
|
|
594167 |
lodev="$(losetup --show -f -P "$diskpath")"
|
|
|
594167 |
@@ -330,7 +334,7 @@ testcase_lvm_basic() {
|
|
|
594167 |
fi
|
|
|
594167 |
|
|
|
594167 |
local qemu_opts=("-device ahci,id=ahci0")
|
|
|
594167 |
- local diskpath
|
|
|
594167 |
+ local diskpath i
|
|
|
594167 |
|
|
|
594167 |
# Attach 4 SATA disks to the VM (and set their model and serial fields
|
|
|
594167 |
# to something predictable, so we can refer to them later)
|