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: 1112062 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L7Lc3LW5z9s7h for ; Sat, 8 Jun 2019 02:30:47 +1000 (AEST) Received: from localhost ([::1]:49382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHlN-00078x-O4 for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2019 12:30:45 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: 1112078 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L7YC4rkLz9s7h for ; Sat, 8 Jun 2019 02:39:59 +1000 (AEST) Received: from localhost ([::1]:49488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHuG-0005ot-7p for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2019 12:39:56 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: 1112040 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L77z4lbZz9s7h for ; Sat, 8 Jun 2019 02:21:35 +1000 (AEST) Received: from localhost ([::1]:49310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHcS-0007zB-NM for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2019 12:21:33 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: 1112041 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L78W5WQnz9s7h for ; Sat, 8 Jun 2019 02:22:03 +1000 (AEST) Received: from localhost ([::1]:49346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHcv-0000qb-SE for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2019 12:22:01 -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-Dau?= =?utf-8?b?ZMOp?= , Caio Carrara , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: 1112043 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L7JZ1fQ4z9s7h for ; Sat, 8 Jun 2019 02:29:02 +1000 (AEST) Received: from localhost ([::1]:49370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHjg-0005cp-8J for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2019 12:29:00 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: 1112099 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L8DB3P64z9s7h for ; Sat, 8 Jun 2019 03:10:17 +1000 (AEST) Received: from localhost ([::1]:49670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZINb-0005bd-QJ for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2019 13:10:15 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: 1112095 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L85V45zxz9s7h for ; Sat, 8 Jun 2019 03:04:29 +1000 (AEST) Received: from localhost ([::1]:49638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZIHz-0000t4-3S for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2019 13:04:27 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: 1112042 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45L7HZ4JzXz9s7h for ; Sat, 8 Jun 2019 02:28:10 +1000 (AEST) Received: from localhost ([::1]:49360 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZHin-0004R6-Gq for incoming@patchwork.ozlabs.org; Fri, 07 Jun 2019 12:28:05 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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