[kvm-unit-tests PATCH 1/3] arch-run: Extend timeout when booting with UEFI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Booting UEFI can take a long time. Give the timeout some extra time
to compensate for it.

Signed-off-by: Andrew Jones <andrew.jones@xxxxxxxxx>
---
 scripts/arch-run.bash | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 51e4b97b27d1..72ce718b1170 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -94,7 +94,17 @@ run_qemu_status ()
 
 timeout_cmd ()
 {
+	local s
+
 	if [ "$TIMEOUT" ] && [ "$TIMEOUT" != "0" ]; then
+		if [ "$CONFIG_EFI" = 'y' ]; then
+			s=${TIMEOUT: -1}
+			if [ "$s" = 's' ]; then
+				TIMEOUT=${TIMEOUT:0:-1}
+				((TIMEOUT += 10)) # Add 10 seconds for booting UEFI
+				TIMEOUT="${TIMEOUT}s"
+			fi
+		fi
 		echo "timeout -k 1s --foreground $TIMEOUT"
 	fi
 }
-- 
2.40.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux