All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cleber Rosa <crosa@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
	"John Snow" <jsnow@redhat.com>, Hyman <huangy81@chinatelecom.cn>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Willian Rampazzo" <wrampazz@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Beraldo Leal" <bleal@redhat.com>
Subject: [PULL 2/5] tests/migration: fix unix socket batch migration
Date: Tue, 16 Mar 2021 23:52:39 -0400	[thread overview]
Message-ID: <20210317035242.24418-3-crosa@redhat.com> (raw)
In-Reply-To: <20210317035242.24418-1-crosa@redhat.com>

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



  parent reply	other threads:[~2021-03-17  3:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17  3:52 [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16 Cleber Rosa
2021-03-17  3:52 ` [PULL 1/5] tests/acceptance: Print expected message on wait_for_console_pattern Cleber Rosa
2021-03-17  3:52 ` Cleber Rosa [this message]
2021-03-17  3:52 ` [PULL 3/5] avocado_qemu: add exec_command function Cleber Rosa
2021-03-17  3:52 ` [PULL 4/5] tests: Add functional test for out-of-process device emulation Cleber Rosa
2021-03-17  3:52 ` [PULL 5/5] tests/acceptance: linux-related tests fix Cleber Rosa
2021-03-18 14:57 ` [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210317035242.24418-3-crosa@redhat.com \
    --to=crosa@redhat.com \
    --cc=bleal@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=huangy81@chinatelecom.cn \
    --cc=jsnow@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@redhat.com \
    --cc=wrampazz@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.