From patchwork Fri Jun 7 15:22:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10982413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EC9814E5 for ; Fri, 7 Jun 2019 16:54:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F46728B3B for ; Fri, 7 Jun 2019 16:54:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32E6B28B3C; Fri, 7 Jun 2019 16:54:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E026428B3E for ; Fri, 7 Jun 2019 16:54:18 +0000 (UTC) Received: from localhost ([::1]:49420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHmQ-0000vN-Lb for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jun 2019 12:31:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48701) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGhd-0004vd-3m for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGhb-0005R9-ML for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33424) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGhb-0005L9-Fh for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:47 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 222E6356DB; Fri, 7 Jun 2019 15:22:41 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-62.rdu2.redhat.com [10.10.122.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ECEB782708; Fri, 7 Jun 2019 15:22:37 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 11:22:16 -0400 Message-Id: <20190607152223.9467-2-crosa@redhat.com> In-Reply-To: <20190607152223.9467-1-crosa@redhat.com> References: <20190607152223.9467-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 07 Jun 2019 15:22:41 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/8] Travis: print acceptance tests logs in case of job failure X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Because Travis doesn't allow us to keep files produced during tests (such as log files), let's print the complete job log to the "console" in case of job failures. This is a debugging aid, and given that there's been some timeouts happening on some tests, we absolutely needs the logs to have a proper action. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Acked-by: Alex Bennée --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index b053a836a3..9f8e73f276 100644 --- a/.travis.yml +++ b/.travis.yml @@ -226,6 +226,8 @@ matrix: - env: - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu" - TEST_CMD="make check-acceptance" + after_failure: + - cat tests/results/latest/job.log addons: apt: packages: From patchwork Fri Jun 7 15:22:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10982395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7342A14B6 for ; Fri, 7 Jun 2019 16:42:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62A9B28B04 for ; Fri, 7 Jun 2019 16:42:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 572A628B30; Fri, 7 Jun 2019 16:42:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0759F28B04 for ; Fri, 7 Jun 2019 16:42:55 +0000 (UTC) Received: from localhost ([::1]:49504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHx9-0008VK-AO for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jun 2019 12:42:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48715) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGhe-0004xE-71 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGhc-0005Wh-HB for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32782) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGhc-0005QA-5O for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:48 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 595E63016726; Fri, 7 Jun 2019 15:22:42 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-62.rdu2.redhat.com [10.10.122.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FA29842A8; Fri, 7 Jun 2019 15:22:41 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 11:22:17 -0400 Message-Id: <20190607152223.9467-3-crosa@redhat.com> In-Reply-To: <20190607152223.9467-1-crosa@redhat.com> References: <20190607152223.9467-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 07 Jun 2019 15:22:47 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/8] tests/requirements.txt: pin paramiko version requirement X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP It's a good practice (I'd really say a must) to pin as much as possible of the software versions used during test, so let's apply that to paramiko. According to https://pypi.org/project/paramiko/, 2.4.2 is the latest released version. It's also easily obtainable on systems such as Fedora 30. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 3ae0e29ad7..bd1f7590ed 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,4 +2,4 @@ # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 avocado-framework==68.0 -paramiko +paramiko==2.4.2 From patchwork Fri Jun 7 15:22:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10982335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92E0517D2 for ; Fri, 7 Jun 2019 16:21:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FBE128B8F for ; Fri, 7 Jun 2019 16:21:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 742CE28B91; Fri, 7 Jun 2019 16:21:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2417428AB7 for ; Fri, 7 Jun 2019 16:21:58 +0000 (UTC) Received: from localhost ([::1]:49348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHcq-0001gm-PO for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jun 2019 12:21:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48729) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGhf-0004yZ-Ge for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGhe-0005gy-JV for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60704) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGhe-0005f1-EJ for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:50 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93B02306E5FA; Fri, 7 Jun 2019 15:22:44 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-62.rdu2.redhat.com [10.10.122.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 892A382708; Fri, 7 Jun 2019 15:22:42 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 11:22:18 -0400 Message-Id: <20190607152223.9467-4-crosa@redhat.com> In-Reply-To: <20190607152223.9467-1-crosa@redhat.com> References: <20190607152223.9467-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 07 Jun 2019 15:22:44 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/8] Acceptance tests: drop left over usage of ":avocado: enable" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Commit 9531d26c10 removed all of ":avocado: enable" tags, but then a new entry was added with the introduction of migration.py. Let's remove it for consistency. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé --- tests/acceptance/migration.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index 6115cf6c24..a44c1ae58f 100644 --- a/tests/acceptance/migration.py +++ b/tests/acceptance/migration.py @@ -17,9 +17,6 @@ from avocado.utils import wait class Migration(Test): - """ - :avocado: enable - """ timeout = 10 From patchwork Fri Jun 7 15:22:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10982337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E1BCA13AD for ; Fri, 7 Jun 2019 16:23:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D078228B9F for ; Fri, 7 Jun 2019 16:23:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4D6428AC4; Fri, 7 Jun 2019 16:23:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 60A4128B9B for ; Fri, 7 Jun 2019 16:23:14 +0000 (UTC) Received: from localhost ([::1]:49356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHe5-0002mM-GS for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jun 2019 12:23:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48772) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGhp-00052x-17 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGhn-00067S-Ub for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34586) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGhm-00060j-1O for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:22:59 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A931130832F4; Fri, 7 Jun 2019 15:22:50 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-62.rdu2.redhat.com [10.10.122.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C550B82708; Fri, 7 Jun 2019 15:22:44 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 11:22:19 -0400 Message-Id: <20190607152223.9467-5-crosa@redhat.com> In-Reply-To: <20190607152223.9467-1-crosa@redhat.com> References: <20190607152223.9467-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 07 Jun 2019 15:22:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/8] Boot Linux Console Test: add a test for ppc64 + pseries X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Caio Carrara , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Just like the previous tests, boots a Linux kernel on a ppc64 target using the pseries machine. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara CC: Daniel P. Berrangé Reviewed-by: Wainer dos Santos Moschetta --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9f8e73f276..5592e458ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -224,7 +224,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc64-softmmu" - TEST_CMD="make check-acceptance" after_failure: - cat tests/results/latest/job.log diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index d5c500ea30..a196636367 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -217,3 +217,22 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_ppc64_pseries(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + """ + kernel_url = ('https://download.fedoraproject.org/pub/fedora-secondary/' + 'releases/29/Everything/ppc64le/os/ppc/ppc64/vmlinuz') + kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + self.vm.set_machine('pseries') + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From patchwork Fri Jun 7 15:22:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10982369 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C921213AD for ; Fri, 7 Jun 2019 16:29:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B780026222 for ; Fri, 7 Jun 2019 16:29:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB366289EB; Fri, 7 Jun 2019 16:29:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 96F6726222 for ; Fri, 7 Jun 2019 16:29:20 +0000 (UTC) Received: from localhost ([::1]:49386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHjz-0007bc-PI for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jun 2019 12:29:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48818) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGht-00057j-UN for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGhs-0006Fv-FZ for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34488) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGhq-0006BS-FX for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:03 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7104830F1BA9; Fri, 7 Jun 2019 15:22:56 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-62.rdu2.redhat.com [10.10.122.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D7A71842A8; Fri, 7 Jun 2019 15:22:50 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 11:22:20 -0400 Message-Id: <20190607152223.9467-6-crosa@redhat.com> In-Reply-To: <20190607152223.9467-1-crosa@redhat.com> References: <20190607152223.9467-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 07 Jun 2019 15:23:01 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 5/8] VNC Acceptance test: use UNIX domain sockets to avoid port collisions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP While running in parallel, the VNC tests that use a TCP port easily collide. There's a number of possibilities to reduce the probability of collisions, but none that completely prevents it from happening. So, to avoid those collisions, and given that the scope of the tests are really not related to nature of the socket type, let's switch to UNIX domain sockets created in temporary directories. Note: the amount of boiler plate code is far from the ideal, but it's related to the fact that a test "workdir"[1] attribute can not be used here, because of the 108 bytes limitation of the UNIX socket path (see ad9579aaa16). There's a fair assumption here that the temporary directory returned by Python's tempfile.mkdtemp() won't be anywhere close to 100 bytes. [1] https://avocado-framework.readthedocs.io/en/68.0/api/test/avocado.html#avocado.Test.workdir Signed-off-by: Cleber Rosa --- tests/acceptance/vnc.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py index 064ceabcc1..675fd507ed 100644 --- a/tests/acceptance/vnc.py +++ b/tests/acceptance/vnc.py @@ -8,6 +8,10 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. +import os +import tempfile +import shutil + from avocado_qemu import Test @@ -34,8 +38,16 @@ class Vnc(Test): self.assertEqual(set_password_response['error']['desc'], 'Could not set password') +class VncUnixSocket(Test): + + def setUp(self): + super(VncUnixSocket, self).setUp() + self.socket_dir = tempfile.mkdtemp() + self.socket_path = os.path.join(self.socket_dir, 'vnc-socket') + def test_vnc_change_password_requires_a_password(self): - self.vm.add_args('-nodefaults', '-S', '-vnc', ':0') + self.vm.add_args('-nodefaults', '-S', + '-vnc', 'unix:%s' % self.socket_path) self.vm.launch() self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled']) set_password_response = self.vm.qmp('change', @@ -49,7 +61,8 @@ class Vnc(Test): 'Could not set password') def test_vnc_change_password(self): - self.vm.add_args('-nodefaults', '-S', '-vnc', ':0,password') + self.vm.add_args('-nodefaults', '-S', + '-vnc', 'unix:%s,password' % self.socket_path) self.vm.launch() self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled']) set_password_response = self.vm.qmp('change', @@ -57,3 +70,6 @@ class Vnc(Test): target='password', arg='new_password') self.assertEqual(set_password_response['return'], {}) + + def tearDown(self): + shutil.rmtree(self.socket_dir) From patchwork Fri Jun 7 15:22:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10982441 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5661924 for ; Fri, 7 Jun 2019 17:10:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D63A28B86 for ; Fri, 7 Jun 2019 17:10:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9162928B8E; Fri, 7 Jun 2019 17:10:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3658928B86 for ; Fri, 7 Jun 2019 17:10:54 +0000 (UTC) Received: from localhost ([::1]:49682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZIOD-0007tj-8o for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jun 2019 13:10:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48829) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGhu-00059l-Jr for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGht-0006HA-Ny for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57019) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGhr-0006BU-07 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:03 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AACAE3079B8E; Fri, 7 Jun 2019 15:22:58 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-62.rdu2.redhat.com [10.10.122.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A089682708; Fri, 7 Jun 2019 15:22:56 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 11:22:21 -0400 Message-Id: <20190607152223.9467-7-crosa@redhat.com> In-Reply-To: <20190607152223.9467-1-crosa@redhat.com> References: <20190607152223.9467-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 07 Jun 2019 15:22:58 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 6/8] VNC Acceptance test: simplify test names X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The test name is composed of the class name and method name, so it looks like there's some redundancy here that we can eliminate. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé --- tests/acceptance/vnc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py index 675fd507ed..d32ae46685 100644 --- a/tests/acceptance/vnc.py +++ b/tests/acceptance/vnc.py @@ -45,7 +45,7 @@ class VncUnixSocket(Test): self.socket_dir = tempfile.mkdtemp() self.socket_path = os.path.join(self.socket_dir, 'vnc-socket') - def test_vnc_change_password_requires_a_password(self): + def test_change_password_requires_a_password(self): self.vm.add_args('-nodefaults', '-S', '-vnc', 'unix:%s' % self.socket_path) self.vm.launch() @@ -60,7 +60,7 @@ class VncUnixSocket(Test): self.assertEqual(set_password_response['error']['desc'], 'Could not set password') - def test_vnc_change_password(self): + def test_change_password(self): self.vm.add_args('-nodefaults', '-S', '-vnc', 'unix:%s,password' % self.socket_path) self.vm.launch() From patchwork Fri Jun 7 15:22:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10982431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE698924 for ; Fri, 7 Jun 2019 17:06:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B91BC28B3E for ; Fri, 7 Jun 2019 17:06:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABF6028B68; Fri, 7 Jun 2019 17:06:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5BA9F28B3E for ; Fri, 7 Jun 2019 17:06:02 +0000 (UTC) Received: from localhost ([::1]:49658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZIJV-0003Oy-3J for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jun 2019 13:06:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48788) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGhp-00053g-Sf for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGho-000693-P3 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32878) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGho-00067Z-Jm for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:00 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3AA73082145; Fri, 7 Jun 2019 15:22:59 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-62.rdu2.redhat.com [10.10.122.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB8AD82708; Fri, 7 Jun 2019 15:22:58 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 11:22:22 -0400 Message-Id: <20190607152223.9467-8-crosa@redhat.com> In-Reply-To: <20190607152223.9467-1-crosa@redhat.com> References: <20190607152223.9467-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 07 Jun 2019 15:22:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 7/8] VNC Acceptance test: check protocol version X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This goes a bit further than the other tests, and does a basic (read only) interaction with the VNC protocol. This is not a enough to perform a handshake, but enough to make sure that the socket is somewhat operational and that the expected initial step of the handshake is performed by the server and that the version matches. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta --- tests/acceptance/vnc.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py index d32ae46685..b000446d7c 100644 --- a/tests/acceptance/vnc.py +++ b/tests/acceptance/vnc.py @@ -11,6 +11,7 @@ import os import tempfile import shutil +import socket from avocado_qemu import Test @@ -71,5 +72,16 @@ class VncUnixSocket(Test): arg='new_password') self.assertEqual(set_password_response['return'], {}) + def test_protocol_version(self): + self.vm.add_args('-nodefaults', '-S', + '-vnc', 'unix:%s' % self.socket_path) + self.vm.launch() + self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled']) + client = socket.socket(socket.AF_UNIX) + client.connect(self.socket_path) + expected = b'RFB 003.008' + actual = client.recv(len(expected)) + self.assertEqual(expected, actual, "Wrong protocol version") + def tearDown(self): shutil.rmtree(self.socket_dir) From patchwork Fri Jun 7 15:22:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10982365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 879A013AD for ; Fri, 7 Jun 2019 16:28:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7602326222 for ; Fri, 7 Jun 2019 16:28:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A373289EB; Fri, 7 Jun 2019 16:28:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A45126222 for ; Fri, 7 Jun 2019 16:28:56 +0000 (UTC) Received: from localhost ([::1]:49380 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHjb-0006bp-QA for patchwork-qemu-devel@patchwork.kernel.org; Fri, 07 Jun 2019 12:28:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48883) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZGi5-0005V2-78 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZGi4-0006ZC-1o for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52647) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZGi3-0006Xx-Se for qemu-devel@nongnu.org; Fri, 07 Jun 2019 11:23:15 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D4F822386B; Fri, 7 Jun 2019 15:23:02 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-62.rdu2.redhat.com [10.10.122.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2110E842B8; Fri, 7 Jun 2019 15:23:00 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 11:22:23 -0400 Message-Id: <20190607152223.9467-9-crosa@redhat.com> In-Reply-To: <20190607152223.9467-1-crosa@redhat.com> References: <20190607152223.9467-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 07 Jun 2019 15:23:10 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 8/8] Migration acceptance test: reduce the possibility of port collisions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The avocado.utils.network.find_free_port() will by default attempt to return the first port given in the range, if it seems to be available. Let's reduce the probability of collisions by picking a random port by default. As a side note, this behavior has changed in a recent Avocado version, and the default use will then be equivalent to this proposed change. Reference: https://avocado-framework.readthedocs.io/en/68.0/api/utils/avocado.utils.html#avocado.utils.network.find_free_port Reference: https://github.com/avocado-framework/avocado/commit/f232e4505f7cfefc513449e0b97790b517275da7 Signed-off-by: Cleber Rosa --- tests/acceptance/migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index a44c1ae58f..b2a5767348 100644 --- a/tests/acceptance/migration.py +++ b/tests/acceptance/migration.py @@ -25,7 +25,7 @@ class Migration(Test): return vm.command('query-migrate')['status'] in ('completed', 'failed') def _get_free_port(self): - port = network.find_free_port() + port = network.find_free_port(sequent=False) if port is None: self.cancel('Failed to find a free port') return port