From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576562143; cv=none; d=zohomail.com; s=zohoarc; b=m+Vd+aDzNvTjCe00Q9FDqkGXUDobyWXBkpXL2yYPajbE8Lvg9kU1Ile7f0bABzdLvr6gr/kbHSq2hRgHnn7fH3q1Dkv94H2Yswuf3jjtXMdJl4m3+xLKuphBiVbCZhnqg7obh4U90irDG1uKlpZHL9+1h6/l0EsWwkz/kPVkd4g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576562143; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MV0fOidRF7C4EAztP9ZWauegvPnXcw1LymAIIRWE6Bk=; b=fGt/Xf9DBexhVdEx1LNSou0A4ahQP2DKQ3jFKudqT18LOCn/1h8A1XwtNpXCxO43A/6NB9+wwyl+puCY2PUb7IfmLRTLmVfIaZCVx2FL7Zb1FD3uHyvEVwK67GYQvJnkgsGtMHxxndDKcnPVkTpcvs6W3rrwx9y4ZaJNBnZl68Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576562143517714.8789049575737; Mon, 16 Dec 2019 21:55:43 -0800 (PST) Received: from localhost ([::1]:36320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5pe-0007pr-9j for importer@patchew.org; Tue, 17 Dec 2019 00:55:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51997) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5Cx-0002jL-HV for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5Cw-0002nv-5n for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:43 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:48702 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5Cw-0002mR-36 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:42 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-261-NysG47SINh-ne9G14LVJoA-1; Tue, 17 Dec 2019 00:15:39 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C7328107ACC4; Tue, 17 Dec 2019 05:15:37 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 10EFD19C4F; Tue, 17 Dec 2019 05:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MV0fOidRF7C4EAztP9ZWauegvPnXcw1LymAIIRWE6Bk=; b=bOydHx+tbMG5ap9ijuh692YQVet2yPdYcRe2BDvvd0NjuXFR5qi/GDjQkSGJxSZ7LyBVVx L4LIDbiDLM39ib/s3Ghr0AjW/vSktgNoDXW3nLadIb1e7D649ibfhSrnwkDR/EVKYAYWRZ 52cSjpblo8C/GDrovY9l1zbrL1xluZQ= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 01/15] tests/boot_linux_console: Fetch assets from Debian snapshot archives Date: Tue, 17 Dec 2019 00:15:07 -0500 Message-Id: <20191217051521.1239-2-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: NysG47SINh-ne9G14LVJoA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 The kernel packaged was fetched from an unstable repository. Use the stable snapshot archive instead. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20191126223810.20180-2-philmd@redhat.com> Tested-by: Willian Rampazzo Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- tests/acceptance/boot_linux_console.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 7e41cebd47..752f776f68 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -479,7 +479,8 @@ class BootLinuxConsole(Test): :avocado: tags=3Darch:m68k :avocado: tags=3Dmachine:q800 """ - deb_url =3D ('http://ftp.ports.debian.org/debian-ports/pool-m68k/m= ain' + deb_url =3D ('https://snapshot.debian.org/archive/debian-ports' + '/20191021T083923Z/pool-m68k/main' '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.ude= b') deb_hash =3D '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' try: --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576560423; cv=none; d=zohomail.com; s=zohoarc; b=XFL/RObpIO3rWge0RWfjyevpv89uEqZ2eXOeI+QDbkerGfiTksPZ+B5nwnUl0cGjX8AJBpmkrHMDqdBeGQDncTSlhXZKjeEx+1Jes4thaQ40OBoSBgVhEuQjhZ6bcpho+XC0Uvm3YBXzg/DEFdgIqHK/MdT9SNGuOshUovWfquQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576560423; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6ic3deE5y6eIQbqC0tVIdHdqf4VgW/cC1BqYE4plDLY=; b=Zi8e8Ple1ZMoDjfZf42T030iE/7gNvttJIeEiWwKm3VEFzIcdwvQYxZkbtUQNbJhn/VeCPBgF+NrEgBevmVU4jGDbZNKuT9SpA9PvJ6F25yY6zynCtAePhdRGee4RLdv9WCbY6AcIvmZq6D9Jv8oPFNQek3lGNhythoVi1QuuR8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576560423351886.4712720802811; Mon, 16 Dec 2019 21:27:03 -0800 (PST) Received: from localhost ([::1]:35802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5Nt-0001sW-NS for importer@patchew.org; Tue, 17 Dec 2019 00:27:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52049) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5D0-0002py-Um for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5Cz-0002zy-RB for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:46 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:35197 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5Cz-0002xk-Mm for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:45 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-139-fTAQ3GXEOa-9pbRWgeSv6Q-1; Tue, 17 Dec 2019 00:15:43 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D9AE0477; Tue, 17 Dec 2019 05:15:41 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B2CA19C4F; Tue, 17 Dec 2019 05:15:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6ic3deE5y6eIQbqC0tVIdHdqf4VgW/cC1BqYE4plDLY=; b=VE3KhuZokh/ngjVsKinFOEkXeKhMDa3VsDRWpLiB5cFrXuGYdykCKbimcOfZhzcTKd5Ine RKfJplo33LH4rGkjYbYDDXGbO+kyRhlY8YU1abS5WGFwy8z0UA5EeivRO/H6qyoTFBEtqd MbGVK0NG9A6OD8WHac3iYwXBAEoYySo= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 02/15] Revert "Acceptance test: cancel test if m68k kernel packages goes missing" Date: Tue, 17 Dec 2019 00:15:08 -0500 Message-Id: <20191217051521.1239-3-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: fTAQ3GXEOa-9pbRWgeSv6Q-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Now than we use the stable snapshot archive, we can remove this check. This reverts commit d2499aca4bac613d837e2720e7bbe3378bc91245. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20191126223810.20180-3-philmd@redhat.com> Tested-by: Willian Rampazzo Signed-off-by: Eduardo Habkost Signed-off-by: Cleber Rosa --- tests/acceptance/boot_linux_console.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 752f776f68..ab4c8a5e5a 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -483,10 +483,7 @@ class BootLinuxConsole(Test): '/20191021T083923Z/pool-m68k/main' '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.ude= b') deb_hash =3D '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' - try: - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - except OSError as exp: - self.cancel(exp) + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) kernel_path =3D self.extract_from_deb(deb_path, '/boot/vmlinux-5.3.0-1-m68k') =20 --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576561645; cv=none; d=zohomail.com; s=zohoarc; b=WVGxyytD2ujdsbHzN84KmKhCtMTHUOlqWX/Xp29yZdgNGHpaB0yA6uJDmdVYXRLHeZ+szty/VmjIhUpMJOlQUB1Lfzmaev3C2SXx2hpnUKtSUUxbXz37fv9Me2d6pMoCCL8U9mNVOR0lJMyvoVZ8SU7+K8ElM744HwoyNi91Ekg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576561645; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BXjHJ/nHmfAHIatMjaNdnTAvIONIZN05s8S26P3Z/mo=; b=NqdKOROK1kb5LmGgacBjhHlYV7mp2rBGCDxA5fqQK8zLm8VVCG032m3dG9rsNx8ROaUw50fmrUCc8QkRgcmbQ0zUzmrsAPWUrz99pXU8Tb1bgjo5hyQwUZ+CITb5Juj/XAvBo3Hf0VwX7Ffdg++DsXBFqe2yct3JvkJ0COEnHac= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576561645700178.24617457934914; Mon, 16 Dec 2019 21:47:25 -0800 (PST) Received: from localhost ([::1]:36144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5hc-00058l-AQ for importer@patchew.org; Tue, 17 Dec 2019 00:47:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52137) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5D8-000324-95 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5D7-0003MW-2k for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:54 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:54727 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5D6-0003LD-Vm for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:15:53 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-394-n2n22fOBN5eOqTM-Hs74IA-1; Tue, 17 Dec 2019 00:15:49 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4554A189CD01; Tue, 17 Dec 2019 05:15:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4194819C4F; Tue, 17 Dec 2019 05:15:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BXjHJ/nHmfAHIatMjaNdnTAvIONIZN05s8S26P3Z/mo=; b=ZnsJfw10RQn44VAjOmihnWacJ3w1p8P+phYGXVD+28QlwwOXSfvgY2CjlSad6APfpdW1Fx t1sfB7ivwd5VIUfDh66CeW8PsAQhkqyVeJFPJh7GFT1RmnyTwgLv2U2cj8fs38DHzWpyXv 2iNzklFdlMkXIcFH01GRO9leHACb70A= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 03/15] analyze-migration.py: fix find() type error Date: Tue, 17 Dec 2019 00:15:09 -0500 Message-Id: <20191217051521.1239-4-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: n2n22fOBN5eOqTM-Hs74IA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Traceback (most recent call last): File "../scripts/analyze-migration.py", line 611, in dump.read(desc_only =3D True) File "../scripts/analyze-migration.py", line 513, in read self.load_vmsd_json(file) File "../scripts/analyze-migration.py", line 556, in load_vmsd_json vmsd_json =3D file.read_migration_debug_json() File "../scripts/analyze-migration.py", line 89, in read_migration_debug_= json nulpos =3D data.rfind("\0") TypeError: argument should be integer or bytes-like object, not 'str' Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20191127101038.327080-2-marcandre.lureau@redhat.com> Signed-off-by: Eduardo Habkost Signed-off-by: Cleber Rosa --- scripts/analyze-migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index e527eb168e..2b835d9b70 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -86,8 +86,8 @@ class MigrationFile(object): =20 # Find the last NULL byte, then the first brace after that. This s= hould # be the beginning of our JSON data. - nulpos =3D data.rfind("\0") - jsonpos =3D data.find("{", nulpos) + nulpos =3D data.rfind(b'\0') + jsonpos =3D data.find(b'{', nulpos) =20 # Check backwards from there and see whether we guessed right self.file.seek(datapos + jsonpos - 5, 0) --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576560565; cv=none; d=zohomail.com; s=zohoarc; b=PQrQVItjkY9BrH8B4w8HPJg5KOnA5Tv6Y0suUJ46PjmwQHFSoP+cZ+Oa0A8r5zLbAvUYz8gVODSeMvGXWrqoXHgRkmSiXeaoHBZ7ITjNaS8x0cZ2wuz8+XjFlJw+Clu9uksi8i4qZT4lHdquwfMkT+SlQyvtOjVg+hGHqPLQMBY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576560565; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jnxf8sfzIAVFpqegiNwwqTzgx0xhyT5dLDF1Z50dmzM=; b=AIaogwP63AyTE9pfhFTLncIB+hVvnwPUc0lLyAHCjfxA0rSG0MbxLAtdjh3aK41+EuSY8xqA7HIEndizOY9FFL4tzeAgQa8nHggjHavRjm4Nva16lx71EbfiUwoOJCdFNhmUT6ogYko2QQp4T6HAos/FEmVyNN3fqj84GWS9Bgg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576560565704495.3303314461101; Mon, 16 Dec 2019 21:29:25 -0800 (PST) Received: from localhost ([::1]:35838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5Q9-0005iM-FE for importer@patchew.org; Tue, 17 Dec 2019 00:29:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52261) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5DJ-0003Kz-U5 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5DI-0003cj-Ge for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:05 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28556 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5DI-0003bC-DK for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:04 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-40-1VB2ToWuMsW5DgTq33ZYxQ-1; Tue, 17 Dec 2019 00:15:58 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1A3BB8017DF; Tue, 17 Dec 2019 05:15:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A17F419C4F; Tue, 17 Dec 2019 05:15:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jnxf8sfzIAVFpqegiNwwqTzgx0xhyT5dLDF1Z50dmzM=; b=HaS25IoO696Uhc6BNZFao/EL591fk5l5A3NrJOe53X9902e8+eDU2XlbeZmcO9UMlIyYzO gh5HkMqKw0vnr6aS/FvRvN8U5YgDOxQbI+POceYg23R5JB0nNbTnf9nrj6Zkm+IHmh0aUU +3Yd18S6ztxAgmNy5GWr1i+j3P9eMc0= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 04/15] analyze-migration.py: replace numpy with python 3.2 Date: Tue, 17 Dec 2019 00:15:10 -0500 Message-Id: <20191217051521.1239-5-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 1VB2ToWuMsW5DgTq33ZYxQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Use int.from_bytes() from python 3.2 instead. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20191127101038.327080-3-marcandre.lureau@redhat.com> Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost Signed-off-by: Cleber Rosa --- scripts/analyze-migration.py | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index 2b835d9b70..96a31d3974 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Migration Stream Analyzer # @@ -17,12 +17,18 @@ # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, see . =20 -from __future__ import print_function -import numpy as np import json import os import argparse import collections +import struct +import sys + + +MIN_PYTHON =3D (3, 2) +if sys.version_info < MIN_PYTHON: + sys.exit("Python %s.%s or later is required.\n" % MIN_PYTHON) + =20 def mkdir_p(path): try: @@ -30,29 +36,26 @@ def mkdir_p(path): except OSError: pass =20 + class MigrationFile(object): def __init__(self, filename): self.filename =3D filename self.file =3D open(self.filename, "rb") =20 def read64(self): - return np.asscalar(np.fromfile(self.file, count=3D1, dtype=3D'>i8'= )[0]) + return int.from_bytes(self.file.read(8), byteorder=3D'big', signed= =3DTrue) =20 def read32(self): - return np.asscalar(np.fromfile(self.file, count=3D1, dtype=3D'>i4'= )[0]) + return int.from_bytes(self.file.read(4), byteorder=3D'big', signed= =3DTrue) =20 def read16(self): - return np.asscalar(np.fromfile(self.file, count=3D1, dtype=3D'>i2'= )[0]) + return int.from_bytes(self.file.read(2), byteorder=3D'big', signed= =3DTrue) =20 def read8(self): - return np.asscalar(np.fromfile(self.file, count=3D1, dtype=3D'>i1'= )[0]) + return int.from_bytes(self.file.read(1), byteorder=3D'big', signed= =3DTrue) =20 def readstr(self, len =3D None): - if len is None: - len =3D self.read8() - if len =3D=3D 0: - return "" - return np.fromfile(self.file, count=3D1, dtype=3D('S%d' % len))[0] + return self.readvar(len).decode('utf-8') =20 def readvar(self, size =3D None): if size is None: @@ -275,7 +278,7 @@ class VMSDFieldGeneric(object): return str(self.__str__()) =20 def __str__(self): - return " ".join("{0:02x}".format(ord(c)) for c in self.data) + return " ".join("{0:02x}".format(c) for c in self.data) =20 def getDict(self): return self.__str__() @@ -307,8 +310,8 @@ class VMSDFieldInt(VMSDFieldGeneric): =20 def read(self): super(VMSDFieldInt, self).read() - self.sdata =3D np.fromstring(self.data, count=3D1, dtype=3D(self.s= dtype))[0] - self.udata =3D np.fromstring(self.data, count=3D1, dtype=3D(self.u= dtype))[0] + self.sdata =3D int.from_bytes(self.data, byteorder=3D'big', signed= =3DTrue) + self.udata =3D int.from_bytes(self.data, byteorder=3D'big', signed= =3DFalse) self.data =3D self.sdata return self.data =20 @@ -363,7 +366,7 @@ class VMSDFieldStruct(VMSDFieldGeneric): array_len =3D field.pop('array_len') field['index'] =3D 0 new_fields.append(field) - for i in xrange(1, array_len): + for i in range(1, array_len): c =3D field.copy() c['index'] =3D i new_fields.append(c) --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576560713; cv=none; d=zohomail.com; s=zohoarc; b=Ty8wuW+8BXlYA0GE208J116O6k4Us/NyWtX+asLsJvL9prAP8XROyruy8MjjLTkFc4GpsZz9Lz35gwYyTX6mxz6hPAFzm/K2mcHwiajQI0D5WCZCxD3ouVBranZAjzZLFRwFQkPibLrzdcAulVQ5cUMaE/4ncSGkd/lDf5JODWQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576560713; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dUlDAtfcVLMRklp8hQ9k0o99XZdShJYWYb9iO1gCBC0=; b=BNp8mhcRmPY4rbD4gK4odo4oz4zxbbzvfN+EcmuEFidNsfPZQY8fRy1R01Jdb8l2C2lLHHkSylv+lvyU1OH2II39zyExqiQaSFhbp/jRGFdWD+2b27DwNFfdtXhsT7g7c6EhxM4BSyb1KMfTcLQnqlxHKRWlTdKkA+9OW6U47Q8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576560713359468.87070861790346; Mon, 16 Dec 2019 21:31:53 -0800 (PST) Received: from localhost ([::1]:35882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5SZ-0000v9-HV for importer@patchew.org; Tue, 17 Dec 2019 00:31:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52275) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5DK-0003Lk-Ae for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5DI-0003dY-N6 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:06 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:57254 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5DI-0003cJ-Id for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:04 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-6yVa4uJaNRKg78w-vX1snQ-1; Tue, 17 Dec 2019 00:16:02 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0DCBF800D4E; Tue, 17 Dec 2019 05:16:01 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 740D019C4F; Tue, 17 Dec 2019 05:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dUlDAtfcVLMRklp8hQ9k0o99XZdShJYWYb9iO1gCBC0=; b=NfUnYW5hvCFcgl+TViKGU82Il+NakXC2Yjc/AuxaftKkB2kxEMHKgKAGTTFrnQEAu76lIX kNWfVR52+MfZo/tEpQXUVL82SwNsEG8HBNgK7MP3V+mp/JhPZt7st05ny75Jncp1Y8bUwr llYBmbVYxu2L0NcVqp1ZYZKcBrEeqss= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 05/15] python/qemu: Add set_qmp_monitor() to QEMUMachine Date: Tue, 17 Dec 2019 00:15:11 -0500 Message-Id: <20191217051521.1239-6-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 6yVa4uJaNRKg78w-vX1snQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wainer dos Santos Moschetta The QEMUMachine VM has a monitor setup on which an QMP connection is always attempted on _post_launch() (executed by launch()). In case the QEMU process immediatly exits then the qmp.accept() (used to establish the connection) stalls until it reaches timeout and consequently an exception raises. That behavior is undesirable when, for instance, it needs to gather information from the QEMU binary ($ qemu -cpu list) or a test which launches the VM expecting its failure. This patch adds the set_qmp_monitor() method to QEMUMachine that allows turn off the creation of the monitor machinery on VM launch. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Message-Id: <20191211185536.16962-2-wainersm@redhat.com> [Cleber: trivial indentation fix] Signed-off-by: Cleber Rosa --- python/qemu/machine.py | 70 +++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index a4631d6934..734efd8536 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine.py @@ -104,6 +104,7 @@ class QEMUMachine(object): self._events =3D [] self._iolog =3D None self._socket_scm_helper =3D socket_scm_helper + self._qmp_set =3D True # Enable QMP monitor by default. self._qmp =3D None self._qemu_full_args =3D None self._test_dir =3D test_dir @@ -228,15 +229,16 @@ class QEMUMachine(object): self._iolog =3D iolog.read() =20 def _base_args(self): - if isinstance(self._monitor_address, tuple): - moncdev =3D "socket,id=3Dmon,host=3D%s,port=3D%s" % ( - self._monitor_address[0], - self._monitor_address[1]) - else: - moncdev =3D 'socket,id=3Dmon,path=3D%s' % self._vm_monitor - args =3D ['-chardev', moncdev, - '-mon', 'chardev=3Dmon,mode=3Dcontrol', - '-display', 'none', '-vga', 'none'] + args =3D ['-display', 'none', '-vga', 'none'] + if self._qmp_set: + if isinstance(self._monitor_address, tuple): + moncdev =3D "socket,id=3Dmon,host=3D%s,port=3D%s" % ( + self._monitor_address[0], + self._monitor_address[1]) + else: + moncdev =3D 'socket,id=3Dmon,path=3D%s' % self._vm_monitor + args.extend(['-chardev', moncdev, '-mon', + 'chardev=3Dmon,mode=3Dcontrol']) if self._machine is not None: args.extend(['-machine', self._machine]) if self._console_set: @@ -255,20 +257,21 @@ class QEMUMachine(object): =20 def _pre_launch(self): self._temp_dir =3D tempfile.mkdtemp(dir=3Dself._test_dir) - if self._monitor_address is not None: - self._vm_monitor =3D self._monitor_address - else: - self._vm_monitor =3D os.path.join(self._sock_dir, - self._name + "-monitor.sock") - self._remove_files.append(self._vm_monitor) self._qemu_log_path =3D os.path.join(self._temp_dir, self._name + = ".log") self._qemu_log_file =3D open(self._qemu_log_path, 'wb') =20 - self._qmp =3D qmp.QEMUMonitorProtocol(self._vm_monitor, - server=3DTrue) + if self._qmp_set: + if self._monitor_address is not None: + self._vm_monitor =3D self._monitor_address + else: + self._vm_monitor =3D os.path.join(self._sock_dir, + self._name + "-monitor.soc= k") + self._remove_files.append(self._vm_monitor) + self._qmp =3D qmp.QEMUMonitorProtocol(self._vm_monitor, server= =3DTrue) =20 def _post_launch(self): - self._qmp.accept() + if self._qmp: + self._qmp.accept() =20 def _post_shutdown(self): if self._qemu_log_file is not None: @@ -330,7 +333,8 @@ class QEMUMachine(object): Wait for the VM to power off """ self._popen.wait() - self._qmp.close() + if self._qmp: + self._qmp.close() self._load_io_log() self._post_shutdown() =20 @@ -346,12 +350,13 @@ class QEMUMachine(object): self._console_socket =3D None =20 if self.is_running(): - try: - if not has_quit: - self._qmp.cmd('quit') - self._qmp.close() - except: - self._popen.kill() + if self._qmp: + try: + if not has_quit: + self._qmp.cmd('quit') + self._qmp.close() + except: + self._popen.kill() self._popen.wait() =20 self._load_io_log() @@ -368,6 +373,21 @@ class QEMUMachine(object): =20 self._launched =3D False =20 + def set_qmp_monitor(self, enabled=3DTrue): + """ + Set the QMP monitor. + + @param enabled: if False, qmp monitor options will be removed from + the base arguments of the resulting QEMU command + line. Default is True. + @note: call this function before launch(). + """ + if enabled: + self._qmp_set =3D True + else: + self._qmp_set =3D False + self._qmp =3D None + def qmp(self, cmd, conv_keys=3DTrue, **args): """ Invoke a QMP command and return the response dict --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576562290; cv=none; d=zohomail.com; s=zohoarc; b=lxZ9F4BGyUC22XDSlqg1QwUbm5ih45Lj+jkAtbYrynP7P9cmaB2QBNxsNc3ukXR2D9OpVem+P19D/p8oAr5wSQpvSDroArJAWZsmTZ5/tb1sViPgm//cfY9hzC3z+9nUfuY4DOlo3ECqIPricD5z8p4P4UtFmCKNusT6UfaH8gY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576562290; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=i24ARHTdUb/kFP2sO5BlnTSQx1GdiC09hdnXO2+N7s4=; b=XAo5ZfRPMoAZKdU+ti31rr6Zq6Yxx0L4qdIpYT7HmH22xEdrD1ixcDNcnZVgOK9p1QgPoQKo0dWRRbGRsfNXeyzgmE9VN6IL+zrMEbHJGQt/W7DvU57aFpoTyjF6eWcQCZG98Fq52SH79OOuhUD2nUN1aEAftkVnbJd+FKTDoRU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576562290251248.9087537881934; Mon, 16 Dec 2019 21:58:10 -0800 (PST) Received: from localhost ([::1]:36344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5s1-0001XZ-1Z for importer@patchew.org; Tue, 17 Dec 2019 00:58:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52344) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5DO-0003Sh-LR for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5DN-0003iZ-60 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:10 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:37398 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5DN-0003i7-3B for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:09 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-311-7WT_CckMPsOE9vTomciKeg-1; Tue, 17 Dec 2019 00:16:06 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 02554477; Tue, 17 Dec 2019 05:16:05 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6897519C4F; Tue, 17 Dec 2019 05:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i24ARHTdUb/kFP2sO5BlnTSQx1GdiC09hdnXO2+N7s4=; b=D7LG+5pMiDdIGVjqO1OC5vGs6z69bQCOXchhr/XEJicz9cO8XQBgiR7S8s8KmMyqMrGBYr TcXbq21q3ItnAxTuuF4+JLCIJroQ04EzeXbArdFCzNWVjILBoW4qQD/3kT8+HDgGwcC/B4 sq8mHOgYjjXEAFeV8I19hvxPScaHvsY= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 06/15] tests/acceptance: Makes linux_initrd and empty_cpu_model use QEMUMachine Date: Tue, 17 Dec 2019 00:15:12 -0500 Message-Id: <20191217051521.1239-7-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 7WT_CckMPsOE9vTomciKeg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wainer dos Santos Moschetta On linux_initrd and empty_cpu_model tests the same effect of calling QEMU through run() to inspect the terminated process is achieved with a sequence of set_qmp_monitor() / launch() / wait() commands on an QEMUMachine object. This patch changes those tests to use QEMUMachine instead, so they follow the same pattern to launch QEMU found on other acceptance tests. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-Id: <20191211185536.16962-3-wainersm@redhat.com> Signed-off-by: Cleber Rosa --- tests/acceptance/empty_cpu_model.py | 12 ++++++------ tests/acceptance/linux_initrd.py | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/acceptance/empty_cpu_model.py b/tests/acceptance/empty_c= pu_model.py index 3f4f663582..a1e59e45e4 100644 --- a/tests/acceptance/empty_cpu_model.py +++ b/tests/acceptance/empty_cpu_model.py @@ -7,13 +7,13 @@ # # 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 subprocess from avocado_qemu import Test =20 class EmptyCPUModel(Test): def test(self): - cmd =3D [self.qemu_bin, '-S', '-display', 'none', '-machine', 'non= e', '-cpu', ''] - r =3D subprocess.run(cmd, stderr=3Dsubprocess.PIPE, stdout=3Dsubpr= ocess.PIPE) - self.assertEquals(r.returncode, 1, "QEMU exit code should be 1") - self.assertEquals(r.stdout, b'', "QEMU stdout should be empty") - self.assertNotEquals(r.stderr, b'', "QEMU stderr shouldn't be empt= y") + self.vm.add_args('-S', '-display', 'none', '-machine', 'none', '-c= pu', '') + self.vm.set_qmp_monitor(enabled=3DFalse) + self.vm.launch() + self.vm.wait() + self.assertEquals(self.vm.exitcode(), 1, "QEMU exit code should be= 1") + self.assertRegex(self.vm.get_log(), r'-cpu option cannot be empty') diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_init= rd.py index c61d9826a4..aaa4eb9698 100644 --- a/tests/acceptance/linux_initrd.py +++ b/tests/acceptance/linux_initrd.py @@ -10,7 +10,6 @@ =20 import logging import tempfile -from avocado.utils.process import run =20 from avocado_qemu import Test =20 @@ -41,13 +40,15 @@ class LinuxInitrd(Test): initrd.seek(max_size) initrd.write(b'\0') initrd.flush() - cmd =3D "%s -kernel %s -initrd %s -m 4096" % ( - self.qemu_bin, kernel_path, initrd.name) - res =3D run(cmd, ignore_status=3DTrue) - self.assertEqual(res.exit_status, 1) + self.vm.add_args('-kernel', kernel_path, '-initrd', initrd.nam= e, + '-m', '4096') + self.vm.set_qmp_monitor(enabled=3DFalse) + self.vm.launch() + self.vm.wait() + self.assertEqual(self.vm.exitcode(), 1) expected_msg =3D r'.*initrd is too large.*max: \d+, need %s.*'= % ( max_size + 1) - self.assertRegex(res.stderr_text, expected_msg) + self.assertRegex(self.vm.get_log(), expected_msg) =20 def test_with_2gib_file_should_work_with_linux_v4_16(self): """ --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576561747; cv=none; d=zohomail.com; s=zohoarc; b=LvSfgxl2a8lgBJlkoQrDW0spSaOWPO313JnS0cnuTjAnnarlkjkXdYxtnxNySr/CT6g3UQvBlL6VFnpFePMyuZ/gz7Fu0vPsCE4nIztwNtJdlL+FU1rjI/ZAEGtpiUaHf/16knj/LOrvUgydHs4o0cOeZAFhrMIWeNmVQ9QezQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576561747; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fQwK+2ggju9MLRI5wSEJQ1PDIjvpWcu6KEuH5srydJc=; b=jRIUO43tJbwleLVvfzMSEousTCGaXoxI620LVBCCq9FnpJd57SyZoSXyeC3RfGcWr4sDZRDHrJiN0E4PI354MzI95QXFxHCSbxIoPQaeQ3arr0oJOuF/UrpgoEUYljMSIEjva8AdLYVWbw+TCubp297wLW4sRfpMekm4GEus4hM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576561747990738.014516702596; Mon, 16 Dec 2019 21:49:07 -0800 (PST) Received: from localhost ([::1]:36162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5jG-0007mW-CY for importer@patchew.org; Tue, 17 Dec 2019 00:49:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52432) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5DY-0003j1-Fb for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5DW-0003q9-Ud for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:20 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28131 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5DW-0003pU-QX for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:18 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-244-VM2EWkGgM9qzCb6xGn4qqQ-1; Tue, 17 Dec 2019 00:16:16 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 049BC107ACC4; Tue, 17 Dec 2019 05:16:15 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D31519C4F; Tue, 17 Dec 2019 05:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fQwK+2ggju9MLRI5wSEJQ1PDIjvpWcu6KEuH5srydJc=; b=WU0h4WllAlYIA5kZeyCZ9YAuiHid9w6k2/aSYigv1ux8siyWT1SEtKF/FN9DUZN08pyrzm hkhR7OcBA7F1BUFtr+hXNtR2QssOm2fh0SBipnwC6zeynx0Yd499K8oH7brjDB2Jr1Rgo6 cyVhCKSNwIFiyfl0KAekm3PApSbHNX4= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 07/15] Acceptance test x86_cpu_model_versions: use default vm Date: Tue, 17 Dec 2019 00:15:13 -0500 Message-Id: <20191217051521.1239-8-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: VM2EWkGgM9qzCb6xGn4qqQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The default vm provided by the test, available as self.vm, serves the same purpose of the one obtained by self.get_vm(), but saves a line and matches the style of other tests. Signed-off-by: Cleber Rosa Message-Id: <20190924194501.9303-2-crosa@redhat.com> Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- tests/acceptance/x86_cpu_model_versions.py | 100 ++++++++++----------- 1 file changed, 46 insertions(+), 54 deletions(-) diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/= x86_cpu_model_versions.py index 5fc9ca4bc6..6eb977954d 100644 --- a/tests/acceptance/x86_cpu_model_versions.py +++ b/tests/acceptance/x86_cpu_model_versions.py @@ -25,10 +25,6 @@ import avocado_qemu import re =20 -def get_cpu_prop(vm, prop): - cpu_path =3D vm.command('query-cpus')[0].get('qom_path') - return vm.command('qom-get', path=3Dcpu_path, property=3Dprop) - class X86CPUModelAliases(avocado_qemu.Test): """ Validation of PC CPU model versions and CPU model aliases @@ -241,78 +237,74 @@ class CascadelakeArchCapabilities(avocado_qemu.Test): =20 :avocado: tags=3Darch:x86_64 """ + def get_cpu_prop(self, prop): + cpu_path =3D self.vm.command('query-cpus')[0].get('qom_path') + return self.vm.command('qom-get', path=3Dcpu_path, property=3Dprop) + def test_4_1(self): # machine-type only: - vm =3D self.get_vm() - vm.add_args('-S') - vm.set_machine('pc-i440fx-4.1') - vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don,chec= k=3Doff,enforce=3Doff') - vm.launch() - self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), + self.vm.add_args('-S') + self.vm.set_machine('pc-i440fx-4.1') + self.vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don= ,check=3Doff,enforce=3Doff') + self.vm.launch() + self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server should not ha= ve arch-capabilities') =20 def test_4_0(self): - vm =3D self.get_vm() - vm.add_args('-S') - vm.set_machine('pc-i440fx-4.0') - vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don,chec= k=3Doff,enforce=3Doff') - vm.launch() - self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), + self.vm.add_args('-S') + self.vm.set_machine('pc-i440fx-4.0') + self.vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don= ,check=3Doff,enforce=3Doff') + self.vm.launch() + self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server should not ha= ve arch-capabilities') =20 def test_set_4_0(self): # command line must override machine-type if CPU model is not vers= ioned: - vm =3D self.get_vm() - vm.add_args('-S') - vm.set_machine('pc-i440fx-4.0') - vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don,chec= k=3Doff,enforce=3Doff,+arch-capabilities') - vm.launch() - self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), + self.vm.add_args('-S') + self.vm.set_machine('pc-i440fx-4.0') + self.vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don= ,check=3Doff,enforce=3Doff,+arch-capabilities') + self.vm.launch() + self.assertTrue(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server,+arch-capabili= ties should have arch-capabilities') =20 def test_unset_4_1(self): - vm =3D self.get_vm() - vm.add_args('-S') - vm.set_machine('pc-i440fx-4.1') - vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don,chec= k=3Doff,enforce=3Doff,-arch-capabilities') - vm.launch() - self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), + self.vm.add_args('-S') + self.vm.set_machine('pc-i440fx-4.1') + self.vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don= ,check=3Doff,enforce=3Doff,-arch-capabilities') + self.vm.launch() + self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server,-arch-capabil= ities should not have arch-capabilities') =20 def test_v1_4_0(self): # versioned CPU model overrides machine-type: - vm =3D self.get_vm() - vm.add_args('-S') - vm.set_machine('pc-i440fx-4.0') - vm.add_args('-cpu', 'Cascadelake-Server-v1,x-force-features=3Don,c= heck=3Doff,enforce=3Doff') - vm.launch() - self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), + self.vm.add_args('-S') + self.vm.set_machine('pc-i440fx-4.0') + self.vm.add_args('-cpu', 'Cascadelake-Server-v1,x-force-features= =3Don,check=3Doff,enforce=3Doff') + self.vm.launch() + self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server-v1 should not= have arch-capabilities') =20 def test_v2_4_0(self): - vm =3D self.get_vm() - vm.add_args('-S') - vm.set_machine('pc-i440fx-4.0') - vm.add_args('-cpu', 'Cascadelake-Server-v2,x-force-features=3Don,c= heck=3Doff,enforce=3Doff') - vm.launch() - self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), - 'pc-i440fx-4.0 + Cascadelake-Server-v2 should hav= e arch-capabilities') + self.vm.add_args('-S') + self.vm.set_machine('pc-i440fx-4.0') + self.vm.add_args('-cpu', 'Cascadelake-Server-v2,x-force-features= =3Don,check=3Doff,enforce=3Doff') + self.vm.launch() + self.assertTrue(self.get_cpu_prop('arch-capabilities'), + 'pc-i440fx-4.0 + Cascadelake-Server-v2 should have= arch-capabilities') =20 def test_v1_set_4_0(self): # command line must override machine-type and versioned CPU model: - vm =3D self.get_vm() - vm.add_args('-S') - vm.set_machine('pc-i440fx-4.0') - vm.add_args('-cpu', 'Cascadelake-Server-v1,x-force-features=3Don,c= heck=3Doff,enforce=3Doff,+arch-capabilities') - vm.launch() - self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), - 'pc-i440fx-4.0 + Cascadelake-Server-v1,+arch-capa= bilities should have arch-capabilities') + self.vm.add_args('-S') + self.vm.set_machine('pc-i440fx-4.0') + self.vm.add_args('-cpu', 'Cascadelake-Server-v1,x-force-features= =3Don,check=3Doff,enforce=3Doff,+arch-capabilities') + self.vm.launch() + self.assertTrue(self.get_cpu_prop('arch-capabilities'), + 'pc-i440fx-4.0 + Cascadelake-Server-v1,+arch-capab= ilities should have arch-capabilities') =20 def test_v2_unset_4_1(self): - vm =3D self.get_vm() - vm.add_args('-S') - vm.set_machine('pc-i440fx-4.1') - vm.add_args('-cpu', 'Cascadelake-Server-v2,x-force-features=3Don,c= heck=3Doff,enforce=3Doff,-arch-capabilities') - vm.launch() - self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), + self.vm.add_args('-S') + self.vm.set_machine('pc-i440fx-4.1') + self.vm.add_args('-cpu', 'Cascadelake-Server-v2,x-force-features= =3Don,check=3Doff,enforce=3Doff,-arch-capabilities') + self.vm.launch() + self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server-v2,-arch-capa= bilities should not have arch-capabilities') --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576562362; cv=none; d=zohomail.com; s=zohoarc; b=AlZZgtv+ArAwnZnhSxIk2TFOL1GSxNMQy823lpX1YOxlLm882RNF6MsfecviJ+oCXTOlpgBSTD2oRg4uTUZxhX+6KT4P6B711vzJiJvjqiIOy3LNHqBtYYbZkB7eaXynMnUg3QPRORUBMS0C1wlJxOoCflA5FNJRgBZzCgGn+HQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576562362; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6e9dmtG6oZZcoSJJsYBqEqR/a1t6qZG4SswHex2xLR4=; b=CYQFXpOPeuDoVdCWrnjRTMZZRnhbguRwLX+1hrr/cOMvGXpzGbES9kn3K9r+8ztE9gI0nSEX5xVwVAU1do6yjK5/G8i4FSDZcDP6fF2d50jOxwcyZWE9at9McmVd+AqBYXgCSMFeEaRKOnse+4cm02iHPyKgZA5QJ4MsbCyZaLA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576562362273894.0275297288752; Mon, 16 Dec 2019 21:59:22 -0800 (PST) Received: from localhost ([::1]:36350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5tB-0002VL-2a for importer@patchew.org; Tue, 17 Dec 2019 00:59:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52484) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5Db-0003on-Rf for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5Da-0003uU-Ng for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:23 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:40376 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5Da-0003tN-Jc for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:22 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253-sHlM-8mtOMey6Axmo5VTOw-1; Tue, 17 Dec 2019 00:16:20 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E7807189CD01; Tue, 17 Dec 2019 05:16:18 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D9BC19C4F; Tue, 17 Dec 2019 05:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6e9dmtG6oZZcoSJJsYBqEqR/a1t6qZG4SswHex2xLR4=; b=LKcSwiHWDOwvGvJrLi12glOeLTVphzQQcPhrr8DaO7I+IgpDcEOc6AcOZWaA+NKNAlNqkv cqxkRr+qUArq4ri/cdYtzREZOdat+PLnGEVcBBY50L16fJW/Dy+PswOFVyP6v89ZoAwLft 2xqzdOc17p9Oq8bc7JPiymkirQXmQI4= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 08/15] Acceptance tests: introduce utility method for tags unique vals Date: Tue, 17 Dec 2019 00:15:14 -0500 Message-Id: <20191217051521.1239-9-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: sHlM-8mtOMey6Axmo5VTOw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Currently a test can describe the target architecture binary that it should primarily be run with, be setting a single tag value. The same approach is expected to be done with other QEMU aspects to be tested, for instance, the machine type and accelerator, so let's generalize the logic into a utility method. Signed-off-by: Cleber Rosa Message-Id: <20190924194501.9303-3-crosa@redhat.com> Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index 9a57c020d8..e676d9c4e7 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -100,14 +100,21 @@ def exec_command_and_wait_for_pattern(test, command, =20 =20 class Test(avocado.Test): + def _get_unique_tag_val(self, tag_name): + """ + Gets a tag value, if unique for a key + """ + vals =3D self.tags.get(tag_name, []) + if len(vals) =3D=3D 1: + return vals.pop() + return None + def setUp(self): self._vms =3D {} - arches =3D self.tags.get('arch', []) - if len(arches) =3D=3D 1: - arch =3D arches.pop() - else: - arch =3D None - self.arch =3D self.params.get('arch', default=3Darch) + + self.arch =3D self.params.get('arch', + default=3Dself._get_unique_tag_val('ar= ch')) + default_qemu_bin =3D pick_default_qemu_bin(arch=3Dself.arch) self.qemu_bin =3D self.params.get('qemu_bin', default=3Ddefault_qemu_bin) --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576561474; cv=none; d=zohomail.com; s=zohoarc; b=LK0EqWFbsDxhbK4p3FkkJDMkmDbZ3pvvxgIJ1G7eht/3GN4xMx/cH59RFFCaG/PYxWCNW9EMUffuadqK1lKEObCs7/oyaWmfJ1L57l4hizJgnQkUbp2ZSeqQFKdV+oXkQP8XmAwp+DESIewaNDSGf1cp7UsCM8UUQT/qUXNKet8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576561474; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8wwsqGiLqlqjiMgkEqDi8+fhC3CK1j2VFGXCxclEiaM=; b=fQe22ETv+NmHYC1RIzjINxp5CCEM29MSo2jzufV4G0v156dE+GTkr5ylPk5P4JU/ougHPtSvnIxcsKX8zw9l5xjtpihqchZ47gP5hYPnP6W0PytGiZCn8NcjCKgOphRyqzNfsHWeWE9k2owpGjeTiSEMF4byPnU61/N40wtb4IU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576561474323580.9042207592415; Mon, 16 Dec 2019 21:44:34 -0800 (PST) Received: from localhost ([::1]:36084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5eq-0001Js-M2 for importer@patchew.org; Tue, 17 Dec 2019 00:44:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52527) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5Dj-00040l-4N for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5Df-0003y7-W3 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:30 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:56164 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5Df-0003wR-Pt for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:27 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-qh97akbRPhyqyMIS_ivrAA-1; Tue, 17 Dec 2019 00:16:24 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1CC0F1005502; Tue, 17 Dec 2019 05:16:23 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E25419C4F; Tue, 17 Dec 2019 05:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8wwsqGiLqlqjiMgkEqDi8+fhC3CK1j2VFGXCxclEiaM=; b=RcUs3HNA08N0wDZDPlvydnjNn+2jSaO/idy7YenAEALFJD+akS6SJu6HEg32D2aeJ90s66 2W6Ug4+mEqIFAH7C1uOmNT5npb+gFE7iDqTWkA9eInQTysZDBPxowBjvP7OzclRGEHf5Ms UVptNUQ+KLWa2eL0iWlrBPTRKq9b3i4= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 09/15] Acceptance tests: use avocado tags for machine type Date: Tue, 17 Dec 2019 00:15:15 -0500 Message-Id: <20191217051521.1239-10-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: qh97akbRPhyqyMIS_ivrAA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The same way the arch tag is being used as a fallback for the arch parameter, let's do the same for QEMU's machine and avoid some boiler plate code. This is now possible because, since Avocado 72.0, it's possible to use tags with names that match the machine types on QEMU. Signed-off-by: Cleber Rosa Message-Id: <20191104151323.9883-4-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- docs/devel/testing.rst | 18 ++++++++ tests/acceptance/avocado_qemu/__init__.py | 5 ++ tests/acceptance/boot_linux_console.py | 19 +------- tests/acceptance/cpu_queries.py | 2 +- tests/acceptance/linux_initrd.py | 2 +- tests/acceptance/linux_ssh_mips_malta.py | 5 -- tests/acceptance/machine_m68k_nextcube.py | 21 ++------- tests/acceptance/machine_sparc_leon3.py | 3 +- tests/acceptance/ppc_prep_40p.py | 3 -- tests/acceptance/x86_cpu_model_versions.py | 53 ++++++++++++++++------ 10 files changed, 72 insertions(+), 59 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 8e981e062d..27f286858a 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -746,6 +746,17 @@ name. If one is not given explicitly, it will either = be set to ``None``, or, if the test is tagged with one (and only one) ``:avocado: tags=3Darch:VALUE`` tag, it will be set to ``VALUE``. =20 +machine +~~~~~~~ + +The machine type that will be set to all QEMUMachine instances created +by the test. + +The ``machine`` attribute will be set to the test parameter of the same +name. If one is not given explicitly, it will either be set to +``None``, or, if the test is tagged with one (and only one) +``:avocado: tags=3Dmachine:VALUE`` tag, it will be set to ``VALUE``. + qemu_bin ~~~~~~~~ =20 @@ -781,6 +792,13 @@ architecture of a kernel or disk image to boot a VM wi= th. This parameter has a direct relation with the ``arch`` attribute. If not given, it will default to None. =20 +machine +~~~~~~~ + +The machine type that will be set to all QEMUMachine instances created +by the test. + + qemu_bin ~~~~~~~~ =20 diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index e676d9c4e7..6618ea67c1 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -115,6 +115,9 @@ class Test(avocado.Test): self.arch =3D self.params.get('arch', default=3Dself._get_unique_tag_val('ar= ch')) =20 + self.machine =3D self.params.get('machine', + default=3Dself._get_unique_tag_val(= 'machine')) + default_qemu_bin =3D pick_default_qemu_bin(arch=3Dself.arch) self.qemu_bin =3D self.params.get('qemu_bin', default=3Ddefault_qemu_bin) @@ -136,6 +139,8 @@ class Test(avocado.Test): name =3D str(uuid.uuid4()) if self._vms.get(name) is None: self._vms[name] =3D self._new_vm(*args) + if self.machine is not None: + self._vms[name].set_machine(self.machine) return self._vms[name] =20 def tearDown(self): diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index ab4c8a5e5a..9c6aa2040a 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -62,7 +62,6 @@ class BootLinuxConsole(Test): kernel_hash =3D '23bebd2680757891cf7adedb033532163a792495' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 - self.vm.set_machine('pc') self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' self.vm.add_args('-kernel', kernel_path, @@ -85,7 +84,6 @@ class BootLinuxConsole(Test): kernel_path =3D self.extract_from_deb(deb_path, '/boot/vmlinux-2.6.32-5-4kc-ma= lta') =20 - self.vm.set_machine('malta') self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' self.vm.add_args('-kernel', kernel_path, @@ -118,7 +116,6 @@ class BootLinuxConsole(Test): kernel_path =3D self.extract_from_deb(deb_path, '/boot/vmlinux-2.6.32-5-5kc-ma= lta') =20 - self.vm.set_machine('malta') self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' self.vm.add_args('-kernel', kernel_path, @@ -148,7 +145,6 @@ class BootLinuxConsole(Test): initrd_path =3D self.workdir + "rootfs.cpio" archive.gzip_uncompress(initrd_path_gz, initrd_path) =20 - self.vm.set_machine('malta') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'console=3DttyS0 console=3Dtty ' @@ -188,7 +184,6 @@ class BootLinuxConsole(Test): initrd_path =3D self.workdir + "rootfs.cpio" archive.gzip_uncompress(initrd_path_gz, initrd_path) =20 - self.vm.set_machine('malta') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'console=3DttyS0 console=3Dtty ' @@ -215,7 +210,6 @@ class BootLinuxConsole(Test): with open(kernel_path, 'wb') as f_out: shutil.copyfileobj(f_in, f_out) =20 - self.vm.set_machine('malta') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'mem=3D256m@@0x0 ' @@ -275,7 +269,6 @@ class BootLinuxConsole(Test): kernel_hash =3D '8c73e469fc6ea06a58dc83a628fc695b693b8493' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 - self.vm.set_machine('virt') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'console=3DttyAMA0') @@ -297,7 +290,6 @@ class BootLinuxConsole(Test): kernel_hash =3D 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 - self.vm.set_machine('virt') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'console=3DttyAMA0') @@ -310,7 +302,7 @@ class BootLinuxConsole(Test): def test_arm_emcraft_sf2(self): """ :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:emcraft_sf2 + :avocado: tags=3Dmachine:emcraft-sf2 :avocado: tags=3Dendian:little """ uboot_url =3D ('https://raw.githubusercontent.com/' @@ -324,7 +316,6 @@ class BootLinuxConsole(Test): spi_hash =3D '85f698329d38de63aea6e884a86fbde70890a78a' spi_path =3D self.fetch_asset(spi_url, asset_hash=3Dspi_hash) =20 - self.vm.set_machine('emcraft-sf2') self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE self.vm.add_args('-kernel', uboot_path, @@ -351,7 +342,6 @@ class BootLinuxConsole(Test): kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') =20 - self.vm.set_machine('raspi2') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + serial_kernel_cmdline[uart_id]) @@ -393,7 +383,6 @@ class BootLinuxConsole(Test): initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') archive.gzip_uncompress(initrd_path_gz, initrd_path) =20 - self.vm.set_machine('smdkc210') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'earlycon=3Dexynos4210,0x13800000 earlyprin= tk ' + @@ -414,7 +403,7 @@ class BootLinuxConsole(Test): def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x - :avocado: tags=3Dmachine:s390_ccw_virtio + :avocado: tags=3Dmachine:s390-ccw-virtio """ kernel_url =3D ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/s390x/os/i= mages' @@ -422,7 +411,6 @@ class BootLinuxConsole(Test): kernel_hash =3D 'e8e8439103ef8053418ef062644ffd46a7919313' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 - self.vm.set_machine('s390-ccw-virtio') self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dsclp0' self.vm.add_args('-nodefaults', @@ -444,7 +432,6 @@ class BootLinuxConsole(Test): =20 uncompressed_kernel =3D archive.uncompress(kernel_path, self.workd= ir) =20 - self.vm.set_machine('clipper') self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' self.vm.add_args('-vga', 'std', @@ -465,7 +452,6 @@ class BootLinuxConsole(Test): kernel_hash =3D '3fe04abfc852b66653b8c3c897a59a689270bc77' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 - self.vm.set_machine('pseries') self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dhvc0' self.vm.add_args('-kernel', kernel_path, @@ -487,7 +473,6 @@ class BootLinuxConsole(Test): kernel_path =3D self.extract_from_deb(deb_path, '/boot/vmlinux-5.3.0-1-m68k') =20 - self.vm.set_machine('q800') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'console=3DttyS0 vga=3Doff') diff --git a/tests/acceptance/cpu_queries.py b/tests/acceptance/cpu_queries= .py index af47d2795a..293dccb89a 100644 --- a/tests/acceptance/cpu_queries.py +++ b/tests/acceptance/cpu_queries.py @@ -20,8 +20,8 @@ class QueryCPUModelExpansion(Test): def test(self): """ :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:none """ - self.vm.set_machine('none') self.vm.add_args('-S') self.vm.launch() =20 diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_init= rd.py index aaa4eb9698..a3e54d3fc9 100644 --- a/tests/acceptance/linux_initrd.py +++ b/tests/acceptance/linux_initrd.py @@ -19,6 +19,7 @@ class LinuxInitrd(Test): Checks QEMU evaluates correctly the initrd file passed as -initrd opti= on. =20 :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc """ =20 timeout =3D 300 @@ -67,7 +68,6 @@ class LinuxInitrd(Test): initrd.write(b'\0') initrd.flush() =20 - self.vm.set_machine('pc') self.vm.set_console() kernel_command_line =3D 'console=3DttyS0' self.vm.add_args('-kernel', kernel_path, diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index fc13f9e4d4..1d570deb00 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -111,7 +111,6 @@ class LinuxSSH(Test): image_url, image_hash =3D self.get_image_info(endianess) image_path =3D self.fetch_asset(image_url, asset_hash=3Dimage_hash) =20 - self.vm.set_machine('malta') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'console=3DttyS0 root=3D/dev/sda1') @@ -215,7 +214,6 @@ class LinuxSSH(Test): def test_mips_malta32eb_kernel3_2_0(self): """ :avocado: tags=3Darch:mips - :avocado: tags=3Dmachine:malta :avocado: tags=3Dendian:big :avocado: tags=3Ddevice:pcnet32 """ @@ -224,7 +222,6 @@ class LinuxSSH(Test): def test_mips_malta32el_kernel3_2_0(self): """ :avocado: tags=3Darch:mipsel - :avocado: tags=3Dmachine:malta :avocado: tags=3Dendian:little :avocado: tags=3Ddevice:pcnet32 """ @@ -233,7 +230,6 @@ class LinuxSSH(Test): def test_mips_malta64eb_kernel3_2_0(self): """ :avocado: tags=3Darch:mips64 - :avocado: tags=3Dmachine:malta :avocado: tags=3Dendian:big :avocado: tags=3Ddevice:pcnet32 """ @@ -242,7 +238,6 @@ class LinuxSSH(Test): def test_mips_malta64el_kernel3_2_0(self): """ :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:malta :avocado: tags=3Dendian:little :avocado: tags=3Ddevice:pcnet32 """ diff --git a/tests/acceptance/machine_m68k_nextcube.py b/tests/acceptance/m= achine_m68k_nextcube.py index fcd2c58ee7..32cf571f94 100644 --- a/tests/acceptance/machine_m68k_nextcube.py +++ b/tests/acceptance/machine_m68k_nextcube.py @@ -43,6 +43,11 @@ def tesseract_available(expected_version): =20 =20 class NextCubeMachine(Test): + """ + :avocado: tags=3Darch:m68k + :avocado: tags=3Dmachine:next-cube + :avocado: tags=3Ddevice:framebuffer + """ =20 timeout =3D 15 =20 @@ -52,7 +57,6 @@ class NextCubeMachine(Test): rom_hash =3D 'b3534796abae238a0111299fc406a9349f7fee24' rom_path =3D self.fetch_asset(rom_url, asset_hash=3Drom_hash) =20 - self.vm.set_machine('next-cube') self.vm.add_args('-bios', rom_path) self.vm.launch() =20 @@ -66,11 +70,6 @@ class NextCubeMachine(Test): =20 @skipUnless(PIL_AVAILABLE, 'Python PIL not installed') def test_bootrom_framebuffer_size(self): - """ - :avocado: tags=3Darch:m68k - :avocado: tags=3Dmachine:next_cube - :avocado: tags=3Ddevice:framebuffer - """ screenshot_path =3D os.path.join(self.workdir, "dump.png") self.check_bootrom_framebuffer(screenshot_path) =20 @@ -80,11 +79,6 @@ class NextCubeMachine(Test): =20 @skipUnless(tesseract_available(3), 'tesseract v3 OCR tool not availab= le') def test_bootrom_framebuffer_ocr_with_tesseract_v3(self): - """ - :avocado: tags=3Darch:m68k - :avocado: tags=3Dmachine:next_cube - :avocado: tags=3Ddevice:framebuffer - """ screenshot_path =3D os.path.join(self.workdir, "dump.png") self.check_bootrom_framebuffer(screenshot_path) =20 @@ -101,11 +95,6 @@ class NextCubeMachine(Test): # that it is still alpha-level software. @skipUnless(tesseract_available(4), 'tesseract v4 OCR tool not availab= le') def test_bootrom_framebuffer_ocr_with_tesseract_v4(self): - """ - :avocado: tags=3Darch:m68k - :avocado: tags=3Dmachine:next_cube - :avocado: tags=3Ddevice:framebuffer - """ screenshot_path =3D os.path.join(self.workdir, "dump.png") self.check_bootrom_framebuffer(screenshot_path) =20 diff --git a/tests/acceptance/machine_sparc_leon3.py b/tests/acceptance/mac= hine_sparc_leon3.py index 298f1e25e6..f77e210ccb 100644 --- a/tests/acceptance/machine_sparc_leon3.py +++ b/tests/acceptance/machine_sparc_leon3.py @@ -16,7 +16,7 @@ class Leon3Machine(Test): def test_leon3_helenos_uimage(self): """ :avocado: tags=3Darch:sparc - :avocado: tags=3Dmachine:leon3 + :avocado: tags=3Dmachine:leon3_generic :avocado: tags=3Dbinfmt:uimage """ kernel_url =3D ('http://www.helenos.org/releases/' @@ -24,7 +24,6 @@ class Leon3Machine(Test): kernel_hash =3D 'a88c9cfdb8430c66650e5290a08765f9bf049a30' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 - self.vm.set_machine('leon3_generic') self.vm.set_console() self.vm.add_args('-kernel', kernel_path) =20 diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_4= 0p.py index 6f507fb0a6..b27572f212 100644 --- a/tests/acceptance/ppc_prep_40p.py +++ b/tests/acceptance/ppc_prep_40p.py @@ -39,7 +39,6 @@ class IbmPrep40pMachine(Test): drive_hash =3D 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb' drive_path =3D self.fetch_asset(drive_url, asset_hash=3Ddrive_hash) =20 - self.vm.set_machine('40p') self.vm.set_console() self.vm.add_args('-bios', bios_path, '-fda', drive_path) @@ -53,7 +52,6 @@ class IbmPrep40pMachine(Test): :avocado: tags=3Darch:ppc :avocado: tags=3Dmachine:40p """ - self.vm.set_machine('40p') self.vm.set_console() self.vm.add_args('-m', '192') # test fw_cfg =20 @@ -73,7 +71,6 @@ class IbmPrep40pMachine(Test): drive_hash =3D 'ac6fa2707d888b36d6fa64de6e7fe48e' drive_path =3D self.fetch_asset(drive_url, asset_hash=3Ddrive_hash, algorithm=3D'md5') - self.vm.set_machine('40p') self.vm.set_console() self.vm.add_args('-cdrom', drive_path, '-boot', 'd') diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/= x86_cpu_model_versions.py index 6eb977954d..90558d9a71 100644 --- a/tests/acceptance/x86_cpu_model_versions.py +++ b/tests/acceptance/x86_cpu_model_versions.py @@ -75,12 +75,15 @@ class X86CPUModelAliases(avocado_qemu.Test): "EPYC-IBPB shouldn't be versioned") =20 def test_4_0_alias_compatibility(self): - """Check if pc-*-4.0 unversioned CPU model won't be reported as al= iases""" + """ + Check if pc-*-4.0 unversioned CPU model won't be reported as alias= es + + :avocado: tags=3Dmachine:pc-i440fx-4.0 + """ # pc-*-4.0 won't expose non-versioned CPU models as aliases # We do this to help management software to keep compatibility # with older QEMU versions that didn't have the versioned CPU model self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.0') self.vm.launch() cpus =3D dict((m['name'], m) for m in self.vm.command('query-cpu-d= efinitions')) =20 @@ -105,9 +108,12 @@ class X86CPUModelAliases(avocado_qemu.Test): self.assertNotIn('alias-of', c, "%s shouldn't be an alias" % (= name)) =20 def test_4_1_alias(self): - """Check if unversioned CPU model is an alias pointing to right ve= rsion""" + """ + Check if unversioned CPU model is an alias pointing to right versi= on + + :avocado: tags=3Dmachine:pc-i440fx-4.1 + """ self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.1') self.vm.launch() =20 cpus =3D dict((m['name'], m) for m in self.vm.command('query-cpu-d= efinitions')) @@ -207,9 +213,12 @@ class X86CPUModelAliases(avocado_qemu.Test): self.validate_aliases(cpus) =20 def test_none_alias(self): - """Check if unversioned CPU model is an alias pointing to some ver= sion""" + """ + Check if unversioned CPU model is an alias pointing to some version + + :avocado: tags=3Dmachine:none + """ self.vm.add_args('-S') - self.vm.set_machine('none') self.vm.launch() =20 cpus =3D dict((m['name'], m) for m in self.vm.command('query-cpu-d= efinitions')) @@ -242,68 +251,84 @@ class CascadelakeArchCapabilities(avocado_qemu.Test): return self.vm.command('qom-get', path=3Dcpu_path, property=3Dprop) =20 def test_4_1(self): + """ + :avocado: tags=3Dmachine:pc-i440fx-4.1 + """ # machine-type only: self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.1') self.vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don= ,check=3Doff,enforce=3Doff') self.vm.launch() self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server should not ha= ve arch-capabilities') =20 def test_4_0(self): + """ + :avocado: tags=3Dmachine:pc-i440fx-4.0 + """ self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.0') self.vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don= ,check=3Doff,enforce=3Doff') self.vm.launch() self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server should not ha= ve arch-capabilities') =20 def test_set_4_0(self): + """ + :avocado: tags=3Dmachine:pc-i440fx-4.0 + """ # command line must override machine-type if CPU model is not vers= ioned: self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.0') self.vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don= ,check=3Doff,enforce=3Doff,+arch-capabilities') self.vm.launch() self.assertTrue(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server,+arch-capabili= ties should have arch-capabilities') =20 def test_unset_4_1(self): + """ + :avocado: tags=3Dmachine:pc-i440fx-4.1 + """ self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.1') self.vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don= ,check=3Doff,enforce=3Doff,-arch-capabilities') self.vm.launch() self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server,-arch-capabil= ities should not have arch-capabilities') =20 def test_v1_4_0(self): + """ + :avocado: tags=3Dmachine:pc-i440fx-4.0 + """ # versioned CPU model overrides machine-type: self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.0') self.vm.add_args('-cpu', 'Cascadelake-Server-v1,x-force-features= =3Don,check=3Doff,enforce=3Doff') self.vm.launch() self.assertFalse(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server-v1 should not= have arch-capabilities') =20 def test_v2_4_0(self): + """ + :avocado: tags=3Dmachine:pc-i440fx-4.0 + """ self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.0') self.vm.add_args('-cpu', 'Cascadelake-Server-v2,x-force-features= =3Don,check=3Doff,enforce=3Doff') self.vm.launch() self.assertTrue(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server-v2 should have= arch-capabilities') =20 def test_v1_set_4_0(self): + """ + :avocado: tags=3Dmachine:pc-i440fx-4.0 + """ # command line must override machine-type and versioned CPU model: self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.0') self.vm.add_args('-cpu', 'Cascadelake-Server-v1,x-force-features= =3Don,check=3Doff,enforce=3Doff,+arch-capabilities') self.vm.launch() self.assertTrue(self.get_cpu_prop('arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server-v1,+arch-capab= ilities should have arch-capabilities') =20 def test_v2_unset_4_1(self): + """ + :avocado: tags=3Dmachine:pc-i440fx-4.1 + """ self.vm.add_args('-S') - self.vm.set_machine('pc-i440fx-4.1') self.vm.add_args('-cpu', 'Cascadelake-Server-v2,x-force-features= =3Don,check=3Doff,enforce=3Doff,-arch-capabilities') self.vm.launch() self.assertFalse(self.get_cpu_prop('arch-capabilities'), --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576561873; cv=none; d=zohomail.com; s=zohoarc; b=LLo5sFIjFyQEtW33h/+Jki3VJicoqdLy8vzNKZlMIMDcwGE3OoQOg6pU3hfq04kj++eQCX4NyhEy8p97AW83SpcQxZhRn9RBJ1zmpLRZrS0KKVHFbMQNeI7gbLuoh8OmwBLeqGwKd+uY8gPEJmB/S2RRylOSFNDr4txShMmeUGo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576561873; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KUf4HV3yfMrMl6yQcuB15QSvMyvJG14sm9hc24e56eI=; b=Hfonsd5kuiIe4DeZC9rpfMrgyYJrizPCMpwFCIC5kzb7XZ2/oRRW4qP/mEPCm2mB3b/bhGmnvl6k1GhozHsx/v87hh142xw0jQYZrcR7kZpYywB7Vz/y9F7Z3GOhk84HNYHaRIksxRiXrTTCfDM2Q3+grvpBDIv8qpLhTIPtOVQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576561873172900.9649105441733; Mon, 16 Dec 2019 21:51:13 -0800 (PST) Received: from localhost ([::1]:36208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5lH-0002bi-PY for importer@patchew.org; Tue, 17 Dec 2019 00:51:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52544) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5Dk-00043H-GN for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5Dj-000426-7O for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:32 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:31285 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5Dj-00040b-31 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:31 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-KM7lqkBrPGKUO4laiSbIXQ-1; Tue, 17 Dec 2019 00:16:29 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D5F2107ACC5; Tue, 17 Dec 2019 05:16:27 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 84A5419C4F; Tue, 17 Dec 2019 05:16:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KUf4HV3yfMrMl6yQcuB15QSvMyvJG14sm9hc24e56eI=; b=A+iMlwGoaKqPORhGp04I634xvf523eVsdT/wRlejoUAH+ciJVdpgSEPVGLyCD0/uWZBUIZ ZrJ85E78kuYOu+jP0vx33bGH8aB9EclihlvpDsBHqzNZIp4PbAfmMEIHunrctx9LuQAbjI lxXBDLe7nzJhb4LT2fymJqi5xAzoCL4= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 10/15] Acceptance tests: use relative location for tests Date: Tue, 17 Dec 2019 00:15:16 -0500 Message-Id: <20191217051521.1239-11-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: KM7lqkBrPGKUO4laiSbIXQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" An Avocado Test ID[1] is composed by a number of components, but it starts with the Test Name, usually a file system location that was given to the loader. Because the source directory is being given as a prefix to the "tests/acceptance" directory containing the acceptance tests, the test names will needlessly include the directory the user is using to host the QEMU sources (and/or build tree). Let's remove the source dir (or a build dir) from the path given to the test loader. This should give more constant names, and when using result servers and databases, it should give the same test names across executions from different people or from different directories. [1] - https://avocado-framework.readthedocs.io/en/69.0/ReferenceGuide.html#= test-id Signed-off-by: Cleber Rosa Message-Id: <20191104151323.9883-5-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Cleber Rosa --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 8566f5f119..82dab2a36a 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1185,7 +1185,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) --show=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_DIR) \ --filter-by-tags-include-empty --filter-by-tags-include-empty-= key \ $(AVOCADO_TAGS) \ - --failfast=3Don $(SRC_PATH)/tests/acceptance, \ + --failfast=3Don tests/acceptance, \ "AVOCADO", "tests/acceptance") =20 # Consolidated targets --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576561596; cv=none; d=zohomail.com; s=zohoarc; b=bGWdooKUNO1st0J7znzaHNU3EZMGiWMPdh9BnQB8b0OexbLE9WS3/ck/QVjy+YePw5ruf4qin80ZadJ7Q+hALoEQHwIugnZPf2cL9274aAgOE93DrNzkv2KHMN3AnPzkz4W1YOXhwq1df3wFtyPAqP2LceZ3/rEvJTpteM+morU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576561596; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VC3E9bUtyognMzeek+bKqozA8nCsA+Ong7czPK+2nI4=; b=CTcy/3t64k6scNbYoRhmN5hODn32zbCvVikz4LXPhIsLe3H62yjoDN77HtyK/qVVcxH7kLGvrpD01NwrP7VbHwW37rS3a+j8MD1lQMs+NW3FlLy1xi4GCymjOTrPXFPXLs7vlx+YBjdHKpiIYl98f81tnvNdvOaI5dP5LOLFrUg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15765615964711013.828623620609; Mon, 16 Dec 2019 21:46:36 -0800 (PST) Received: from localhost ([::1]:36130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5go-0003oN-T9 for importer@patchew.org; Tue, 17 Dec 2019 00:46:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52599) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5Du-0004MB-9t for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5Dt-00049Y-0e for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:42 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:32471 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5Ds-00049D-SI for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:40 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-373-CKfxVonHOiG_wpVV9bHLHQ-1; Tue, 17 Dec 2019 00:16:39 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 179DADC21; Tue, 17 Dec 2019 05:16:37 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9700D19C4F; Tue, 17 Dec 2019 05:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VC3E9bUtyognMzeek+bKqozA8nCsA+Ong7czPK+2nI4=; b=jTNIgwi0GeCImELXXKPDdVDgHlp2JEx2XZpXyYPQZ3UnjC4lu9C11a8cIGJ9CQ7KTprPQO GYSY8b5BqfYopi0vftd2tAZN61Ygpq6N5F0R3s9vLXiY721MVqRrXVgY02cuTuluYFecTP ERntB9LCjmqkHCxEmwFGMe1S5UPYRtM= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 11/15] python/qemu: Move kvm_available() to its own module Date: Tue, 17 Dec 2019 00:15:17 -0500 Message-Id: <20191217051521.1239-12-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: CKfxVonHOiG_wpVV9bHLHQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wainer dos Santos Moschetta This creates the 'accel' Python module to be the home for utilities that deal with accelerators. Also moved kvm_available() from __init__.py to this new module. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20191216191438.93418-2-wainersm@redhat.com> Signed-off-by: Cleber Rosa --- python/qemu/__init__.py | 20 +------------------- python/qemu/{__init__.py =3D> accel.py} | 16 ++++++---------- tests/vm/basevm.py | 2 +- 3 files changed, 8 insertions(+), 30 deletions(-) copy python/qemu/{__init__.py =3D> accel.py} (84%) diff --git a/python/qemu/__init__.py b/python/qemu/__init__.py index 6c919a3d56..eff17a306e 100644 --- a/python/qemu/__init__.py +++ b/python/qemu/__init__.py @@ -12,24 +12,6 @@ # Based on qmp.py. # =20 -import logging -import os - from . import qmp from . import machine - -LOG =3D logging.getLogger(__name__) - -# Mapping host architecture to any additional architectures it can -# support which often includes its 32 bit cousin. -ADDITIONAL_ARCHES =3D { - "x86_64" : "i386", - "aarch64" : "armhf" -} - -def kvm_available(target_arch=3DNone): - host_arch =3D os.uname()[4] - if target_arch and target_arch !=3D host_arch: - if target_arch !=3D ADDITIONAL_ARCHES.get(host_arch): - return False - return os.access("/dev/kvm", os.R_OK | os.W_OK) +from . import accel diff --git a/python/qemu/__init__.py b/python/qemu/accel.py similarity index 84% copy from python/qemu/__init__.py copy to python/qemu/accel.py index 6c919a3d56..cbeac10dd1 100644 --- a/python/qemu/__init__.py +++ b/python/qemu/accel.py @@ -1,5 +1,9 @@ -# QEMU library -# +""" +QEMU accel module: + +This module provides utilities for discover and check the availability of +accelerators. +""" # Copyright (C) 2015-2016 Red Hat Inc. # Copyright (C) 2012 IBM Corp. # @@ -9,17 +13,9 @@ # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # -# Based on qmp.py. -# =20 -import logging import os =20 -from . import qmp -from . import machine - -LOG =3D logging.getLogger(__name__) - # Mapping host architecture to any additional architectures it can # support which often includes its 32 bit cousin. ADDITIONAL_ARCHES =3D { diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 0b8c1b2657..53b9515ee2 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -21,7 +21,7 @@ import logging import time import datetime sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu import kvm_available +from qemu.accel import kvm_available from qemu.machine import QEMUMachine import subprocess import hashlib --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576562422; cv=none; d=zohomail.com; s=zohoarc; b=iZBjK6dL3JaZ3yky7TXkVVlw9WNr6ZRR2dNwFzNRICFkg0jNI37M3zGptC0BtjoUONbrNZJdHYb34ZWmc3ZJyd4tBYZpPxeWWtT8j+7B+h1c5k5hhWm046rekfeRJ/IciKP8hn2gYrV5/26x+61oJm+HezOe/IRyfvRiDGgrswg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576562422; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UXeHrJD4tk/u30DpUF63Av8cKzHkbifYHGE/1Vt3IiI=; b=gZSOAXyPml1RJo9XW6YOoXjW7bvbiFdpZ7V6vS+SMSmKt0NqowYdwE+R/vE/x9Vti9q2eSrWd2rwK6u9wW/fQ9m4sdDQgpkUhp7V0HQQWPso2KQyGlL+FU+CPNfs3MkFemqamYgsbC5/+AXD4FF2f014mlvdzwWYpafy0JXgeLY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576562422581105.16606429970932; Mon, 16 Dec 2019 22:00:22 -0800 (PST) Received: from localhost ([::1]:36364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5u9-0003T1-GX for importer@patchew.org; Tue, 17 Dec 2019 01:00:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52630) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5Dx-0004T6-Rv for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5Dw-0004Cb-Mj for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:45 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:22553 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5Dw-0004CM-JD for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:44 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-317-_9qxFTgyNR-dgwA-3j7mng-1; Tue, 17 Dec 2019 00:16:42 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0D43A189CD00; Tue, 17 Dec 2019 05:16:41 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 70F3919C4F; Tue, 17 Dec 2019 05:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UXeHrJD4tk/u30DpUF63Av8cKzHkbifYHGE/1Vt3IiI=; b=ap0kJH+vSWSOeR7p3ASRGdkyRmDPZ22IDUQW8UJ1Tm5D3uecNqA8oD3LISAJg/lmZUyWjG 4ZoDS5kK9ynMz4njUjNoSV19WVrqEYoveTNIkdw45gn7XiBLfJ58IUJ+lceR7HHvN2sByU e4Q5qu+1lhB0N2mQXB5zys7L+eqzGYY= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 12/15] python/qemu: accel: Add list_accel() method Date: Tue, 17 Dec 2019 00:15:18 -0500 Message-Id: <20191217051521.1239-13-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: _9qxFTgyNR-dgwA-3j7mng-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wainer dos Santos Moschetta Since commit cbe6d6365a48 the command `qemu -accel help` returns the list of accelerators enabled in the QEMU binary. This adds the list_accel() method which return that same list. Signed-off-by: Wainer dos Santos Moschetta Message-Id: <20191216191438.93418-3-wainersm@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- python/qemu/accel.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/python/qemu/accel.py b/python/qemu/accel.py index cbeac10dd1..7395cee793 100644 --- a/python/qemu/accel.py +++ b/python/qemu/accel.py @@ -14,7 +14,11 @@ accelerators. # the COPYING file in the top-level directory. # =20 +import logging import os +import subprocess + +LOG =3D logging.getLogger(__name__) =20 # Mapping host architecture to any additional architectures it can # support which often includes its 32 bit cousin. @@ -23,6 +27,25 @@ ADDITIONAL_ARCHES =3D { "aarch64" : "armhf" } =20 +def list_accel(qemu_bin): + """ + List accelerators enabled in the QEMU binary. + + @param qemu_bin (str): path to the QEMU binary. + @raise Exception: if failed to run `qemu -accel help` + @return a list of accelerator names. + """ + if not qemu_bin: + return [] + try: + out =3D subprocess.check_output([qemu_bin, '-accel', 'help'], + universal_newlines=3DTrue) + except: + LOG.debug("Failed to get the list of accelerators in %s", qemu_bin) + raise + # Skip the first line which is the header. + return [acc.strip() for acc in out.splitlines()[1:]] + def kvm_available(target_arch=3DNone): host_arch =3D os.uname()[4] if target_arch and target_arch !=3D host_arch: --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576561705; cv=none; d=zohomail.com; s=zohoarc; b=eF5OJjyxQUkiQps9Wstiajxn9w0h3ZHds+7gbxAUoYzBH5R0XosQHDEdi0oC5jbCdrtc1Z3CTJm2JMXk1emZh+zvXU+cQ7iqhbupJst7n33uoAgXU44Wx85hkHAAvXmsyRx++18+Mw9Ov3rpvgErA9sj/irxSD36pUEMIwlG3S8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576561705; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=C4zh81Cf/kIZ2jxA4b5dS+pBpBqgi/gEpRekYY5BdSU=; b=Vccdgg/6ID8IIzNr0qaSykCMeBqwSV412l85Rlq8i+6kOs9fCpntHTTVhHkEslBvJFTMVPvpdhhpwypaEb75gq0Il4YpNvLVykHL3S0ivb6aRFPRbIpdJBiLTI7KtTZs+VIjOjoTdblrNXwQxx0yYAFN4bf6tyi/9KYSgItEhYk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576561705536302.99744468260155; Mon, 16 Dec 2019 21:48:25 -0800 (PST) Received: from localhost ([::1]:36160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5ia-0006mP-4h for importer@patchew.org; Tue, 17 Dec 2019 00:48:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52673) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5E2-0004Ww-4W for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5E0-0004GK-Sy for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:49 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:36667 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5E0-0004FL-P1 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:48 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-396-J7DinpNrMxyU2m3BYR1C_g-1; Tue, 17 Dec 2019 00:16:46 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0EDE8017DF; Tue, 17 Dec 2019 05:16:44 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 664CD19C4F; Tue, 17 Dec 2019 05:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C4zh81Cf/kIZ2jxA4b5dS+pBpBqgi/gEpRekYY5BdSU=; b=XTKkF1oAONgwP7OTvf/ar1PtqEFobubIM8wj2G4J4TTfgDK7lVvSRCIflDNOrl5c2HWis8 4xo2SmH1aWhVjcpM8PesLXob8IhnyAHzZhnuSSLjJUXpwnwvaXs0gedTuiRCg1ssc2FytG cMM6aSgMJ58tN3FViXlYB0DE1e4cbng= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 13/15] python/qemu: accel: Strengthen kvm_available() checks Date: Tue, 17 Dec 2019 00:15:19 -0500 Message-Id: <20191217051521.1239-14-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: J7DinpNrMxyU2m3BYR1C_g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wainer dos Santos Moschetta Currently kvm_available() checks for the presence of kvm module and, if target and host arches don't mismatch. This patch adds an 3rd checking: if QEMU binary was compiled with kvm support. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Cleber Rosa Message-Id: <20191216191438.93418-4-wainersm@redhat.com> Signed-off-by: Cleber Rosa --- python/qemu/accel.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/python/qemu/accel.py b/python/qemu/accel.py index 7395cee793..5fce3aa3dd 100644 --- a/python/qemu/accel.py +++ b/python/qemu/accel.py @@ -46,9 +46,24 @@ def list_accel(qemu_bin): # Skip the first line which is the header. return [acc.strip() for acc in out.splitlines()[1:]] =20 -def kvm_available(target_arch=3DNone): - host_arch =3D os.uname()[4] - if target_arch and target_arch !=3D host_arch: - if target_arch !=3D ADDITIONAL_ARCHES.get(host_arch): - return False - return os.access("/dev/kvm", os.R_OK | os.W_OK) +def kvm_available(target_arch=3DNone, qemu_bin=3DNone): + """ + Check if KVM is available using the following heuristic: + - Kernel module is present in the host; + - Target and host arches don't mismatch; + - KVM is enabled in the QEMU binary. + + @param target_arch (str): target architecture + @param qemu_bin (str): path to the QEMU binary + @return True if kvm is available, otherwise False. + """ + if not os.access("/dev/kvm", os.R_OK | os.W_OK): + return False + if target_arch: + host_arch =3D os.uname()[4] + if target_arch !=3D host_arch: + if target_arch !=3D ADDITIONAL_ARCHES.get(host_arch): + return False + if qemu_bin and "kvm" not in list_accel(qemu_bin): + return False + return True --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576562489; cv=none; d=zohomail.com; s=zohoarc; b=aHW8PwLD/yq9q61UgRG6JTNmkElIJKBZaivBs0c/3MCuMo8pvUPp3ckJVvuflSHLTg/1mbFBnsZ1QQ394rttGJxZM3IcKGdTipmq9d5RkFpxg5F1Khef9lf7V3D7FWDZxxweN+jbnjNNYJIxSl5EAkgC97kJx4yC42ugANvrBhs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576562489; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DDb+RUoh9h50/NugqfGetWuvIlrL5CsXimNxjVbow44=; b=kkePLxhls24mXzdrmVbK/Pyil7uWWQqxFa4x7lUOBHXEep9WJAkecovaScANtkevGC4u6uTyE+rBwCOOY4DQPVl+4aOnsSDGxTjuYI9k1wKbDpjk/vbw7LvxwGXs6SEw7IJelS/63PYOB5LmU35K2himRJrskePAIFDjSIDHCBc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157656248970865.54369651154559; Mon, 16 Dec 2019 22:01:29 -0800 (PST) Received: from localhost ([::1]:36384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5vE-0004RR-Dq for importer@patchew.org; Tue, 17 Dec 2019 01:01:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52708) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5E7-0004b2-Dr for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5E4-0004IG-Rw for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:55 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:53606 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5E4-0004Hv-Ni for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:16:52 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-409-3jw45WaeNa6zC9Gq5OZVzQ-1; Tue, 17 Dec 2019 00:16:50 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E2827107ACC4; Tue, 17 Dec 2019 05:16:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5921B19C4F; Tue, 17 Dec 2019 05:16:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DDb+RUoh9h50/NugqfGetWuvIlrL5CsXimNxjVbow44=; b=N6wDlRCTx2d8QsEniUhVXm7sz8bmrP4JelljSTiEO8ulg5Nsfnd8QpoYEpNrFewnfk9C8X fFWAP8o6KeNoo3rY0YBWxERTkf+pOurDNDMobxxgIolhapei5vGO3skX9iRx8XcRaPrMBs Xxwg81xcrom8cKTovWmVQwlgiFbCGj8= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 14/15] python/qemu: accel: Add tcg_available() method Date: Tue, 17 Dec 2019 00:15:20 -0500 Message-Id: <20191217051521.1239-15-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 3jw45WaeNa6zC9Gq5OZVzQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wainer dos Santos Moschetta This adds a method to check if the tcg accelerator is enabled in the QEMU binary. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Cleber Rosa Message-Id: <20191216191438.93418-5-wainersm@redhat.com> Signed-off-by: Cleber Rosa --- python/qemu/accel.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/qemu/accel.py b/python/qemu/accel.py index 5fce3aa3dd..0b38ddf0ab 100644 --- a/python/qemu/accel.py +++ b/python/qemu/accel.py @@ -67,3 +67,11 @@ def kvm_available(target_arch=3DNone, qemu_bin=3DNone): if qemu_bin and "kvm" not in list_accel(qemu_bin): return False return True + +def tcg_available(qemu_bin): + """ + Check if TCG is available. + + @param qemu_bin (str): path to the QEMU binary + """ + return 'tcg' in list_accel(qemu_bin) --=20 2.21.0 From nobody Sun Apr 28 11:44:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576561823; cv=none; d=zohomail.com; s=zohoarc; b=ep3JkMIpPFeYD82YKkcIrSsSZJ0hnC1EXR3FLIYlvMxWyZ1Nr3z9yv5AsDOOmqEK+UkmjQHINWmiw9um7HXI5aRIK91A5xixOdC+YsLpdHH/BV3c0BBEw/pX0buIxF7gBIOCVAF53tHK5Q4yHfldjsqzIhxom16iHswMj1ze4/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576561823; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4qq4jTy9B7rJaMCrbWTWfG84h4ysQyyseP8ZANiJzoQ=; b=MTEPuYXsyjGAKZ5eGuHM5C0qQHBwuG2dgfEkkbi1Ihi5pmr2do4oxJ4fWVRXEf/94PWczu0dieIJXJrwR6NeVhKqmdgUObPv69oWI01ZOjL2BlLZ75SQh3SxVqD5xZgBmX7VUNEITIKvnsjr+/rQXOgIUdjm58HgONqkuY2Feis= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576561823609371.50171215300634; Mon, 16 Dec 2019 21:50:23 -0800 (PST) Received: from localhost ([::1]:36188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5kT-00016q-W9 for importer@patchew.org; Tue, 17 Dec 2019 00:50:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52761) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ih5EE-0004fz-Ly for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:17:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ih5ED-0004NV-MH for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:17:02 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:44456 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ih5ED-0004NL-IB for qemu-devel@nongnu.org; Tue, 17 Dec 2019 00:17:01 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-216-wEkOI788MXGneOCTt-wEHA-1; Tue, 17 Dec 2019 00:16:59 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97FEB8017DF; Tue, 17 Dec 2019 05:16:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4735E19C4F; Tue, 17 Dec 2019 05:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576559821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4qq4jTy9B7rJaMCrbWTWfG84h4ysQyyseP8ZANiJzoQ=; b=iRejAdWYTEWmV73TMsHrRwGW3QVbYrOruw0pGB/UqUmnYLiuJOFOqaa1S7ya4zoqrD6PL5 MO0T7ZVc+qQSaEH/UvsG2LOqB5+s0hhXmhbGF8H6LHgBMBq+skf6OMOQEgAlxDEQ/SXkef YugadPXDNmLXCHX3EoOJV6NjJYjxAuc= From: Cleber Rosa To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 15/15] python/qemu: Remove unneeded imports in __init__ Date: Tue, 17 Dec 2019 00:15:21 -0500 Message-Id: <20191217051521.1239-16-crosa@redhat.com> In-Reply-To: <20191217051521.1239-1-crosa@redhat.com> References: <20191217051521.1239-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: wEkOI788MXGneOCTt-wEHA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 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 , Beraldo Leal , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fabien Chouteau , KONRAD Frederic , qemu-ppc@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wainer dos Santos Moschetta __init_.py import some sub-modules unnecessarily. So let's clean it up. Signed-off-by: Wainer dos Santos Moschetta Suggested-by: Cleber Rosa Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Message-Id: <20191216191438.93418-6-wainersm@redhat.com> Signed-off-by: Cleber Rosa --- python/qemu/__init__.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/python/qemu/__init__.py b/python/qemu/__init__.py index eff17a306e..4ca06c34a4 100644 --- a/python/qemu/__init__.py +++ b/python/qemu/__init__.py @@ -9,9 +9,3 @@ # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # -# Based on qmp.py. -# - -from . import qmp -from . import machine -from . import accel --=20 2.21.0