[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests/migration: fix unix socket migration
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] tests/migration: fix unix socket migration |
Date: |
Tue, 9 Mar 2021 17:55:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 3/9/21 5:00 PM, huangy81@chinatelecom.cn wrote:
> 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(-)
Interesting, we have in MAINTAINERS:
Python scripts
M: Eduardo Habkost <ehabkost@redhat.com>
M: Cleber Rosa <crosa@redhat.com>
S: Odd Fixes
F: scripts/*.py
F: tests/*.py
However:
./scripts/get_maintainer.pl -f tests/migration/guestperf/engine.py
get_maintainer.pl: No maintainers found, printing recent contributors.
get_maintainer.pl: Do not blindly cc: them on patches! Use common sense.
> 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")
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>