diff options
author | Hyman <huangy81@chinatelecom.cn> | 2021-03-10 00:00:59 +0800 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2021-07-14 14:15:52 +0100 |
commit | 927fae0eb9af2bcde2cd2030d478d365f2edf7e9 (patch) | |
tree | 633a7dedf3fe4b0bb7a946e32ddeee4b1f4afd93 /tests/migration | |
parent | 2ce949a4c187b2a6aa68ab03216ee271b408fa63 (diff) | |
download | qemu-927fae0eb9af2bcde2cd2030d478d365f2edf7e9.zip qemu-927fae0eb9af2bcde2cd2030d478d365f2edf7e9.tar.gz qemu-927fae0eb9af2bcde2cd2030d478d365f2edf7e9.tar.bz2 |
tests/migration: fix unix socket migration
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.
See also commit f9cc00346d3 ("tests/migration: fix unix socket batch
migration").
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Hyman <huangy81@chinatelecom.cn>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tests/migration')
-rw-r--r-- | tests/migration/guestperf/engine.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py index 7c991c4..87a6ab2 100644 --- a/tests/migration/guestperf/engine.py +++ b/tests/migration/guestperf/engine.py @@ -423,7 +423,7 @@ class Engine(object): 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 os.path.exists(srcmonaddr): |