[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/5] tests/migration: fix unix socket batch migration
From: |
Cleber Rosa |
Subject: |
[PULL 2/5] tests/migration: fix unix socket batch migration |
Date: |
Tue, 16 Mar 2021 23:52:39 -0400 |
From: Hyman <huangy81@chinatelecom.cn>
when execute the following test command:
"guestperf-batch.py --dst-host localhost --transport unix ..."
test aborts and error message as the following be throwed:
"launching VM Failed: [Errno 98] Address already in use".
The reason is that batch script use the same monitor socket
in all test cases and do not remove the socket file. The second
migration test will launch vm use the same socket file as
the first, so we get the error message. To fix it, just remove
the socket file each time we have done the migration test.
Signed-off-by: Hyman <huangy81@chinatelecom.cn>
Message-Id:
<c3fc438993b87a6ab0bea3d07f6ca0260d29936e.1615397103.git.huangy81@chinatelecom.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/migration/guestperf/engine.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/migration/guestperf/engine.py
b/tests/migration/guestperf/engine.py
index 83bfc3b6bb8..5189cf96775 100644
--- a/tests/migration/guestperf/engine.py
+++ b/tests/migration/guestperf/engine.py
@@ -407,6 +407,13 @@ def run(self, hardware, scenario, result_dir=os.getcwd()):
vcpu_timings = ret[2]
if uri[0:5] == "unix:":
os.remove(uri[5:])
+
+ if os.path.exists(srcmonaddr):
+ os.remove(srcmonaddr)
+
+ if self._dst_host == "localhost" and os.path.exists(dstmonaddr):
+ os.remove(dstmonaddr)
+
if self._verbose:
print("Finished migration")
--
2.30.2
- [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16, Cleber Rosa, 2021/03/16
- [PULL 1/5] tests/acceptance: Print expected message on wait_for_console_pattern, Cleber Rosa, 2021/03/16
- [PULL 2/5] tests/migration: fix unix socket batch migration,
Cleber Rosa <=
- [PULL 3/5] avocado_qemu: add exec_command function, Cleber Rosa, 2021/03/16
- [PULL 4/5] tests: Add functional test for out-of-process device emulation, Cleber Rosa, 2021/03/16
- [PULL 5/5] tests/acceptance: linux-related tests fix, Cleber Rosa, 2021/03/16
- Re: [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16, Peter Maydell, 2021/03/18