From patchwork Wed Sep 11 00:42:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1160582 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 46SjmZ4t6Kz9sCJ for ; Wed, 11 Sep 2019 10:42:54 +1000 (AEST) Received: from localhost ([::1]:45658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7qii-0007Xv-AR for incoming@patchwork.ozlabs.org; Tue, 10 Sep 2019 20:42:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46327) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7qi9-0007XW-9G for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7qi7-00080R-7b for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35958) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7qi7-00080C-33 for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:15 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4953030A7B83 for ; Wed, 11 Sep 2019 00:42:14 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-121-171.rdu2.redhat.com [10.10.121.171]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 827A560166; Wed, 11 Sep 2019 00:42:13 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2019 20:42:01 -0400 Message-Id: <20190911004204.29286-2-crosa@redhat.com> In-Reply-To: <20190911004204.29286-1-crosa@redhat.com> References: <20190911004204.29286-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 11 Sep 2019 00:42:14 +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/4] tests/acceptance/cpu_queries.py: cleanups 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: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , Eduardo Habkost , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Simple cleanups for debugging code that is not being used. Signed-off-by: Cleber Rosa --- tests/acceptance/cpu_queries.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/acceptance/cpu_queries.py b/tests/acceptance/cpu_queries.py index e71edec39f..a9ac3d692e 100644 --- a/tests/acceptance/cpu_queries.py +++ b/tests/acceptance/cpu_queries.py @@ -8,8 +8,6 @@ # 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 logging - from avocado_qemu import Test class QueryCPUModelExpansion(Test): @@ -24,7 +22,6 @@ class QueryCPUModelExpansion(Test): cpus = self.vm.command('query-cpu-definitions') for c in cpus: - print(repr(c)) self.assertNotIn('', c['unavailable-features'], c['name']) for c in cpus: From patchwork Wed Sep 11 00:42:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1160583 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 46Sjmf6wtrz9sCJ for ; Wed, 11 Sep 2019 10:42:58 +1000 (AEST) Received: from localhost ([::1]:45664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7qim-0007ak-J4 for incoming@patchwork.ozlabs.org; Tue, 10 Sep 2019 20:42:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46332) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7qi9-0007XY-DE for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7qi7-00080f-VF for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40668) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7qi7-00080V-Qc for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:15 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30C9B30607E5 for ; Wed, 11 Sep 2019 00:42:15 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-121-171.rdu2.redhat.com [10.10.121.171]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B5F360166; Wed, 11 Sep 2019 00:42:14 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2019 20:42:02 -0400 Message-Id: <20190911004204.29286-3-crosa@redhat.com> In-Reply-To: <20190911004204.29286-1-crosa@redhat.com> References: <20190911004204.29286-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 11 Sep 2019 00:42:15 +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/4] tests/acceptance/cpu_queries.py: tag test as x86_64 specific 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: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , Eduardo Habkost , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is an usability improvement, and prevents the test from being automatically run with some not supported targets (say on an ppc64le or aarch64 host). Actually, the x86_64 tagging is a little white lie, because in theory, at least parts of the test, such as the query-cpu-model-expansion query, should also work on s390x. But, that is actually failing, so a future development round will attempt to make tests run on all possible supported targets. Signed-off-by: Cleber Rosa --- tests/acceptance/cpu_queries.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/acceptance/cpu_queries.py b/tests/acceptance/cpu_queries.py index a9ac3d692e..1028588920 100644 --- a/tests/acceptance/cpu_queries.py +++ b/tests/acceptance/cpu_queries.py @@ -13,6 +13,8 @@ from avocado_qemu import Test class QueryCPUModelExpansion(Test): """ Run query-cpu-model-expansion for each CPU model, and validate results + + :avocado: tags=arch:x86_64 """ def test(self): From patchwork Wed Sep 11 00:42:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1160585 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 46Sjqj0ppvz9sCJ for ; Wed, 11 Sep 2019 10:45:35 +1000 (AEST) Received: from localhost ([::1]:45680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7qlH-0001tJ-1X for incoming@patchwork.ozlabs.org; Tue, 10 Sep 2019 20:45:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46343) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7qi9-0007XZ-Lp for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7qi8-00080u-SJ for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50234) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7qi8-00080l-Mz for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:16 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1939B197BCEF for ; Wed, 11 Sep 2019 00:42:16 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-121-171.rdu2.redhat.com [10.10.121.171]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 54653601A5; Wed, 11 Sep 2019 00:42:15 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2019 20:42:03 -0400 Message-Id: <20190911004204.29286-4-crosa@redhat.com> In-Reply-To: <20190911004204.29286-1-crosa@redhat.com> References: <20190911004204.29286-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Wed, 11 Sep 2019 00:42:16 +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/4] tests/acceptance/cpu_queries.py: add machine tag 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: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , Eduardo Habkost , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is for informational / filtering purposes only, that is, allows one to run all tests with machine model "none". Signed-off-by: Cleber Rosa --- tests/acceptance/cpu_queries.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance/cpu_queries.py b/tests/acceptance/cpu_queries.py index 1028588920..9cd6f553ff 100644 --- a/tests/acceptance/cpu_queries.py +++ b/tests/acceptance/cpu_queries.py @@ -15,6 +15,7 @@ class QueryCPUModelExpansion(Test): Run query-cpu-model-expansion for each CPU model, and validate results :avocado: tags=arch:x86_64 + :avocado: tags=machine:none """ def test(self): From patchwork Wed Sep 11 00:42:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1160586 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 46SjsX3RXYz9sCJ for ; Wed, 11 Sep 2019 10:47:12 +1000 (AEST) Received: from localhost ([::1]:45694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7qms-00037G-AB for incoming@patchwork.ozlabs.org; Tue, 10 Sep 2019 20:47:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46364) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7qiA-0007Xx-SQ for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7qi9-00081F-PP for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41722) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7qi9-00080y-Ki for qemu-devel@nongnu.org; Tue, 10 Sep 2019 20:42:17 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 017453174640 for ; Wed, 11 Sep 2019 00:42:17 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-121-171.rdu2.redhat.com [10.10.121.171]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3CA3760166; Wed, 11 Sep 2019 00:42:16 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2019 20:42:04 -0400 Message-Id: <20190911004204.29286-5-crosa@redhat.com> In-Reply-To: <20190911004204.29286-1-crosa@redhat.com> References: <20190911004204.29286-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 11 Sep 2019 00:42:17 +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/4] tests/acceptance/cpu_queries.py: minor optmizations 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: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , Eduardo Habkost , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This avoids the second loop over the cpus, and reuses some of the variables. Signed-off-by: Cleber Rosa --- tests/acceptance/cpu_queries.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/cpu_queries.py b/tests/acceptance/cpu_queries.py index 9cd6f553ff..54aa310fb8 100644 --- a/tests/acceptance/cpu_queries.py +++ b/tests/acceptance/cpu_queries.py @@ -25,9 +25,8 @@ class QueryCPUModelExpansion(Test): cpus = self.vm.command('query-cpu-definitions') for c in cpus: - self.assertNotIn('', c['unavailable-features'], c['name']) - - for c in cpus: - model = {'name': c['name']} - e = self.vm.command('query-cpu-model-expansion', model=model, type='full') - self.assertEquals(e['model']['name'], c['name']) + model_name = c['name'] + self.assertNotIn('', c['unavailable-features'], model_name) + e = self.vm.command('query-cpu-model-expansion', + model={'name': model_name}, type='full') + self.assertEquals(e['model']['name'], model_name)