[kvm-unit-tests PATCH 1/3] migration: Fix test harness hang on fifo

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

 



If the test fails before migration is complete, the input fifo for the
destination machine is not written to and that can leave cat waiting
for input.

Clear that condition in the error handler so the harness doesn't hang
in this case.

Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx>
---
 scripts/arch-run.bash | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 5e7e4201..518607f4 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -165,6 +165,7 @@ run_migration ()
 		migstatus=`qmp ${qmp1} '"query-migrate"' | grep return`
 		if grep -q '"failed"' <<<"$migstatus" ; then
 			echo "ERROR: Migration failed." >&2
+			echo > ${fifo}
 			qmp ${qmp1} '"quit"'> ${qmpout1} 2>/dev/null
 			qmp ${qmp2} '"quit"'> ${qmpout2} 2>/dev/null
 			return 2
-- 
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