qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/migration: fix unix socket migration
@ 2021-03-09 16:00 huangy81
  2021-03-09 16:55 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: huangy81 @ 2021-03-09 16:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hyman, Daniel P. Berrange

From: Hyman <huangy81@chinatelecom.cn>

The test aborts and error message as the following be throwed:
"No such file or directory: '/var/tmp/qemu-migrate-{pid}.migrate",
when the unix socket migration test nearly done. The reason is
qemu removes the unix socket file after migration before
guestperf.py script do it. So pre-check if the socket file exists
when removing it to prevent the guestperf program from aborting.

Signed-off-by: Hyman <huangy81@chinatelecom.cn>
---
 tests/migration/guestperf/engine.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py
index 83bfc3b..86d4f21 100644
--- a/tests/migration/guestperf/engine.py
+++ b/tests/migration/guestperf/engine.py
@@ -405,7 +405,7 @@ def run(self, hardware, scenario, result_dir=os.getcwd()):
             progress_history = ret[0]
             qemu_timings = ret[1]
             vcpu_timings = ret[2]
-            if uri[0:5] == "unix:":
+            if uri[0:5] == "unix:" and os.path.exists(uri[5:]):
                 os.remove(uri[5:])
             if self._verbose:
                 print("Finished migration")
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-07-09 17:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 16:00 [PATCH] tests/migration: fix unix socket migration huangy81
2021-03-09 16:55 ` Philippe Mathieu-Daudé
2021-04-21  1:16   ` Hyman Huang
2021-04-28 17:26     ` Wainer dos Santos Moschetta
2021-06-25 16:33       ` Hyman
2021-07-07  7:31         ` Hyman Huang
2021-03-09 18:56 ` Wainer dos Santos Moschetta
2021-07-07  8:28 ` Philippe Mathieu-Daudé
2021-07-09 17:25   ` Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).