Re: [kvm-unit-tests PATCH 2/3] migration: Fix test harness hang if source does not reach migration point

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

 



On 25/09/2023 13.14, Nico Boehr wrote:
Quoting Nicholas Piggin (2023-07-30 12:03:36)
On Fri Jul 28, 2023 at 5:34 PM AEST, Nico Boehr wrote:
Quoting Nicholas Piggin (2023-07-25 05:39:36)
After starting the test, the harness waits polling for "migrate" in the
output. If the test does not print for some reason, the harness hangs.

Test that the pid is still alive while polling to fix this hang.

While here, wait for the full string "Now migrate the VM", which I think
makes it more obvious to read and could avoid an unfortunate collision
with some debugging output in a test case.

Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx>

Thanks for attempting to fix this!

---
  scripts/arch-run.bash | 10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 518607f4..30e535c7 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -142,6 +142,7 @@ run_migration ()
eval "$@" -chardev socket,id=mon1,path=${qmp1},server=on,wait=off \
                 -mon chardev=mon1,mode=control | tee ${migout1} &
+       live_pid=`jobs -l %+ | grep "eval" | awk '{print$2}'`

Pardon my ignorance, but why would $! not work here?

My mastery of bash is poor, I copied the incoming_pid line. It seems
to work, but if you think $! is better I can try it.

Sorry, this fell off of my radar after going to summer holiday...

Reviewed-by: Nico Boehr <nrb@xxxxxxxxxxxxx>

 Hi Nicholas & Nico,

do you want me to pick up this patch as is, or do you want to respin with $! instead?

 Thomas





[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