From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393860; cv=none; d=zohomail.com; s=zohoarc; b=hfwINYJU+W54H1DvyhKZsfi/u1hQW3AXN4I1jzUmdRk4f+9PFNcOjuw8P/PCzjsQrwWgIm/3bKn4HD3FldHBxdZZNTba9sRiAeoO/A6BQSurq6a1x1QGLbV6pfBpNv3iGU6I6D5lKd9+U9f/aNy3/upnr3dbuTO+7MgZ8SLj4JA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393860; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fdnhyoLM0awT0oLtp/fLmFSD1mp6EsLDN36R0LTgu/U=; b=hU/nEJqGknhqqsFIMhymtMXTFcOsVeCtHNRnKL3NTwmtiXue2BerUlETX3MV6uTTgwnlENpkjU5n+pFiWD7MzIGOgxzg+aHPisTWoNhkdoXNhKu3btruGUeHdOlAfvx4RPvI8Dtvjt0410E7RghL3EJce81LtJg4o+hIAaE4pKo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393860647576.4213053055583; Wed, 23 Apr 2025 00:37:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uey-00037N-5i; Wed, 23 Apr 2025 03:36:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uee-00031g-AA for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ueb-0003A4-18 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:23 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-338-BxcTLPAzNtu9IjwxquwF2Q-1; Wed, 23 Apr 2025 03:36:17 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 23E3619560A3; Wed, 23 Apr 2025 07:36:16 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9990A19560A3; Wed, 23 Apr 2025 07:36:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fdnhyoLM0awT0oLtp/fLmFSD1mp6EsLDN36R0LTgu/U=; b=aPGqWYPE2Xwf/YQVRKJN8dU+4hsOLBmQzYWsNPOGcZv7fINPu2JDX+Yd/AwhQbAFMPhww5 q6TkH1tO4tI+1TpjuU7xsnl3ELVKEm01TkVYHJykcFiFDpq6jGIfI4/7xRoliTY+mDo3Wc ZZT6KCXwYdpxlHN8ImLbL8v0h4+Iz94= X-MC-Unique: BxcTLPAzNtu9IjwxquwF2Q-1 X-Mimecast-MFC-AGG-ID: BxcTLPAzNtu9IjwxquwF2Q_1745393776 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson Subject: [PULL 01/29] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.9 machine type Date: Wed, 23 Apr 2025 09:35:41 +0200 Message-ID: <20250423073610.271585-2-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393862626019100 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The s390-ccw-virtio-2.9 machine is older than 6 years, so according to our machine support policy, it can be removed now. Message-ID: <20250115073819.15452-2-thuth@redhat.com> Signed-off-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 75b32182eb0..72de2bd8dc9 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -1270,30 +1270,6 @@ static void ccw_machine_2_10_class_options(MachineCl= ass *mc) } DEFINE_CCW_MACHINE(2, 10); =20 -static void ccw_machine_2_9_instance_options(MachineState *machine) -{ - ccw_machine_2_10_instance_options(machine); - s390_cpudef_featoff_greater(12, 1, S390_FEAT_ESOP); - s390_cpudef_featoff_greater(12, 1, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2); - s390_cpudef_featoff_greater(12, 1, S390_FEAT_ZPCI); - s390_cpudef_featoff_greater(12, 1, S390_FEAT_ADAPTER_INT_SUPPRESSION); - s390_cpudef_featoff_greater(12, 1, S390_FEAT_ADAPTER_EVENT_NOTIFICATIO= N); - css_migration_enabled =3D false; -} - -static void ccw_machine_2_9_class_options(MachineClass *mc) -{ - static GlobalProperty compat[] =3D { - { TYPE_S390_STATTRIB, "migration-enabled", "off", }, - { TYPE_S390_FLIC_COMMON, "migration-enabled", "off", }, - }; - - ccw_machine_2_10_class_options(mc); - compat_props_add(mc->compat_props, hw_compat_2_9, hw_compat_2_9_len); - compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); -} -DEFINE_CCW_MACHINE(2, 9); - #endif =20 static void ccw_machine_register_types(void) --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393877; cv=none; d=zohomail.com; s=zohoarc; b=HuILq+oKRrixQGIA+3Dv75jPnOr0FqWQ2EQ/hTcdAtq6Oo2IEb1jqEYIkW1z7Mwfv3S+DX3Dbg5KX/27IEh0g+IirSceYEk3JXWf4Tpyx0/AW1b4tpVMQaMf0lQYIaJ7DfWFADnA7b0sEZ9YNwi42ISwohliqPFgel2BMrlit5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393877; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=x/bk9XOQrPQKu46hMWa/9UDEo+ZO3ymqKIc1YaD6C2Y=; b=LGfoaEUSugvVSDp+1ZO5zssTIP8NU9jiqtwVehpYJicjpU7YIhcrpyCUa1xaHYX5SJr4LHcDlF/P4Fjt1cvPZl4PjdB59w/Rw1u0WSC5PE6dIR+VZ/mgUnUNdXf4Ik3JIHEev/8OlX62UgXw67W+7DMCFxpUBidxK4Gd0rqTuoo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393877719937.7089119556828; Wed, 23 Apr 2025 00:37:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uez-00039R-N2; Wed, 23 Apr 2025 03:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ueg-00031u-56 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ued-0003AR-04 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:25 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-457-l0kHdszjOreKyAth0Mhy_g-1; Wed, 23 Apr 2025 03:36:19 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 39D7C1800980; Wed, 23 Apr 2025 07:36:18 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 890E919560A3; Wed, 23 Apr 2025 07:36:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393781; 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=x/bk9XOQrPQKu46hMWa/9UDEo+ZO3ymqKIc1YaD6C2Y=; b=ARGNyKFrfHFN6iTr1rQjRc4lp44syx9DA8NzEfDdDT2T+HZm6IOgEmDAR3OSZsIYnO4jMN nSq+/pT6BRhCFCyoyMbgHPDlKy9T5uw8GvudxAoFDcAx4YMXKunHS+UnxVRFCW524pHujl 5tN4jde4IWFL8hrDpxopQwPgphRd5aQ= X-MC-Unique: l0kHdszjOreKyAth0Mhy_g-1 X-Mimecast-MFC-AGG-ID: l0kHdszjOreKyAth0Mhy_g_1745393778 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 02/29] hw/s390x/css: Remove the obsolete "css_migration_enabled" variable Date: Wed, 23 Apr 2025 09:35:42 +0200 Message-ID: <20250423073610.271585-3-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393879869019000 From: Thomas Huth Now that the s390-ccw-virtio-2.9 machine type has been removed, we don't need the "css_migration_enabled" variable anymore and can remove the related code. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250115073819.15452-3-thuth@redhat.com> Signed-off-by: Thomas Huth --- include/hw/s390x/css.h | 6 ------ hw/s390x/css.c | 31 +------------------------------ 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index cd97e2b7075..dbf919bdd2e 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -333,10 +333,4 @@ static inline int ccw_dstream_read_buf(CcwDataStream *= cds, void *buff, int len) #define ccw_dstream_read(cds, v) ccw_dstream_read_buf((cds), &(v), sizeof(= v)) #define ccw_dstream_write(cds, v) ccw_dstream_write_buf((cds), &(v), sizeo= f(v)) =20 -/** - * true if (vmstate based) migration of the channel subsystem - * is enabled, false if it is disabled. - */ -extern bool css_migration_enabled; - #endif diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 738800c98df..17afcbb2cde 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -23,8 +23,6 @@ #include "hw/s390x/s390-virtio-ccw.h" #include "hw/s390x/s390-ccw.h" =20 -bool css_migration_enabled =3D true; - typedef struct CrwContainer { CRW crw; QTAILQ_ENTRY(CrwContainer) sibling; @@ -180,16 +178,10 @@ static const VMStateDescription vmstate_orb =3D { } }; =20 -static bool vmstate_schdev_orb_needed(void *opaque) -{ - return css_migration_enabled; -} - static const VMStateDescription vmstate_schdev_orb =3D { .name =3D "s390_subch_dev/orb", .version_id =3D 1, .minimum_version_id =3D 1, - .needed =3D vmstate_schdev_orb_needed, .fields =3D (const VMStateField[]) { VMSTATE_STRUCT(orb, SubchDev, 1, vmstate_orb, ORB), VMSTATE_END_OF_LIST() @@ -390,33 +382,12 @@ static int subch_dev_post_load(void *opaque, int vers= ion_id) css_subch_assign(s->cssid, s->ssid, s->schid, s->devno, s); } =20 - if (css_migration_enabled) { - /* No compat voodoo to do ;) */ - return 0; - } - /* - * Hack alert. If we don't migrate the channel subsystem status - * we still need to find out if the guest enabled mss/mcss-e. - * If the subchannel is enabled, it certainly was able to access it, - * so adjust the max_ssid/max_cssid values for relevant ssid/cssid - * values. This is not watertight, but better than nothing. - */ - if (s->curr_status.pmcw.flags & PMCW_FLAGS_MASK_ENA) { - if (s->ssid) { - channel_subsys.max_ssid =3D MAX_SSID; - } - if (s->cssid !=3D channel_subsys.default_cssid) { - channel_subsys.max_cssid =3D MAX_CSSID; - } - } return 0; } =20 void css_register_vmstate(void) { - if (css_migration_enabled) { - vmstate_register(NULL, 0, &vmstate_css, &channel_subsys); - } + vmstate_register(NULL, 0, &vmstate_css, &channel_subsys); } =20 IndAddr *get_indicator(hwaddr ind_addr, int len) --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393833; cv=none; d=zohomail.com; s=zohoarc; b=Y1CT9jPq9JG8UGEXq+3zr0C5PYqvEnsfLca8/Uwza8ETiPiQCQg4QPPxgKQoK6WOSXqO9+J9f82DYD4vcxfaeRJ+hCI7gAPdvefl6fx/EFSPmApdArv7dNjvpF6gu0xZjd1aXK0fGPw+cuFCyS/DXjYxFElLCA9c6tK7X+AjRe8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393833; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kHAl7mGWyVtoVdcBAu7OviotqdkJHPswlSScbOveyIk=; b=Gl+QiyxmCespcW3jGKoK2QQ+fk3BjHXkJoiTkhi8/CVyHZrBZiOB5gEc3+6z9u03ZxHeNkONhADIntDBqGfmRJxunE2zWrKvkxDC0s4RX4sJG5CEbLCAwH0XGBcw4vGt2SgmlW7CKE8mdO1O+30/3361iZd4cS9QAinrNegy7bs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174539383332183.91832415945453; Wed, 23 Apr 2025 00:37:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uf3-0003CI-Hv; Wed, 23 Apr 2025 03:36:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ueo-00034A-Nf for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uek-0003Bd-Dl for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:32 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-614-rx7uB6JQMMuMm_QgsycEhQ-1; Wed, 23 Apr 2025 03:36:21 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7420F19560BB; Wed, 23 Apr 2025 07:36:20 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A3D0619560A3; Wed, 23 Apr 2025 07:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393788; 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=kHAl7mGWyVtoVdcBAu7OviotqdkJHPswlSScbOveyIk=; b=agKrfrAoQQEycWPZgnmR41zwdv9MF3kuzFg11jiv3h30zyQoRXKgBYk+gjDElPsyTMYGed /na6vrQDgeX7znSRBZ36NYVUzeGUnN2YKMzEKUkHuaQXEnLRLsG2z7UzXdpXSZ7QXBce27 ECs/NYpiWupsWoYpptOpJt7P2GBFzWs= X-MC-Unique: rx7uB6JQMMuMm_QgsycEhQ-1 X-Mimecast-MFC-AGG-ID: rx7uB6JQMMuMm_QgsycEhQ_1745393780 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 03/29] hw/s390x/s390-stattrib: Remove the old migration_enabled flag Date: Wed, 23 Apr 2025 09:35:43 +0200 Message-ID: <20250423073610.271585-4-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393835788019000 From: Thomas Huth Now that the machine types that set the migration_enabled flag to false are gone, we can remove it and the related code. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250115073819.15452-4-thuth@redhat.com> Signed-off-by: Thomas Huth --- include/hw/s390x/storage-attributes.h | 1 - hw/s390x/s390-stattrib-kvm.c | 2 +- hw/s390x/s390-stattrib.c | 7 +------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/hw/s390x/storage-attributes.h b/include/hw/s390x/stora= ge-attributes.h index 8921a04d514..b5c6d8fa552 100644 --- a/include/hw/s390x/storage-attributes.h +++ b/include/hw/s390x/storage-attributes.h @@ -25,7 +25,6 @@ OBJECT_DECLARE_TYPE(S390StAttribState, S390StAttribClass,= S390_STATTRIB) struct S390StAttribState { DeviceState parent_obj; uint64_t migration_cur_gfn; - bool migration_enabled; }; =20 =20 diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c index 2a8e31718bf..d0ff04364d4 100644 --- a/hw/s390x/s390-stattrib-kvm.c +++ b/hw/s390x/s390-stattrib-kvm.c @@ -185,7 +185,7 @@ static long long kvm_s390_stattrib_get_dirtycount(S390S= tAttribState *sa) =20 static int kvm_s390_stattrib_get_active(S390StAttribState *sa) { - return kvm_s390_cmma_active() && sa->migration_enabled; + return kvm_s390_cmma_active(); } =20 static void kvm_s390_stattrib_class_init(ObjectClass *oc, void *data) diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index be07c28c6e5..35bf697ef0a 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -304,7 +304,7 @@ static int qemu_s390_set_migrationmode_stub(S390StAttri= bState *sa, bool value, =20 static int qemu_s390_get_active(S390StAttribState *sa) { - return sa->migration_enabled; + return true; } =20 static void qemu_s390_stattrib_class_init(ObjectClass *oc, void *data) @@ -360,10 +360,6 @@ static void s390_stattrib_realize(DeviceState *dev, Er= ror **errp) &savevm_s390_stattrib_handlers, dev); } =20 -static const Property s390_stattrib_props[] =3D { - DEFINE_PROP_BOOL("migration-enabled", S390StAttribState, migration_ena= bled, true), -}; - static void s390_stattrib_class_init(ObjectClass *oc, void *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); @@ -371,7 +367,6 @@ static void s390_stattrib_class_init(ObjectClass *oc, v= oid *data) dc->hotpluggable =3D false; set_bit(DEVICE_CATEGORY_MISC, dc->categories); dc->realize =3D s390_stattrib_realize; - device_class_set_props(dc, s390_stattrib_props); } =20 static void s390_stattrib_instance_init(Object *obj) --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393889; cv=none; d=zohomail.com; s=zohoarc; b=ecRekMAMQO7nuXWEp6QQ5ZliSLr2bNoNkRSwZ64Yb5y+qFsdpE7koLiDU0a/I607VQI41IJW8b7NaCaTR8uZ5wzJU+CigBBwh4B3w2CtG6QKs711XerlzSvSpDWOOInM3TvaIPnFMWrvCTZk4vM8DXxHARn73qbiIUpdjJ4OOwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393889; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oYVpO5NqIWhh48UobRgecx4gTGjQhTnDG8PXtrGzc7c=; b=iYC2yljbGQaDl8gUTiyOoBv29hvXrO0r2NuXVbI8xKaF8Wek4xOM4OZ3ChT97+oUHsNRtz/0L6IqdjbOlgqSPHnNMU32JU559cXJW35nWF6y6aHxA7/SdmBCZ6wLn5xZB5NhJ9MyUqtyZHxE1JtDS1OSY78uT6ebKm/CUNNSYgI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393889511877.7114000158963; Wed, 23 Apr 2025 00:38:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uf1-0003BB-4q; Wed, 23 Apr 2025 03:36:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uek-000334-EH for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uei-0003BM-5W for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:29 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-133-Yu3mJX5hO0-f3g5niN5GIw-1; Wed, 23 Apr 2025 03:36:24 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id ED1891800878; Wed, 23 Apr 2025 07:36:22 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 210A019560A3; Wed, 23 Apr 2025 07:36:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393786; 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=oYVpO5NqIWhh48UobRgecx4gTGjQhTnDG8PXtrGzc7c=; b=e4Gohjmk/HJxZr15IuHMJ4FrIUNgkx+fpJbae47ctLo9pwrYXgF8hnrM4OGpwxsbXxPq8r WRK8CYvjUGRIBXc4eQxn0pCet2R/ygwgiy8nAGJjCgcJGqBWOsXX9WxPgegWsfWQekoDmU nLvQx6z7qZ7ZGg9g1L2m1I58RtkeyL8= X-MC-Unique: Yu3mJX5hO0-f3g5niN5GIw-1 X-Mimecast-MFC-AGG-ID: Yu3mJX5hO0-f3g5niN5GIw_1745393783 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 04/29] hw/intc/s390_flic: Remove the obsolete migration_enabled flag Date: Wed, 23 Apr 2025 09:35:44 +0200 Message-ID: <20250423073610.271585-5-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393889795019000 From: Thomas Huth Now that the machine types that set the migration_enabled flag to false are gone, we can remove it and the related code. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250115073819.15452-5-thuth@redhat.com> Signed-off-by: Thomas Huth --- include/hw/s390x/s390_flic.h | 1 - hw/intc/s390_flic.c | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h index 85016d5ccc9..91edaaca409 100644 --- a/include/hw/s390x/s390_flic.h +++ b/include/hw/s390x/s390_flic.h @@ -42,7 +42,6 @@ OBJECT_DECLARE_TYPE(S390FLICState, S390FLICStateClass, struct S390FLICState { SysBusDevice parent_obj; bool ais_supported; - bool migration_enabled; }; =20 =20 diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c index c20f4c10750..4fae0231971 100644 --- a/hw/intc/s390_flic.c +++ b/hw/intc/s390_flic.c @@ -470,11 +470,6 @@ static void qemu_s390_flic_class_init(ObjectClass *oc,= void *data) fsc->inject_crw_mchk =3D qemu_s390_inject_crw_mchk; } =20 -static const Property s390_flic_common_properties[] =3D { - DEFINE_PROP_BOOL("migration-enabled", S390FLICState, - migration_enabled, true), -}; - static void s390_flic_common_realize(DeviceState *dev, Error **errp) { S390FLICState *fs =3D S390_FLIC_COMMON(dev); @@ -486,7 +481,6 @@ static void s390_flic_class_init(ObjectClass *oc, void = *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); =20 - device_class_set_props(dc, s390_flic_common_properties); dc->realize =3D s390_flic_common_realize; } =20 @@ -515,18 +509,10 @@ static void qemu_s390_flic_register_types(void) =20 type_init(qemu_s390_flic_register_types) =20 -static bool adapter_info_so_needed(void *opaque) -{ - S390FLICState *fs =3D s390_get_flic(); - - return fs->migration_enabled; -} - const VMStateDescription vmstate_adapter_info_so =3D { .name =3D "s390_adapter_info/summary_offset", .version_id =3D 1, .minimum_version_id =3D 1, - .needed =3D adapter_info_so_needed, .fields =3D (const VMStateField[]) { VMSTATE_UINT32(summary_offset, AdapterInfo), VMSTATE_END_OF_LIST() --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393890; cv=none; d=zohomail.com; s=zohoarc; b=dGpf1B9c9z/WNRUZne1D1FLLvce3Zg5hIaSKh8sD/i9hk+DhJzVQqW6drs2xDvlI1g+Gar0QR5bu7x/0Dp8GmU1fQjIS8YNes4QbUs3/LV+wN61IgTYYlY0mkfY6YZikCmR+QGWwlrZKCSCNPPQN7iYE4MEr3fPIaQlhyyMm5GU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393890; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6uodaUxX+9pfZchpCGRAUT/RxHshP2sI8myfmwd0ZYI=; b=J2sROprcq7NRQhrAmxJUiwyVomhM/Q0yrc2J3TICNE/KDtrkhSvoVvcuHifRtWLZwxzrGASCdQr+8u+2KdIrK8Ma2mvdMymZbV1gB+YfH1QTLvZPESNgqLY0Lx8VBX5dgKf+2TA+AbaIUCOqXJBkhIJZLFctHYF8QCcX7jeD6Gg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393890424893.803717928862; Wed, 23 Apr 2025 00:38:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfJ-0003EB-6Q; Wed, 23 Apr 2025 03:37:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ueq-00035J-04 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uel-0003Bm-2i for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:34 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-LJ5eCiFOP6Kdnmaz8HaV9A-1; Wed, 23 Apr 2025 03:36:26 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 345FD18001E0; Wed, 23 Apr 2025 07:36:25 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 62D6D19560A3; Wed, 23 Apr 2025 07:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393790; 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=6uodaUxX+9pfZchpCGRAUT/RxHshP2sI8myfmwd0ZYI=; b=atS+sfFSGgWsCBCKqJFj8tvBys5/jyFCEwAj/j183l9AonkJqW2jO6fTQZIJDUiOUjl7O8 Ktn+/7MO3zU0lwk3pUMbnMQBO0RGUYTmws8lPCZAuJJs6fkeIb4aHMFmQnvzvVNrq28zvR DM6YPGXWTC0v8p+GSoRURYTZHxC8wl4= X-MC-Unique: LJ5eCiFOP6Kdnmaz8HaV9A-1 X-Mimecast-MFC-AGG-ID: LJ5eCiFOP6Kdnmaz8HaV9A_1745393785 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Farman Subject: [PULL 05/29] hw/s390x/skeys: Declare QOM types using DEFINE_TYPES() macro Date: Wed, 23 Apr 2025 09:35:45 +0200 Message-ID: <20250423073610.271585-6-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393892681019100 From: Philippe Mathieu-Daud=C3=A9 When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20250310151414.11550-2-philmd@linaro.org> Signed-off-by: Thomas Huth --- hw/s390x/s390-skeys.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 811d892122b..d50e71b927a 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -316,14 +316,6 @@ static void qemu_s390_skeys_class_init(ObjectClass *oc= , void *data) dc->user_creatable =3D false; } =20 -static const TypeInfo qemu_s390_skeys_info =3D { - .name =3D TYPE_QEMU_S390_SKEYS, - .parent =3D TYPE_S390_SKEYS, - .instance_size =3D sizeof(QEMUS390SKeysState), - .class_init =3D qemu_s390_skeys_class_init, - .class_size =3D sizeof(S390SKeysClass), -}; - static void s390_storage_keys_save(QEMUFile *f, void *opaque) { S390SKeysState *ss =3D S390_SKEYS(opaque); @@ -481,19 +473,22 @@ static void s390_skeys_class_init(ObjectClass *oc, vo= id *data) set_bit(DEVICE_CATEGORY_MISC, dc->categories); } =20 -static const TypeInfo s390_skeys_info =3D { - .name =3D TYPE_S390_SKEYS, - .parent =3D TYPE_DEVICE, - .instance_size =3D sizeof(S390SKeysState), - .class_init =3D s390_skeys_class_init, - .class_size =3D sizeof(S390SKeysClass), - .abstract =3D true, +static const TypeInfo s390_skeys_types[] =3D { + { + .name =3D TYPE_S390_SKEYS, + .parent =3D TYPE_DEVICE, + .instance_size =3D sizeof(S390SKeysState), + .class_init =3D s390_skeys_class_init, + .class_size =3D sizeof(S390SKeysClass), + .abstract =3D true, + }, + { + .name =3D TYPE_QEMU_S390_SKEYS, + .parent =3D TYPE_S390_SKEYS, + .instance_size =3D sizeof(QEMUS390SKeysState), + .class_init =3D qemu_s390_skeys_class_init, + .class_size =3D sizeof(S390SKeysClass), + }, }; =20 -static void qemu_s390_skeys_register_types(void) -{ - type_register_static(&s390_skeys_info); - type_register_static(&qemu_s390_skeys_info); -} - -type_init(qemu_s390_skeys_register_types) +DEFINE_TYPES(s390_skeys_types) --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393854; cv=none; d=zohomail.com; s=zohoarc; b=JzRA7FWR5qVMyDVS76DONjYWat7R9QGfTb0UpM+BA2uQJQNdIp5bc2LjCOJ4gt8PxjZ3dbfUV9K2Qq/VISFEMlDN37s5KA90OqWXBk+AaGVBeMB2l66EID478xZfA2mzQMKRCMpjxkkByrdAucqvIjkBILlsMZgFMRv/nE0xIsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393854; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MJOyC9lDbMysueFAZdSuaIrVtPn30IdXqR8iPqB2+sU=; b=B21n/1SvLsVtKAW6tmsIJ3zqJw/r6NGdcDcwJ+2/m7uu2LbDEIPOyoVeuTRXkOndlwIKO8x44sedRnFgdoUCa14sZE3zEGvPYztKbzjgV+PPwcOcP6xW22gJ90k+UBo+asPepixAIjAFvFhxLMWpmsHg54PvdJBfiGlfdJ0pAXk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393854818914.4863583211587; Wed, 23 Apr 2025 00:37:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uez-00039Q-NO; Wed, 23 Apr 2025 03:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uer-00035i-Sx for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uen-0003C9-R5 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:37 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-631-dt-iXGYHP0KJYRYS5w1Ong-1; Wed, 23 Apr 2025 03:36:28 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6ECE6180048E; Wed, 23 Apr 2025 07:36:27 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9D63119560A3; Wed, 23 Apr 2025 07:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393792; 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=MJOyC9lDbMysueFAZdSuaIrVtPn30IdXqR8iPqB2+sU=; b=iYD0rJ0eiLp21z749hYE1VOin7MbzQMGuVSmlMd1sM1nTP+77zFld2pwAOZP36OuRvKhPS xmcW8uDl45sQQiRnrexgC0e+vbby1d1XcaEiJ3sGWoMuKYi9oW3zgU4VoOuX+P/Yr+IoKx PhgaE5A4AelqIrBenAppzx4Hq+WM3PA= X-MC-Unique: dt-iXGYHP0KJYRYS5w1Ong-1 X-Mimecast-MFC-AGG-ID: dt-iXGYHP0KJYRYS5w1Ong_1745393787 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Farman Subject: [PULL 06/29] hw/s390x/skeys: Introduce TYPE_DUMP_SKEYS_INTERFACE Date: Wed, 23 Apr 2025 09:35:46 +0200 Message-ID: <20250423073610.271585-7-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393856679019100 From: Philippe Mathieu-Daud=C3=A9 The storage keys are part of the machine memory. Introduce the TYPE_DUMP_SKEYS_INTERFACE type, allowing machine using storage keys to dump them when a DumpSKeysInterface::qmp_dump_skeys() callback is provided. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Eric Farman Reviewed-by: Thomas Huth Message-ID: <20250310151414.11550-3-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/s390x/storage-keys.h | 15 +++++++++++++++ hw/s390x/s390-skeys.c | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/include/hw/s390x/storage-keys.h b/include/hw/s390x/storage-key= s.h index 408d2815d4d..fb766d4631b 100644 --- a/include/hw/s390x/storage-keys.h +++ b/include/hw/s390x/storage-keys.h @@ -125,4 +125,19 @@ S390SKeysState *s390_get_skeys_device(void); void hmp_dump_skeys(Monitor *mon, const QDict *qdict); void hmp_info_skeys(Monitor *mon, const QDict *qdict); =20 +#define TYPE_DUMP_SKEYS_INTERFACE "dump-skeys-interface" + +typedef struct DumpSKeysInterface DumpSKeysInterface; +DECLARE_CLASS_CHECKERS(DumpSKeysInterface, DUMP_SKEYS_INTERFACE, + TYPE_DUMP_SKEYS_INTERFACE) + +struct DumpSKeysInterface { + InterfaceClass parent_class; + + /** + * @qmp_dump_skeys: Callback to dump guest's storage keys to @filename. + */ + void (*qmp_dump_skeys)(const char *filename, Error **errp); +}; + #endif /* S390_STORAGE_KEYS_H */ diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index d50e71b927a..0d3d4f74b4c 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -474,6 +474,11 @@ static void s390_skeys_class_init(ObjectClass *oc, voi= d *data) } =20 static const TypeInfo s390_skeys_types[] =3D { + { + .name =3D TYPE_DUMP_SKEYS_INTERFACE, + .parent =3D TYPE_INTERFACE, + .class_size =3D sizeof(DumpSKeysInterface), + }, { .name =3D TYPE_S390_SKEYS, .parent =3D TYPE_DEVICE, --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393865; cv=none; d=zohomail.com; s=zohoarc; b=n/E1loR4o7xLuWdxtRv6dPMBwtg9La7LBrfbEYAyLlUFTitxmip3U593FBkS14ZgG37Tg/bQFS4Yduo1bYwiGMARxq1pjepBulMbPKOacvfUhOMzCAwKtEFnufNrJQtV0dBGgVcLeOEq9ysnLs9pSDLm/FnLb1NJsjDC3q3+uXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393865; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BZ/eXcpCCsGiVTk4N5coU9eooUkh5nCsv6FjPS3I6To=; b=G5c3Ev19H8ApF6chIbvoFjXz2JzzuMsD2P4Nkts2Y096LquxcFTTvhDRQcsW821QX8WtUtPWzrkLhk7tR7F1uYZK1rrVt2KBIVTKYOV+GCz9v/R3niMim7sCjVDrGnlC8GhtBdTUm1d51os1Jn51Tbe38CWfV4PyQSegPeNV3Jg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393865326979.1315335111925; Wed, 23 Apr 2025 00:37:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uez-000399-ID; Wed, 23 Apr 2025 03:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uet-00035r-TD for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uer-0003D5-Ks for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:39 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-KphQ_9pFNX6U97b4_WrgIw-1; Wed, 23 Apr 2025 03:36:32 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 83366180034A; Wed, 23 Apr 2025 07:36:31 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 79D331955BCB; Wed, 23 Apr 2025 07:36:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393796; 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=BZ/eXcpCCsGiVTk4N5coU9eooUkh5nCsv6FjPS3I6To=; b=CzAWrfnHzbrt7lO+y9nMDt4zhFI5nFGo0sa7sp7HcCK0or3jg564ZQ4PT96rrOiK0N1IEw wK7t9U8N+v3nMxxW3P4ply1njMyeQ+4jE9s24gR4BMy9bcRc/7xlht92EuR/icOFSptNPU 8eZAeeTaFCcNqF2filpoQE6LjwVRU8A= X-MC-Unique: KphQ_9pFNX6U97b4_WrgIw-1 X-Mimecast-MFC-AGG-ID: KphQ_9pFNX6U97b4_WrgIw_1745393791 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eric Farman Subject: [PULL 07/29] hw/s390x/ccw: Have CCW machine implement a qmp_dump_skeys() callback Date: Wed, 23 Apr 2025 09:35:47 +0200 Message-ID: <20250423073610.271585-8-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393865745019000 From: Philippe Mathieu-Daud=C3=A9 In preparation to make @dump-skeys command generic, extract s390_qmp_dump_skeys() out of qmp_dump_skeys(). Register it as CCW qmp_dump_skeys() callback. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Eric Farman Message-ID: <20250310151414.11550-4-philmd@linaro.org> Signed-off-by: Thomas Huth --- include/hw/s390x/storage-keys.h | 1 + hw/s390x/s390-skeys.c | 7 ++++++- hw/s390x/s390-virtio-ccw.c | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/hw/s390x/storage-keys.h b/include/hw/s390x/storage-key= s.h index fb766d4631b..ac303001f57 100644 --- a/include/hw/s390x/storage-keys.h +++ b/include/hw/s390x/storage-keys.h @@ -122,6 +122,7 @@ int s390_skeys_set(S390SKeysState *ks, uint64_t start_g= fn, =20 S390SKeysState *s390_get_skeys_device(void); =20 +void s390_qmp_dump_skeys(const char *filename, Error **errp); void hmp_dump_skeys(Monitor *mon, const QDict *qdict); void hmp_info_skeys(Monitor *mon, const QDict *qdict); =20 diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 0d3d4f74b4c..fd1123b0f35 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -142,7 +142,7 @@ void hmp_dump_skeys(Monitor *mon, const QDict *qdict) } } =20 -void qmp_dump_skeys(const char *filename, Error **errp) +void s390_qmp_dump_skeys(const char *filename, Error **errp) { S390SKeysState *ss =3D s390_get_skeys_device(); S390SKeysClass *skeyclass =3D S390_SKEYS_GET_CLASS(ss); @@ -219,6 +219,11 @@ out: fclose(f); } =20 +void qmp_dump_skeys(const char *filename, Error **errp) +{ + s390_qmp_dump_skeys(filename, errp); +} + static bool qemu_s390_skeys_are_enabled(S390SKeysState *ss) { QEMUS390SKeysState *skeys =3D QEMU_S390_SKEYS(ss); diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 72de2bd8dc9..910dab08319 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -810,6 +810,7 @@ static void ccw_machine_class_init(ObjectClass *oc, voi= d *data) NMIClass *nc =3D NMI_CLASS(oc); HotplugHandlerClass *hc =3D HOTPLUG_HANDLER_CLASS(oc); S390CcwMachineClass *s390mc =3D S390_CCW_MACHINE_CLASS(mc); + DumpSKeysInterface *dsi =3D DUMP_SKEYS_INTERFACE_CLASS(oc); =20 s390mc->hpage_1m_allowed =3D true; s390mc->max_threads =3D 1; @@ -835,6 +836,7 @@ static void ccw_machine_class_init(ObjectClass *oc, voi= d *data) nc->nmi_monitor_handler =3D s390_nmi; mc->default_ram_id =3D "s390.ram"; mc->default_nic =3D "virtio-net-ccw"; + dsi->qmp_dump_skeys =3D s390_qmp_dump_skeys; =20 object_class_property_add_bool(oc, "aes-key-wrap", machine_get_aes_key_wrap, @@ -876,6 +878,7 @@ static const TypeInfo ccw_machine_info =3D { .interfaces =3D (InterfaceInfo[]) { { TYPE_NMI }, { TYPE_HOTPLUG_HANDLER}, + { TYPE_DUMP_SKEYS_INTERFACE}, { } }, }; --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745394029; cv=none; d=zohomail.com; s=zohoarc; b=OuXADXsZt2zZ+WMMDGe4AnTwnOsUODGFar4sp8ucBZAZxxfeVPd1brinjMqY5+YwbhmOXslisI5juX6whz7AYBcDxh1/uY/8JVapLUf3gYtSlqp2jtn8u96y+AfbgljOLXNYmna/eJl6ZytezFxGnu1fNvYkw2kTM+hPkKAnJTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745394029; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ubksxwnn3dIlQGpMZRKeufkjtSTvTnQ8+cVCN30GioI=; b=iZ0BC4bbKKJUyONsT6TONFVyxPTf1Mk52pL4DKKl54/yPJGZIGwA54Ja1/KVKFsgSbf6sdTTHhbz9dNkg6z+SW5VDvHTVg0n5RHXBMo8lIVI2bVr0T1lxcL6qZhjSdYBRo3r2O/AnUNVBiWAiW8/itRit0m692z5zx6DNF3oOls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745394029849551.8094487750394; Wed, 23 Apr 2025 00:40:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfN-0003JO-Fu; Wed, 23 Apr 2025 03:37:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uez-00039C-Gq for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uex-0003Dq-CG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:45 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-121-9ssyua85NtyWGIIb4xbZzA-1; Wed, 23 Apr 2025 03:36:34 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 85C941956048; Wed, 23 Apr 2025 07:36:33 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EC4F71955BCB; Wed, 23 Apr 2025 07:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393800; 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=Ubksxwnn3dIlQGpMZRKeufkjtSTvTnQ8+cVCN30GioI=; b=KWtlGEjOybUpjr9ZycAp5sFG99+vym6mm+XCybs5JASBPWDiPN5WnyIr5MX0I+ITbYHEJV mNZ7/KJ9uIWIfgZ6sbMEg6iFRM43dYdInJOb5EPQbTA2BIF2lE0qgjhapq5g1l2a3u6jTt n+Y0u5mCmczX+3DpdkF7EEWthgEaWjo= X-MC-Unique: 9ssyua85NtyWGIIb4xbZzA-1 X-Mimecast-MFC-AGG-ID: 9ssyua85NtyWGIIb4xbZzA_1745393793 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 08/29] qapi/machine: Make @dump-skeys command generic Date: Wed, 23 Apr 2025 09:35:48 +0200 Message-ID: <20250423073610.271585-9-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745394030428019000 From: Philippe Mathieu-Daud=C3=A9 Reduce misc-target.json by one target specific command. Error message is returned for machines not implementing TYPE_DUMP_SKEYS_INTERFACE: $ qemu-system-aarch64 -M virt -S -qmp stdio {"QMP": {"version": {"qemu": {"micro": 50, "major": 9}}, "capabilities": = ["oob"]}} { "execute": "qmp_capabilities" } {"return": {}} { "execute": "dump-skeys", "arguments": { "filename": "/tmp/foo" } } {"error": {"class": "GenericError", "desc": "Storage keys information not= available for this architecture"}} Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-ID: <20250310151414.11550-5-philmd@linaro.org> Signed-off-by: Thomas Huth --- qapi/machine.json | 18 ++++++++++++++++++ qapi/misc-target.json | 19 ------------------- hw/core/machine-qmp-cmds.c | 14 ++++++++++++++ hw/s390x/s390-skeys.c | 6 +----- 4 files changed, 33 insertions(+), 24 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index a6b8795b09e..a9ff8076317 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1898,3 +1898,21 @@ { 'command': 'x-query-interrupt-controllers', 'returns': 'HumanReadableText', 'features': [ 'unstable' ]} + +## +# @dump-skeys: +# +# Dump the storage keys for an s390x guest +# +# @filename: the path to the file to dump to +# +# Since: 2.5 +# +# .. qmp-example:: +# +# -> { "execute": "dump-skeys", +# "arguments": { "filename": "/tmp/skeys" } } +# <- { "return": {} } +## +{ 'command': 'dump-skeys', + 'data': { 'filename': 'str' } } diff --git a/qapi/misc-target.json b/qapi/misc-target.json index 8d70bd24d8c..42e4a7417dc 100644 --- a/qapi/misc-target.json +++ b/qapi/misc-target.json @@ -274,25 +274,6 @@ 'returns': 'SevAttestationReport', 'if': 'TARGET_I386' } =20 -## -# @dump-skeys: -# -# Dump guest's storage keys -# -# @filename: the path to the file to dump to -# -# Since: 2.5 -# -# .. qmp-example:: -# -# -> { "execute": "dump-skeys", -# "arguments": { "filename": "/tmp/skeys" } } -# <- { "return": {} } -## -{ 'command': 'dump-skeys', - 'data': { 'filename': 'str' }, - 'if': 'TARGET_S390X' } - ## # @GICCapability: # diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 3130c5cd456..fd8b4e0b44c 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -25,6 +25,7 @@ #include "system/numa.h" #include "system/runstate.h" #include "system/system.h" +#include "hw/s390x/storage-keys.h" =20 /* * fast means: we NEVER interrupt vCPU threads to retrieve @@ -406,3 +407,16 @@ GuidInfo *qmp_query_vm_generation_id(Error **errp) info->guid =3D qemu_uuid_unparse_strdup(&vms->guid); return info; } + +void qmp_dump_skeys(const char *filename, Error **errp) +{ + ObjectClass *mc =3D object_get_class(qdev_get_machine()); + ObjectClass *oc =3D object_class_dynamic_cast(mc, TYPE_DUMP_SKEYS_INTE= RFACE); + + if (!oc) { + error_setg(errp, "Storage keys information not available" + " for this architecture"); + return; + } + DUMP_SKEYS_INTERFACE_CLASS(oc)->qmp_dump_skeys(filename, errp); +} diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index fd1123b0f35..067ea037268 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -15,6 +15,7 @@ #include "hw/qdev-properties.h" #include "hw/s390x/storage-keys.h" #include "qapi/error.h" +#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc-target.h" #include "qobject/qdict.h" #include "qemu/error-report.h" @@ -219,11 +220,6 @@ out: fclose(f); } =20 -void qmp_dump_skeys(const char *filename, Error **errp) -{ - s390_qmp_dump_skeys(filename, errp); -} - static bool qemu_s390_skeys_are_enabled(S390SKeysState *ss) { QEMUS390SKeysState *skeys =3D QEMU_S390_SKEYS(ss); --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393832; cv=none; d=zohomail.com; s=zohoarc; b=BUw7vgQq0Pq6d4tTnlISOvWHjjosQDf2jD/50mP3PVb6Zyj6Or6nm/ZeexzfJywOSlH8upQ3oO/aRY/o/aahncbV2gcQxKq8e1bvXAPqByVYtnzfr1P9BgrNhfPIyngWwcTeNF4GoqNN2cwj4NDdABtD6PtoZiXs4PTZfGrZqqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393832; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Cl21NGghQLqZCX6woUJ4ZBCPtjaIbo7EPrRB3h/znF4=; b=RyqLZ+hQK/VhdOvJJvp/5c2d9K+DDZrTBlK+mY+/8uWmIEkme3i3bCJd3h3lGjs3XfVhpXvO03XsTIx6pR0onSClz8MxHaw6ZVsNpoe+Kc6+NOfWQHPXeNwg+aEekkiIEknZ+wKHl6GgF4R9hSCrqNshw+ztwrfyKsc8anCRN8M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393832870970.4788111390475; Wed, 23 Apr 2025 00:37:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uf9-0003Ca-Ei; Wed, 23 Apr 2025 03:37:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uez-00039S-L1 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uex-0003Du-D8 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:45 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-359-Ins2K6-2OWuL0x6uhnhQZQ-1; Wed, 23 Apr 2025 03:36:37 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 64BD51800263; Wed, 23 Apr 2025 07:36:36 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EEB0D19560A3; Wed, 23 Apr 2025 07:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cl21NGghQLqZCX6woUJ4ZBCPtjaIbo7EPrRB3h/znF4=; b=K8qOH6eBevfCVLS2Aj4fpLUsXR2nu7q5agvCoWaqX1NF5/o1WMcCko7N2NZffkB6ZM7G4b fddRv1nUqUOxZl8Tn/qL837pmXXkAVng55n3hDcyP3J/34QqatSXl9GYdje1dMj+48drpd ySBgkEjxGvV3X5M6y3iArNhD/uASiuk= X-MC-Unique: Ins2K6-2OWuL0x6uhnhQZQ-1 X-Mimecast-MFC-AGG-ID: Ins2K6-2OWuL0x6uhnhQZQ_1745393796 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , Cornelia Huck , Zhao Liu , "Michael S. Tsirkin" Subject: [PULL 09/29] hw: add compat machines for 10.1 Date: Wed, 23 Apr 2025 09:35:49 +0200 Message-ID: <20250423073610.271585-10-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393834607019000 Content-Type: text/plain; charset="utf-8" From: Cornelia Huck Add 10.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck Reviewed-by: Zhao Liu Reviewed-by: Thomas Huth Acked-by: Michael S. Tsirkin Message-ID: <20250414094543.221241-1-cohuck@redhat.com> Signed-off-by: Thomas Huth --- include/hw/boards.h | 3 +++ include/hw/i386/pc.h | 3 +++ hw/arm/virt.c | 9 ++++++++- hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 13 +++++++++++-- hw/i386/pc_q35.c | 13 +++++++++++-- hw/m68k/virt.c | 9 ++++++++- hw/ppc/spapr.c | 15 +++++++++++++-- hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++- 10 files changed, 76 insertions(+), 9 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index f22b2e7fc75..bfe8643a27a 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -761,6 +761,9 @@ struct MachineState { } \ type_init(machine_initfn##_register_types) =20 +extern GlobalProperty hw_compat_10_0[]; +extern const size_t hw_compat_10_0_len; + extern GlobalProperty hw_compat_9_2[]; extern const size_t hw_compat_9_2_len; =20 diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 103b54301f8..8677dc8950b 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -215,6 +215,9 @@ void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, siz= e_t flash_size); /* sgx.c */ void pc_machine_init_sgx_epc(PCMachineState *pcms); =20 +extern GlobalProperty pc_compat_10_0[]; +extern const size_t pc_compat_10_0_len; + extern GlobalProperty pc_compat_9_2[]; extern const size_t pc_compat_9_2_len; =20 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a96452f17a4..3e72adaa918 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3408,10 +3408,17 @@ static void machvirt_machine_init(void) } type_init(machvirt_machine_init); =20 +static void virt_machine_10_1_options(MachineClass *mc) +{ +} +DEFINE_VIRT_MACHINE_AS_LATEST(10, 1) + static void virt_machine_10_0_options(MachineClass *mc) { + virt_machine_10_1_options(mc); + compat_props_add(mc->compat_props, hw_compat_10_0, hw_compat_10_0_len); } -DEFINE_VIRT_MACHINE_AS_LATEST(10, 0) +DEFINE_VIRT_MACHINE(10, 0) =20 static void virt_machine_9_2_options(MachineClass *mc) { diff --git a/hw/core/machine.c b/hw/core/machine.c index 63c6ef93d29..abfcedd4a5f 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -37,6 +37,9 @@ #include "hw/virtio/virtio-iommu.h" #include "audio/audio.h" =20 +GlobalProperty hw_compat_10_0[] =3D {}; +const size_t hw_compat_10_0_len =3D G_N_ELEMENTS(hw_compat_10_0); + GlobalProperty hw_compat_9_2[] =3D { {"arm-cpu", "backcompat-pauth-default-use-qarma5", "true"}, { "virtio-balloon-pci", "vectors", "0" }, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 01d0581f62a..1b5d55e96d5 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -79,6 +79,9 @@ { "qemu64-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, }= ,\ { "athlon-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, }, =20 +GlobalProperty pc_compat_10_0[] =3D {}; +const size_t pc_compat_10_0_len =3D G_N_ELEMENTS(pc_compat_10_0); + GlobalProperty pc_compat_9_2[] =3D {}; const size_t pc_compat_9_2_len =3D G_N_ELEMENTS(pc_compat_9_2); =20 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 6c91e2d2929..dbb59df64f7 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -479,12 +479,21 @@ static void pc_i440fx_machine_options(MachineClass *m) "Use a different south bridge than PI= IX3"); } =20 -static void pc_i440fx_machine_10_0_options(MachineClass *m) +static void pc_i440fx_machine_10_1_options(MachineClass *m) { pc_i440fx_machine_options(m); } =20 -DEFINE_I440FX_MACHINE_AS_LATEST(10, 0); +DEFINE_I440FX_MACHINE_AS_LATEST(10, 1); + +static void pc_i440fx_machine_10_0_options(MachineClass *m) +{ + pc_i440fx_machine_10_1_options(m); + compat_props_add(m->compat_props, hw_compat_10_0, hw_compat_10_0_len); + compat_props_add(m->compat_props, pc_compat_10_0, pc_compat_10_0_len); +} + +DEFINE_I440FX_MACHINE(10, 0); =20 static void pc_i440fx_machine_9_2_options(MachineClass *m) { diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index fd96d0345c7..c538b3d05b4 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -361,12 +361,21 @@ static void pc_q35_machine_options(MachineClass *m) pc_q35_compat_defaults, pc_q35_compat_defaults_len); } =20 -static void pc_q35_machine_10_0_options(MachineClass *m) +static void pc_q35_machine_10_1_options(MachineClass *m) { pc_q35_machine_options(m); } =20 -DEFINE_Q35_MACHINE_AS_LATEST(10, 0); +DEFINE_Q35_MACHINE_AS_LATEST(10, 1); + +static void pc_q35_machine_10_0_options(MachineClass *m) +{ + pc_q35_machine_10_1_options(m); + compat_props_add(m->compat_props, hw_compat_10_0, hw_compat_10_0_len); + compat_props_add(m->compat_props, pc_compat_10_0, pc_compat_10_0_len); +} + +DEFINE_Q35_MACHINE(10, 0); =20 static void pc_q35_machine_9_2_options(MachineClass *m) { diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index d967bdd7438..295a614e161 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -366,10 +366,17 @@ type_init(virt_machine_register_types) #define DEFINE_VIRT_MACHINE(major, minor) \ DEFINE_VIRT_MACHINE_IMPL(false, major, minor) =20 +static void virt_machine_10_1_options(MachineClass *mc) +{ +} +DEFINE_VIRT_MACHINE_AS_LATEST(10, 1) + static void virt_machine_10_0_options(MachineClass *mc) { + virt_machine_10_1_options(mc); + compat_props_add(mc->compat_props, hw_compat_10_0, hw_compat_10_0_len); } -DEFINE_VIRT_MACHINE_AS_LATEST(10, 0) +DEFINE_VIRT_MACHINE(10, 0) =20 static void virt_machine_9_2_options(MachineClass *mc) { diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index b0a0f8c6895..6fef1d167ae 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4766,15 +4766,26 @@ static void spapr_machine_latest_class_options(Mach= ineClass *mc) #define DEFINE_SPAPR_MACHINE(major, minor) \ DEFINE_SPAPR_MACHINE_IMPL(false, major, minor) =20 +/* + * pseries-10.1 + */ +static void spapr_machine_10_1_class_options(MachineClass *mc) +{ + /* Defaults for the latest behaviour inherited from the base class */ +} + +DEFINE_SPAPR_MACHINE_AS_LATEST(10, 1); + /* * pseries-10.0 */ static void spapr_machine_10_0_class_options(MachineClass *mc) { - /* Defaults for the latest behaviour inherited from the base class */ + spapr_machine_10_1_class_options(mc); + compat_props_add(mc->compat_props, hw_compat_10_0, hw_compat_10_0_len); } =20 -DEFINE_SPAPR_MACHINE_AS_LATEST(10, 0); +DEFINE_SPAPR_MACHINE(10, 0); =20 /* * pseries-9.2 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 910dab08319..5af3c4f547a 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -924,14 +924,26 @@ static const TypeInfo ccw_machine_info =3D { DEFINE_CCW_MACHINE_IMPL(false, major, minor) =20 =20 +static void ccw_machine_10_1_instance_options(MachineState *machine) +{ +} + +static void ccw_machine_10_1_class_options(MachineClass *mc) +{ +} +DEFINE_CCW_MACHINE_AS_LATEST(10, 1); + static void ccw_machine_10_0_instance_options(MachineState *machine) { + ccw_machine_10_1_instance_options(machine); } =20 static void ccw_machine_10_0_class_options(MachineClass *mc) { + ccw_machine_10_1_class_options(mc); + compat_props_add(mc->compat_props, hw_compat_10_0, hw_compat_10_0_len); } -DEFINE_CCW_MACHINE_AS_LATEST(10, 0); +DEFINE_CCW_MACHINE(10, 0); =20 static void ccw_machine_9_2_instance_options(MachineState *machine) { --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393854; cv=none; d=zohomail.com; s=zohoarc; b=k/txbBQObZ/llPqeet0lbC76G0JoJWZalqPmW/GUsxA2oKzfgWuglngxvMDz1DuxQNWksHhwJ1XXbokAVqj553z7VxOwG/U5Qz790Q0Uujv+0N30CXpCzQqVEePomauPsiZHH+WbRQF5KBpMwkMai8qL1fwRliUJIWHHKwtFl1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393854; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ezSNZBaDWTUNhhDWqObC87JDGOmPt3d3UVSSdJMllqs=; b=klW22VgWTSgef+ZfyYXD142fkPGsrR5QNzKE8nh2jkhYG1a3i8EDN2/QI/W4bG6q+agreK2CSrakZiHXkFXFKPzcCFZZVC0ze1CxRFwaJCEQYsUn1s3dcQ0pgbtM7k2vm9AV1TXMnf9yW4d+UFG1dlWkYR9rVa3sq/Bnys/mMO8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393854197740.7581840837239; Wed, 23 Apr 2025 00:37:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfO-0003Ji-L1; Wed, 23 Apr 2025 03:37:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uf0-0003Aw-Uu for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uey-0003EU-QO for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:46 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-423-ouxt8bMVPf2F_AiJoyGZnA-1; Wed, 23 Apr 2025 03:36:40 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3F8ED18001CA; Wed, 23 Apr 2025 07:36:39 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CCE9C19560A3; Wed, 23 Apr 2025 07:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ezSNZBaDWTUNhhDWqObC87JDGOmPt3d3UVSSdJMllqs=; b=izdUgU+D6L+00pAPP+Epy750qeUYxvJjz4Xx7Q/4vyEyBCghPodnsZS8OJL59H8y/7RCTu sMEwMbz9fBGY0DOqu3u5Fes9aLRtsKiITR42mGVz6cfIJvvO6NYpwHr9VQlByHXby69j2M GofbLVYcGTcwY3f+ZGXWewOWLiCdaa0= X-MC-Unique: ouxt8bMVPf2F_AiJoyGZnA-1 X-Mimecast-MFC-AGG-ID: ouxt8bMVPf2F_AiJoyGZnA_1745393799 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , Cornelia Huck Subject: [PULL 10/29] tests/functional/test_vnc: skip test if no crypto backend available Date: Wed, 23 Apr 2025 09:35:50 +0200 Message-ID: <20250423073610.271585-11-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393855659019000 Content-Type: text/plain; charset="utf-8" From: Cornelia Huck The test_change_password test will fail if no cryptographic backend is available (e.g. if QEMU was built on a system with no cryptographic library development packages installed); just skip the test in that case. Signed-off-by: Cornelia Huck Reviewed-by: Thomas Huth Message-ID: <20250414093732.220498-1-cohuck@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/test_vnc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/test_vnc.py b/tests/functional/test_vnc.py index 8c9953bdb00..d4e9dd0279e 100755 --- a/tests/functional/test_vnc.py +++ b/tests/functional/test_vnc.py @@ -55,6 +55,8 @@ def launch_guarded(self): except VMLaunchFailure as excp: if "-vnc: invalid option" in excp.output: self.skipTest("VNC support not available") + elif "Cipher backend does not support DES algorithm" in excp.o= utput: + self.skipTest("No cryptographic backend available") else: self.log.info("unhandled launch failure: %s", excp.output) raise excp --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745394041; cv=none; d=zohomail.com; s=zohoarc; b=D5y53nzRHCfLdR1gGAuDxzz6grfCza+YPxUMt9lGwQ8oOna9tS6tTbTSJW4Q5oSb9Q/j37pnV2HAwZiK3VhBV+2rEDTSXqAdHOxKkDsq+Z5+z2D2++8B281AQWr9q/VMoseW4Qz/dKsRS/hW4c6/T4mzU8mELkXm59TTB669VhI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745394041; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NoJqJYXztgmuFP3rAkyoIPzLq12ayOVKZBU2eCC8Is4=; b=nk2jGA+kGH9w9UQpzmmfs9q/7dkMV08va5BBmTYq6TuRPx7RyeZI3eG2yMEb45WDtVbij5duiRucKLGZuiBn5MtAepzZSGAmoB3EdsiSEnMBCX9AwdgMYOh0dvu1AHnrPeJNB3xjbZS7G6hrhJTEei3zQJ60Slv9mFlhYSfBcxw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745394041097988.5594990967935; Wed, 23 Apr 2025 00:40:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfO-0003Jh-HE; Wed, 23 Apr 2025 03:37:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uf3-0003Cg-LD for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uf0-0003FK-QJ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:48 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-503-ouA9gfq4Mk6gOdU6SknXbw-1; Wed, 23 Apr 2025 03:36:42 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4158A1800879; Wed, 23 Apr 2025 07:36:41 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A93B719560A3; Wed, 23 Apr 2025 07:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393806; 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=NoJqJYXztgmuFP3rAkyoIPzLq12ayOVKZBU2eCC8Is4=; b=X/heM+zZI8cPHuFkWb52e6rLWMjcC4jSMBnReFw1Yx+zd8f1r+U8LNvG6GtRFXIvtAx2mb k1zSBHzZpmbAnKgeogYDFuXgluRsdFTM/VR74JAC1waEVg3e1pOJ1CArrZ+/t1l1ZogOeb KJL9f/9iDhmcH6rCwmaTcqiX4/VjxOA= X-MC-Unique: ouA9gfq4Mk6gOdU6SknXbw-1 X-Mimecast-MFC-AGG-ID: ouA9gfq4Mk6gOdU6SknXbw_1745393801 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 11/29] gitlab-ci: Remove the avocado tests from the CI pipelines Date: Wed, 23 Apr 2025 09:35:51 +0200 Message-ID: <20250423073610.271585-12-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745394043365019100 From: Thomas Huth We are going to move the remaining Avocado tests step by step into the functional test framework. Unfortunately, Avocado fails with an error if it cannot determine a test to run, so disable the tests here now to avoid failures in the Gitlab-CI during the next steps. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-2-thuth@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest-template.yml | 11 ---------- .gitlab-ci.d/buildtest.yml | 33 +++++++++++------------------ 2 files changed, 12 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml index 39da7698b09..13fa4f4a4fc 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -95,7 +95,6 @@ cache: key: "${CI_JOB_NAME}-cache" paths: - - ${CI_PROJECT_DIR}/avocado-cache - ${CI_PROJECT_DIR}/functional-cache policy: pull-push artifacts: @@ -109,16 +108,6 @@ reports: junit: build/tests/results/latest/results.xml before_script: - - mkdir -p ~/.config/avocado - - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf - - echo "cache_dirs =3D ['${CI_PROJECT_DIR}/avocado-cache']" - >> ~/.config/avocado/avocado.conf - - echo -e '[job.output.testlogs]\nstatuses =3D ["FAIL", "INTERRUPT"]' - >> ~/.config/avocado/avocado.conf - - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then - du -chs ${CI_PROJECT_DIR}/*-cache ; - fi - - export AVOCADO_ALLOW_UNTRUSTED_CODE=3D1 - export QEMU_TEST_ALLOW_UNTRUSTED_CODE=3D1 - export QEMU_TEST_CACHE_DIR=3D${CI_PROJECT_DIR}/functional-cache after_script: diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 00f4bfcd9f3..431bc07d8fb 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -29,8 +29,7 @@ functional-system-alpine: artifacts: true variables: IMAGE: alpine - MAKE_CHECK_ARGS: check-avocado check-functional - AVOCADO_TAGS: arch:avr arch:loongarch64 arch:mips64 arch:mipsel + MAKE_CHECK_ARGS: check-functional =20 build-system-ubuntu: extends: @@ -60,8 +59,7 @@ functional-system-ubuntu: artifacts: true variables: IMAGE: ubuntu2204 - MAKE_CHECK_ARGS: check-avocado check-functional - AVOCADO_TAGS: arch:alpha arch:microblazeel arch:mips64el + MAKE_CHECK_ARGS: check-functional =20 build-system-debian: extends: @@ -92,8 +90,7 @@ functional-system-debian: artifacts: true variables: IMAGE: debian - MAKE_CHECK_ARGS: check-avocado check-functional - AVOCADO_TAGS: arch:arm arch:i386 arch:riscv64 arch:sh4 arch:sparc arch= :xtensa + MAKE_CHECK_ARGS: check-functional =20 crash-test-debian: extends: .native_test_job_template @@ -155,9 +152,7 @@ functional-system-fedora: artifacts: true variables: IMAGE: fedora - MAKE_CHECK_ARGS: check-avocado check-functional - AVOCADO_TAGS: arch:microblaze arch:mips arch:xtensa arch:m68k - arch:riscv32 arch:ppc arch:sparc64 + MAKE_CHECK_ARGS: check-functional =20 crash-test-fedora: extends: .native_test_job_template @@ -278,9 +273,7 @@ functional-system-centos: artifacts: true variables: IMAGE: centos9 - MAKE_CHECK_ARGS: check-avocado check-functional - AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx - arch:sh4 + MAKE_CHECK_ARGS: check-functional =20 build-system-opensuse: extends: @@ -309,8 +302,7 @@ functional-system-opensuse: artifacts: true variables: IMAGE: opensuse-leap - MAKE_CHECK_ARGS: check-avocado check-functional - AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64 + MAKE_CHECK_ARGS: check-functional =20 # # Flaky tests. We don't run these by default and they are allow fail @@ -338,10 +330,9 @@ functional-system-flaky: allow_failure: true variables: IMAGE: debian - MAKE_CHECK_ARGS: check-avocado check-functional + MAKE_CHECK_ARGS: check-functional QEMU_JOB_OPTIONAL: 1 QEMU_TEST_FLAKY_TESTS: 1 - AVOCADO_TAGS: flaky =20 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by # the configure script. The container doesn't contain Xen headers so @@ -482,8 +473,8 @@ clang-user: # Since slirp callbacks are used in QEMU Timers, we cannot use libslirp wi= th # CFI builds, and thus have to disable it here. # -# Split in three sets of build/check/avocado to limit the execution time o= f each -# job +# Split in three sets of build/check/functional to limit the execution time +# of each job build-cfi-aarch64: extends: - .native_build_job_template @@ -520,7 +511,7 @@ functional-cfi-aarch64: artifacts: true variables: IMAGE: fedora - MAKE_CHECK_ARGS: check-avocado check-functional + MAKE_CHECK_ARGS: check-functional =20 build-cfi-ppc64-s390x: extends: @@ -558,7 +549,7 @@ functional-cfi-ppc64-s390x: artifacts: true variables: IMAGE: fedora - MAKE_CHECK_ARGS: check-avocado check-functional + MAKE_CHECK_ARGS: check-functional =20 build-cfi-x86_64: extends: @@ -592,7 +583,7 @@ functional-cfi-x86_64: artifacts: true variables: IMAGE: fedora - MAKE_CHECK_ARGS: check-avocado check-functional + MAKE_CHECK_ARGS: check-functional =20 tsan-build: extends: .native_build_job_template --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745394061; cv=none; d=zohomail.com; s=zohoarc; b=A5LcR0G3kfZQ177i3BIq+XGY+Z5cNXO9SqrH6//XZFQogpUI3pYU1xAbLbgEvPfYs3F0H34n0sD9+E3lBZfxEYlelvwVbfg/DPlyKDj1uWpZpFNIGWNLlU8QW7rdLtm46qddCVNHytcL/bqGc4Mp5xNswwMgna1p7i39zwZi5ZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745394061; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XuYsJZmAHSsf0fka7NTw+O2fem47q2v31G+goYFFUD8=; b=m8Gd8EiJbc+LkVMnndgd6s+hNPpuQb60T1NlMWt2WLaG3R6g98hJgTvQbjAkabvyDDx301w1gVbSIFIRI8g5fuHOeUzPz2OgBUwLXfuT8OrcmxwpmOGQlKa8IPnqe3a0FS9KJdXLjaz7ypvv41baBLi5zwqLiuzmiP82w4IUCdc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745394061812859.9746670758167; Wed, 23 Apr 2025 00:41:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfN-0003IL-28; Wed, 23 Apr 2025 03:37:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uf7-0003D8-C6 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uf3-0003Fl-Hh for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:52 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-NW9VvMEFO5imdiiuKPIKiw-1; Wed, 23 Apr 2025 03:36:44 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4411D1800983; Wed, 23 Apr 2025 07:36:43 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AB2F019560A3; Wed, 23 Apr 2025 07:36:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393807; 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=XuYsJZmAHSsf0fka7NTw+O2fem47q2v31G+goYFFUD8=; b=H6ElPiUyVq1Gf4rFwn5CsLtI1IApYvP1zNh5l7wweUcnwOV0OlP4gOI6Z9Hws0L+rtEQrZ OOP1pzyfvm1xnzDm+GdiMVvRjNYk9jENUzcKH4Y+sWLvmj0ZwQKKuYFTb0l/5prLw8h76v VoTUNVfRxIiGlahp2xkSTCLvLq1qsbc= X-MC-Unique: NW9VvMEFO5imdiiuKPIKiw-1 X-Mimecast-MFC-AGG-ID: NW9VvMEFO5imdiiuKPIKiw_1745393803 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 12/29] tests/functional: Move the check for the parameters from avocado to functional Date: Wed, 23 Apr 2025 09:35:52 +0200 Message-ID: <20250423073610.271585-13-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745394063392019100 From: Thomas Huth test_x86_64_pc in tests/avocado/boot_linux_console.py only checks whether the kernel parameters have correctly been passed to the kernel in the guest by looking for them in the console output of the guest. Let's move that to the functional test framework now, but instead of doing it in a separate test, let's do it for all tuxrun tests instead, so it is done automatically for all targets that have a tuxrun test. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-3-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 34 ------------------------ tests/functional/qemu_test/tuxruntest.py | 9 ++++--- 2 files changed, 5 insertions(+), 38 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index c15f39ae1f3..cbb1e2fb506 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -9,17 +9,9 @@ # later. See the COPYING file in the top-level directory. =20 import os -import lzma -import gzip import shutil =20 -from avocado import skip -from avocado import skipUnless -from avocado import skipUnless from avocado_qemu import QemuSystemTest -from avocado_qemu import exec_command -from avocado_qemu import exec_command_and_wait_for_pattern -from avocado_qemu import interrupt_interactive_console_until_pattern from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive @@ -68,29 +60,3 @@ def extract_from_rpm(self, rpm, path): process.run("rpm2cpio %s | cpio -id %s" % (rpm, path), shell=3DTru= e) os.chdir(cwd) return os.path.normpath(os.path.join(self.workdir, path)) - -class BootLinuxConsole(LinuxKernelTest): - """ - Boots a Linux kernel and checks that the console is operational and the - kernel command line is properly passed from QEMU to the kernel - """ - timeout =3D 90 - - def test_x86_64_pc(self): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Dmachine:pc - """ - kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/29/Everything/x86_64/os/images/pxeb= oot' - '/vmlinuz') - kernel_hash =3D '23bebd2680757891cf7adedb033532163a792495' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - - self.vm.set_console() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' - self.vm.add_args('-kernel', kernel_path, - '-append', kernel_command_line) - self.vm.launch() - console_pattern =3D 'Kernel command line: %s' % kernel_command_line - self.wait_for_console_pattern(console_pattern) diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qe= mu_test/tuxruntest.py index ad74156f9c5..c2bd5baaae9 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -77,12 +77,12 @@ def prepare_run(self, kernel, disk, drive, dtb=3DNone, = console_index=3D0): blockdev =3D "driver=3Draw,file.driver=3Dfile," \ + f"file.filename=3D{disk},node-name=3Dhd0" =20 - kcmd_line =3D self.KERNEL_COMMON_COMMAND_LINE - kcmd_line +=3D f" root=3D/dev/{self.root}" - kcmd_line +=3D f" console=3D{self.console}" + self.kcmd_line =3D self.KERNEL_COMMON_COMMAND_LINE + self.kcmd_line +=3D f" root=3D/dev/{self.root}" + self.kcmd_line +=3D f" console=3D{self.console}" =20 self.vm.add_args('-kernel', kernel, - '-append', kcmd_line, + '-append', self.kcmd_line, '-blockdev', blockdev) =20 # Sometimes we need extra devices attached @@ -103,6 +103,7 @@ def run_tuxtest_tests(self, haltmsg): wait to exit cleanly. """ ps1=3D'root@tuxtest:~#' + self.wait_for_console_pattern(self.kcmd_line) self.wait_for_console_pattern('tuxtest login:') exec_command_and_wait_for_pattern(self, 'root', ps1) exec_command_and_wait_for_pattern(self, 'cat /proc/interrupts', ps= 1) --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393896; cv=none; d=zohomail.com; s=zohoarc; b=KBsHljFZ3NxgqdGtaR8nQWhnVBqOExi0UiLaqEDFmUMU5mUvRMHl0+1gr9MGwgjG57nNn1HyYBYLqWcfQ+W2nIQD3OI3VdAHkjUZMTzMg0L1bb5g/YDYfzqUWBwHDYjYs6JN+9ELRcOiB95VaHgVzcy06cWXtj1+Nn3Oua+oIbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393896; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=G0OKPTRAymMybNd7h7+XxDT2cf/0YCUAFnVHNXaeVzI=; b=gyiVr07lNt0rtjpxNl5BOr0mw0Lm/2b4MYyqjJlR9bBJRQOauVG/NC5knG0jeKppJN1OXAa4Msx9CqYSiONWzWoh/2HGQvaHKUu3/IGqyXrNWA0u9ywQyrSAj0WZCwd07kZrPoa46Sib3zJ3Kfpjsf7IXWeUKHk5phsuzt2MFkc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393896831930.3855529686676; Wed, 23 Apr 2025 00:38:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfP-0003Jo-I3; Wed, 23 Apr 2025 03:37:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uf9-0003Dk-PZ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Uf5-0003Gm-Op for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:55 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-178-r5fkF0n6N5-IDRGLPdqWtQ-1; Wed, 23 Apr 2025 03:36:46 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 45F981800263; Wed, 23 Apr 2025 07:36:45 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ADBB319560A3; Wed, 23 Apr 2025 07:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393811; 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=G0OKPTRAymMybNd7h7+XxDT2cf/0YCUAFnVHNXaeVzI=; b=LiyQ9HnoBKKyUS2DyE0Syqbh/O+Ilc+LpQANblMRJw5keGnUyOSAisDLD2V33PtzUUHlGf aCmSYP0qiZSv4CMttzpgR8xxGYOvVNHDXgBgOou2JB9g/KpS8bGJ5ombk/YL/wRQaoBEhd jQBkFqIZqJp19MQ/LselatP4mhFQuBA= X-MC-Unique: r5fkF0n6N5-IDRGLPdqWtQ-1 X-Mimecast-MFC-AGG-ID: r5fkF0n6N5-IDRGLPdqWtQ_1745393805 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 13/29] tests/functional: Convert reverse_debugging tests to the functional framework Date: Wed, 23 Apr 2025 09:35:53 +0200 Message-ID: <20250423073610.271585-14-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393898244019000 From: Thomas Huth These tests are using the gdb-related library functions from the Avocado framework which we don't have in the functional framework yet. So for the time being, keep those imports and skip the test if the Avocado framework is not installed on the host. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-4-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- tests/functional/meson.build | 4 + .../reverse_debugging.py | 114 +++--------------- .../functional/test_aarch64_reverse_debug.py | 38 ++++++ tests/functional/test_ppc64_reverse_debug.py | 41 +++++++ tests/functional/test_x86_64_reverse_debug.py | 36 ++++++ 6 files changed, 139 insertions(+), 96 deletions(-) rename tests/{avocado =3D> functional}/reverse_debugging.py (66%) create mode 100755 tests/functional/test_aarch64_reverse_debug.py create mode 100755 tests/functional/test_ppc64_reverse_debug.py create mode 100755 tests/functional/test_x86_64_reverse_debug.py diff --git a/MAINTAINERS b/MAINTAINERS index d54b5578f88..af1d847f8ed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3671,7 +3671,7 @@ F: docs/system/replay.rst F: stubs/replay.c F: tests/avocado/replay_kernel.py F: tests/avocado/replay_linux.py -F: tests/avocado/reverse_debugging.py +F: tests/functional/*reverse_debug*.py F: tests/functional/*replay*.py F: qapi/replay.json =20 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 0f8be30fe27..7b0f4ab0b1d 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -13,6 +13,7 @@ endif test_timeouts =3D { 'aarch64_aspeed' : 600, 'aarch64_raspi4' : 480, + 'aarch64_reverse_debug' : 180, 'aarch64_rme_virt' : 1200, 'aarch64_rme_sbsaref' : 1200, 'aarch64_sbsaref_alpine' : 1200, @@ -78,6 +79,7 @@ tests_aarch64_system_thorough =3D [ 'aarch64_raspi3', 'aarch64_raspi4', 'aarch64_replay', + 'aarch64_reverse_debug', 'aarch64_rme_virt', 'aarch64_rme_sbsaref', 'aarch64_sbsaref', @@ -229,6 +231,7 @@ tests_ppc64_system_thorough =3D [ 'ppc64_powernv', 'ppc64_pseries', 'ppc64_replay', + 'ppc64_reverse_debug', 'ppc64_tuxrun', 'ppc64_mac99', ] @@ -311,6 +314,7 @@ tests_x86_64_system_thorough =3D [ 'x86_64_hotplug_cpu', 'x86_64_kvm_xen', 'x86_64_replay', + 'x86_64_reverse_debug', 'x86_64_tuxrun', ] =20 diff --git a/tests/avocado/reverse_debugging.py b/tests/functional/reverse_= debugging.py similarity index 66% rename from tests/avocado/reverse_debugging.py rename to tests/functional/reverse_debugging.py index f24287cd0a0..f9a1d395f1d 100644 --- a/tests/avocado/reverse_debugging.py +++ b/tests/functional/reverse_debugging.py @@ -1,5 +1,7 @@ # Reverse debugging test # +# SPDX-License-Identifier: GPL-2.0-or-later +# # Copyright (c) 2020 ISP RAS # # Author: @@ -10,14 +12,9 @@ import os import logging =20 -from avocado import skipUnless -from avocado_qemu import BUILD_DIR -from avocado.utils import datadrainer -from avocado.utils import gdb -from avocado.utils import process -from avocado.utils.network.ports import find_free_port -from avocado.utils.path import find_command -from boot_linux_console import LinuxKernelTest +from qemu_test import LinuxKernelTest, get_qemu_img +from qemu_test.ports import Ports + =20 class ReverseDebugging(LinuxKernelTest): """ @@ -36,8 +33,10 @@ class ReverseDebugging(LinuxKernelTest): endian_is_le =3D True =20 def run_vm(self, record, shift, args, replay_path, image_path, port): + from avocado.utils import datadrainer + logger =3D logging.getLogger('replay') - vm =3D self.get_vm() + vm =3D self.get_vm(name=3D'record' if record else 'replay') vm.set_console() if record: logger.info('recording the execution...') @@ -100,25 +99,25 @@ def vm_get_icount(vm): return vm.qmp('query-replay')['return']['icount'] =20 def reverse_debugging(self, shift=3D7, args=3DNone): + from avocado.utils import gdb + from avocado.utils import process + logger =3D logging.getLogger('replay') =20 # create qcow2 for snapshots logger.info('creating qcow2 image for VM snapshots') image_path =3D os.path.join(self.workdir, 'disk.qcow2') - qemu_img =3D os.path.join(BUILD_DIR, 'qemu-img') - if not os.path.exists(qemu_img): - qemu_img =3D find_command('qemu-img', False) - if qemu_img is False: - self.cancel('Could not find "qemu-img", which is required to ' - 'create the temporary qcow2 image') + qemu_img =3D get_qemu_img(self) + if qemu_img is None: + self.skipTest('Could not find "qemu-img", which is required to= ' + 'create the temporary qcow2 image') cmd =3D '%s create -f qcow2 %s 128M' % (qemu_img, image_path) process.run(cmd) =20 replay_path =3D os.path.join(self.workdir, 'replay.bin') - port =3D find_free_port() =20 # record the log - vm =3D self.run_vm(True, shift, args, replay_path, image_path, por= t) + vm =3D self.run_vm(True, shift, args, replay_path, image_path, -1) while self.vm_get_icount(vm) <=3D self.STEPS: pass last_icount =3D self.vm_get_icount(vm) @@ -127,7 +126,9 @@ def reverse_debugging(self, shift=3D7, args=3DNone): logger.info("recorded log with %s+ steps" % last_icount) =20 # replay and run debug commands - vm =3D self.run_vm(False, shift, args, replay_path, image_path, po= rt) + with Ports() as ports: + port =3D ports.find_free_port() + vm =3D self.run_vm(False, shift, args, replay_path, image_path= , port) logger.info('connecting to gdbstub') g =3D gdb.GDBRemote('127.0.0.1', port, False, False) g.connect() @@ -193,80 +194,3 @@ def reverse_debugging(self, shift=3D7, args=3DNone): =20 logger.info('exiting gdb and qemu') vm.shutdown() - -class ReverseDebugging_X86_64(ReverseDebugging): - """ - :avocado: tags=3Daccel:tcg - """ - - REG_PC =3D 0x10 - REG_CS =3D 0x12 - def get_pc(self, g): - return self.get_reg_le(g, self.REG_PC) \ - + self.get_reg_le(g, self.REG_CS) * 0x10 - - # unidentified gitlab timeout problem - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_x86_64_pc(self): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Dmachine:pc - """ - # start with BIOS only - self.reverse_debugging() - -class ReverseDebugging_AArch64(ReverseDebugging): - """ - :avocado: tags=3Daccel:tcg - """ - - REG_PC =3D 32 - - # unidentified gitlab timeout problem - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_aarch64_virt(self): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dcpu:cortex-a53 - """ - kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/29/Everything/aarch64/os/images/pxe= boot' - '/vmlinuz') - kernel_hash =3D '8c73e469fc6ea06a58dc83a628fc695b693b8493' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - - self.reverse_debugging( - args=3D('-kernel', kernel_path)) - -class ReverseDebugging_ppc64(ReverseDebugging): - """ - :avocado: tags=3Daccel:tcg - """ - - REG_PC =3D 0x40 - - # unidentified gitlab timeout problem - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_ppc64_pseries(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - :avocado: tags=3Dflaky - """ - # SLOF branches back to its entry point, which causes this test - # to take the 'hit a breakpoint again' path. That's not a problem, - # just slightly different than the other machines. - self.endian_is_le =3D False - self.reverse_debugging() - - # See https://gitlab.com/qemu-project/qemu/-/issues/1992 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_ppc64_powernv(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:powernv - :avocado: tags=3Dflaky - """ - self.endian_is_le =3D False - self.reverse_debugging() diff --git a/tests/functional/test_aarch64_reverse_debug.py b/tests/functio= nal/test_aarch64_reverse_debug.py new file mode 100755 index 00000000000..58d45328350 --- /dev/null +++ b/tests/functional/test_aarch64_reverse_debug.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Reverse debugging test +# +# Copyright (c) 2020 ISP RAS +# +# Author: +# Pavel Dovgalyuk +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from qemu_test import Asset, skipIfMissingImports, skipFlakyTest +from reverse_debugging import ReverseDebugging + + +@skipIfMissingImports('avocado.utils') +class ReverseDebugging_AArch64(ReverseDebugging): + + REG_PC =3D 32 + + KERNEL_ASSET =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' + 'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'), + '7e1430b81c26bdd0da025eeb8fbd77b5dc961da4364af26e771bd39f379cbbf7') + + @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/2921") + def test_aarch64_virt(self): + self.set_machine('virt') + self.cpu =3D 'cortex-a53' + kernel_path =3D self.KERNEL_ASSET.fetch() + self.reverse_debugging(args=3D('-kernel', kernel_path)) + + +if __name__ =3D=3D '__main__': + ReverseDebugging.main() diff --git a/tests/functional/test_ppc64_reverse_debug.py b/tests/functiona= l/test_ppc64_reverse_debug.py new file mode 100755 index 00000000000..5931adef5a9 --- /dev/null +++ b/tests/functional/test_ppc64_reverse_debug.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Reverse debugging test +# +# Copyright (c) 2020 ISP RAS +# +# Author: +# Pavel Dovgalyuk +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from qemu_test import skipIfMissingImports, skipFlakyTest +from reverse_debugging import ReverseDebugging + + +@skipIfMissingImports('avocado.utils') +class ReverseDebugging_ppc64(ReverseDebugging): + + REG_PC =3D 0x40 + + @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/1992") + def test_ppc64_pseries(self): + self.set_machine('pseries') + # SLOF branches back to its entry point, which causes this test + # to take the 'hit a breakpoint again' path. That's not a problem, + # just slightly different than the other machines. + self.endian_is_le =3D False + self.reverse_debugging() + + @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/1992") + def test_ppc64_powernv(self): + self.set_machine('powernv') + self.endian_is_le =3D False + self.reverse_debugging() + + +if __name__ =3D=3D '__main__': + ReverseDebugging.main() diff --git a/tests/functional/test_x86_64_reverse_debug.py b/tests/function= al/test_x86_64_reverse_debug.py new file mode 100755 index 00000000000..d713e91e144 --- /dev/null +++ b/tests/functional/test_x86_64_reverse_debug.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Reverse debugging test +# +# Copyright (c) 2020 ISP RAS +# +# Author: +# Pavel Dovgalyuk +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from qemu_test import skipIfMissingImports, skipFlakyTest +from reverse_debugging import ReverseDebugging + + +@skipIfMissingImports('avocado.utils') +class ReverseDebugging_X86_64(ReverseDebugging): + + REG_PC =3D 0x10 + REG_CS =3D 0x12 + def get_pc(self, g): + return self.get_reg_le(g, self.REG_PC) \ + + self.get_reg_le(g, self.REG_CS) * 0x10 + + @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/2922") + def test_x86_64_pc(self): + self.set_machine('pc') + # start with BIOS only + self.reverse_debugging() + + +if __name__ =3D=3D '__main__': + ReverseDebugging.main() --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393890; cv=none; d=zohomail.com; s=zohoarc; b=Q8Fhlah6N1GM+eUxwBpiLd9EG00za9bzFuu5if97W7tzQYu9NlkuMBHv3Y5vNtGd1UZAed9ViUNQJIcxYpQxP2+VDWCnGzYX0NaNHvfURZLnN5Pq0qq7g9KAzKXFTqBoF2fHXV+fAilPADI9TScgbkYpCXvVqwPIDjASSm9lECY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393890; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ryJHei21FdRISNq4YqocyXCE2sm9/b80hkj5bhIAp0g=; b=hjdIfv6rFRhVQcjqfgrb16pNh8+hTJfk8Cbn/vo0EM8VhUY2dvgoDy0h3pUk8XpbxylCRWAXM31LcpJmfI0CJi1zBjytTQoA8j6Q4f7m3ROOPY4HgbWc45n4PaXUAdUHVMssczHYCeYZQhv/GcmcKgjmMHnI8TORPk96yEuf0vI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17453938900861018.2756815991515; Wed, 23 Apr 2025 00:38:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfT-0003US-5t; Wed, 23 Apr 2025 03:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfD-0003E4-Hm for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfA-0003HL-1A for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:59 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-635-xmK2yq5SMoKAWJHYPjS2rw-1; Wed, 23 Apr 2025 03:36:48 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 809E61800263; Wed, 23 Apr 2025 07:36:47 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AF64219560A3; Wed, 23 Apr 2025 07:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393815; 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=ryJHei21FdRISNq4YqocyXCE2sm9/b80hkj5bhIAp0g=; b=L+wYDNrvtts43ah8oo1gfLOwP4xsQZd59bX6dMUCqSp/LkKowiQHdiQvntlM7HcObQtX/D yad6z/IO8ODT0Jr45yYWvIxnMPZYSFW4epWExzZ8rrn6VBcPFomVGp8aocaEXZ8zUPyYb2 G5AJhpO6RsbJCxi37v3vwARaxB2Hy5s= X-MC-Unique: xmK2yq5SMoKAWJHYPjS2rw-1 X-Mimecast-MFC-AGG-ID: xmK2yq5SMoKAWJHYPjS2rw_1745393807 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 14/29] tests/functional: Convert the i386 replay avocado test Date: Wed, 23 Apr 2025 09:35:54 +0200 Message-ID: <20250423073610.271585-15-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393892767019100 From: Thomas Huth Since this was the last test in tests/avocado/replay_kernel.py, we can remove that Avocado file now. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-5-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 - tests/avocado/replay_kernel.py | 110 --------------------------- tests/functional/meson.build | 1 + tests/functional/test_i386_replay.py | 28 +++++++ 4 files changed, 29 insertions(+), 111 deletions(-) delete mode 100644 tests/avocado/replay_kernel.py create mode 100755 tests/functional/test_i386_replay.py diff --git a/MAINTAINERS b/MAINTAINERS index af1d847f8ed..42348df9d68 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3669,7 +3669,6 @@ F: include/system/replay.h F: docs/devel/replay.rst F: docs/system/replay.rst F: stubs/replay.c -F: tests/avocado/replay_kernel.py F: tests/avocado/replay_linux.py F: tests/functional/*reverse_debug*.py F: tests/functional/*replay*.py diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py deleted file mode 100644 index 35515323723..00000000000 --- a/tests/avocado/replay_kernel.py +++ /dev/null @@ -1,110 +0,0 @@ -# Record/replay test that boots a Linux kernel -# -# Copyright (c) 2020 ISP RAS -# -# Author: -# Pavel Dovgalyuk -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -import os -import lzma -import shutil -import logging -import time -import subprocess - -from avocado import skip -from avocado import skipUnless -from avocado import skipUnless -from avocado_qemu import wait_for_console_pattern -from avocado.utils import archive -from avocado.utils import process -from boot_linux_console import LinuxKernelTest - -class ReplayKernelBase(LinuxKernelTest): - """ - Boots a Linux kernel in record mode and checks that the console - is operational and the kernel command line is properly passed - from QEMU to the kernel. - Then replays the same scenario and verifies, that QEMU correctly - terminates. - """ - - timeout =3D 180 - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D1 panic=3D-1 ' - - def run_vm(self, kernel_path, kernel_command_line, console_pattern, - record, shift, args, replay_path): - # icount requires TCG to be available - self.require_accelerator('tcg') - - logger =3D logging.getLogger('replay') - start_time =3D time.time() - vm =3D self.get_vm() - vm.set_console() - if record: - logger.info('recording the execution...') - mode =3D 'record' - else: - logger.info('replaying the execution...') - mode =3D 'replay' - vm.add_args('-icount', 'shift=3D%s,rr=3D%s,rrfile=3D%s' % - (shift, mode, replay_path), - '-kernel', kernel_path, - '-append', kernel_command_line, - '-net', 'none', - '-no-reboot') - if args: - vm.add_args(*args) - vm.launch() - self.wait_for_console_pattern(console_pattern, vm) - if record: - vm.shutdown() - logger.info('finished the recording with log size %s bytes' - % os.path.getsize(replay_path)) - self.run_replay_dump(replay_path) - logger.info('successfully tested replay-dump.py') - else: - vm.wait() - logger.info('successfully finished the replay') - elapsed =3D time.time() - start_time - logger.info('elapsed time %.2f sec' % elapsed) - return elapsed - - def run_replay_dump(self, replay_path): - try: - subprocess.check_call(["./scripts/replay-dump.py", - "-f", replay_path], - stdout=3Dsubprocess.DEVNULL) - except subprocess.CalledProcessError: - self.fail('replay-dump.py failed') - - def run_rr(self, kernel_path, kernel_command_line, console_pattern, - shift=3D7, args=3DNone): - replay_path =3D os.path.join(self.workdir, 'replay.bin') - t1 =3D self.run_vm(kernel_path, kernel_command_line, console_patte= rn, - True, shift, args, replay_path) - t2 =3D self.run_vm(kernel_path, kernel_command_line, console_patte= rn, - False, shift, args, replay_path) - logger =3D logging.getLogger('replay') - logger.info('replay overhead {:.2%}'.format(t2 / t1 - 1)) - -class ReplayKernelNormal(ReplayKernelBase): - - def test_i386_pc(self): - """ - :avocado: tags=3Darch:i386 - :avocado: tags=3Dmachine:pc - """ - kernel_url =3D ('https://storage.tuxboot.com/20230331/i386/bzImage= ') - kernel_hash =3D 'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb8= 6e277f1b76ed956' - kernel_path =3D self.fetch_asset(kernel_url, - asset_hash=3Dkernel_hash, - algorithm =3D "sha256") - - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' - console_pattern =3D 'VFS: Cannot open root device' - - self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 7b0f4ab0b1d..4113b221de7 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -151,6 +151,7 @@ tests_i386_system_quick =3D [ ] =20 tests_i386_system_thorough =3D [ + 'i386_replay', 'i386_tuxrun', ] =20 diff --git a/tests/functional/test_i386_replay.py b/tests/functional/test_i= 386_replay.py new file mode 100755 index 00000000000..7c4c2602da9 --- /dev/null +++ b/tests/functional/test_i386_replay.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 +# +# Replay test that boots a Linux kernel on a i386 machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from replay_kernel import ReplayKernelBase + + +class I386Replay(ReplayKernelBase): + + ASSET_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/i386/bzImage', + 'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b76ed956') + + def test_pc(self): + self.set_machine('pc') + kernel_url =3D () + kernel_path =3D self.ASSET_KERNEL.fetch() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' + console_pattern =3D 'VFS: Cannot open root device' + self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) + + +if __name__ =3D=3D '__main__': + ReplayKernelBase.main() --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745394005; cv=none; d=zohomail.com; s=zohoarc; b=SrFRnxZcNDPpmA0SwFC9nMclzc5K7MLgGZ1knNoSMPP8uvxfscoIm3zZlN0R+8qhUXI8jzfmqNBHY0y+NiCeAVCSdiD8LbAuLjp6EdRq6F82TpveLuSxOJeUVdAecRCYVIRcM6K4YoB5grb6GXXRAbzoc035thmGkwpNOxyQBmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745394005; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QhCSieJStkW8vwRHHDq/VDpvXLt+CNcCBA2kBqyGeWw=; b=PdFtI/IhKTmEGGaKXXpT8Os/AGiomYU46jVPUrohNgbs2uUIAYeNEPb2G550X7dVlZg3H9fdENWyCD9+FPuMJ9zWSQgMZD1KagMeQCI3Zv007c7zj5hmto+qhwyzNMgoEntogexw/M0wa0E1nC+/MbqX7Gci39MjYz+RKat33Wo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745394005653831.5515568708561; Wed, 23 Apr 2025 00:40:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfN-0003Je-Ve; Wed, 23 Apr 2025 03:37:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfE-0003EN-PR for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfC-0003Hj-7L for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:59 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-75-RJbj00fUPtmYmVfwPHoKjg-1; Wed, 23 Apr 2025 03:36:50 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 82787180087B; Wed, 23 Apr 2025 07:36:49 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EA05319560A3; Wed, 23 Apr 2025 07:36:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393817; 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=QhCSieJStkW8vwRHHDq/VDpvXLt+CNcCBA2kBqyGeWw=; b=S/RMPdZtpPnTPJNi4NNQBF8GuYrZY8q5VfnithnFYIcZwaawOZ181aZ+d3mS+16203rfu1 hKRlRdOxq48zTBYuDW7fJ3kDwXnWDvAKTtnEwNO1KEexhlj275xY1ftQqaoanoJN5SQGgD cyrSKJO3IQwtB65zU68bFnegzGfIA78= X-MC-Unique: RJbj00fUPtmYmVfwPHoKjg-1 X-Mimecast-MFC-AGG-ID: RJbj00fUPtmYmVfwPHoKjg_1745393809 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 15/29] tests/avocado: Remove the LinuxKernelTest class Date: Wed, 23 Apr 2025 09:35:55 +0200 Message-ID: <20250423073610.271585-16-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745394007227019100 From: Thomas Huth All tests that used this class have been converted to the functional framework, so we can remove the boot_linux_console.py file now. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-6-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 62 ----------------------------- 1 file changed, 62 deletions(-) delete mode 100644 tests/avocado/boot_linux_console.py diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py deleted file mode 100644 index cbb1e2fb506..00000000000 --- a/tests/avocado/boot_linux_console.py +++ /dev/null @@ -1,62 +0,0 @@ -# Functional test that boots a Linux kernel and checks the console -# -# Copyright (c) 2018 Red Hat, Inc. -# -# Author: -# Cleber Rosa -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -import os -import shutil - -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern -from avocado.utils import process -from avocado.utils import archive - -class LinuxKernelTest(QemuSystemTest): - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' - - def wait_for_console_pattern(self, success_message, vm=3DNone): - wait_for_console_pattern(self, success_message, - failure_message=3D'Kernel panic - not syn= cing', - vm=3Dvm) - - def extract_from_deb(self, deb, path): - """ - Extracts a file from a deb package into the test workdir - - :param deb: path to the deb archive - :param path: path within the deb archive of the file to be extract= ed - :returns: path of the extracted file - """ - cwd =3D os.getcwd() - os.chdir(self.workdir) - file_path =3D process.run("ar t %s" % deb).stdout_text.split()[2] - process.run("ar x %s %s" % (deb, file_path)) - archive.extract(file_path, self.workdir) - os.chdir(cwd) - # Return complete path to extracted file. Because callers to - # extract_from_deb() specify 'path' with a leading slash, it is - # necessary to use os.path.relpath() as otherwise os.path.join() - # interprets it as an absolute path and drops the self.workdir par= t. - return os.path.normpath(os.path.join(self.workdir, - os.path.relpath(path, '/'))) - - def extract_from_rpm(self, rpm, path): - """ - Extracts a file from an RPM package into the test workdir. - - :param rpm: path to the rpm archive - :param path: path within the rpm archive of the file to be extract= ed - needs to be a relative path (starting with './') beca= use - cpio(1), which is used to extract the file, expects t= hat. - :returns: path of the extracted file - """ - cwd =3D os.getcwd() - os.chdir(self.workdir) - process.run("rpm2cpio %s | cpio -id %s" % (rpm, path), shell=3DTru= e) - os.chdir(cwd) - return os.path.normpath(os.path.join(self.workdir, path)) --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393845; cv=none; d=zohomail.com; s=zohoarc; b=SmcB51xSHO5cpUWXNpzgecgigfPf7ZxVDEu32qDBo2uT6XMabGx/0PblJZ1uOA4hhobFNf6JyMtdcHutY1/Sc4L1pJ47hvP9zsIjSaS7NufzGttWPAv2qNzEzQZHKzJfRCHRVR96uoQiBLxSNJjo2EjF77joH1JDjCc/pS50XD0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393845; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=plvBLF7mTLWHAYWXx23lev+25NrL2jS9j5moMJaLRNw=; b=nZ5I4J7sNaa7tWO350XzXWNFWriCJLjEGduhOZxV0rE7+HerNdfgHDzoQYBEXRQO3D+Y6v8CoIKNa1TnMgypQIkBANL0XMApbz68Eu+E5s3WNGfoedTAVydHq08H2l6jSntVGRk+rCoU7tLgbxx5vn2TkjOhzDnSW6ZdK901lSA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393845619542.0875185706783; Wed, 23 Apr 2025 00:37:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfP-0003Jn-Ch; Wed, 23 Apr 2025 03:37:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfD-0003E3-Ae for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfB-0003HZ-4w for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:59 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-zrEUYxBwN3qmN1GGn1BiIQ-1; Wed, 23 Apr 2025 03:36:52 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 839A7180048E; Wed, 23 Apr 2025 07:36:51 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EB27419560A3; Wed, 23 Apr 2025 07:36:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393816; 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=plvBLF7mTLWHAYWXx23lev+25NrL2jS9j5moMJaLRNw=; b=PtHNE9dCZPstFzeO65SHRQCObOtLI6wpzeslfNarBwcAffLqqoSGKFUOMao9m526aRSL8D iQphVlxqRZoUOUEHQ5Y7yGdxkL8OB+WDkseuZ8DOL8/xiD+DjwphaPuY7jxAJr2N3ZbzEh Dz0iP4UCEyRI1apDyGnNbsXqNKpFylI= X-MC-Unique: zrEUYxBwN3qmN1GGn1BiIQ-1 X-Mimecast-MFC-AGG-ID: zrEUYxBwN3qmN1GGn1BiIQ_1745393811 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 16/29] tests/functional: Convert the 32-bit big endian Wheezy mips test Date: Wed, 23 Apr 2025 09:35:56 +0200 Message-ID: <20250423073610.271585-17-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393847787019000 From: Thomas Huth The test checks some entries in /proc and the output of some commands ... we put these checks into exportable functions now so that they can be reused more easily. Additionally the linux_ssh_mips_malta.py uses SSH to test the networking of the guest. Since we don't have a SSH module in the functional framework yet, let's use the check_http_download() function here instead. And while we're at it, also switch the NIC to e1000 now to get some more test coverage, since the "pcnet" device is already tested in the test test_mips_malta_cpio. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-7-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/linux_ssh_mips_malta.py | 8 -- tests/functional/meson.build | 2 +- tests/functional/test_mips_malta.py | 108 +++++++++++++++++++++++++- 3 files changed, 107 insertions(+), 11 deletions(-) diff --git a/tests/avocado/linux_ssh_mips_malta.py b/tests/avocado/linux_ss= h_mips_malta.py index d9bb525ad9c..73d294ad5cf 100644 --- a/tests/avocado/linux_ssh_mips_malta.py +++ b/tests/avocado/linux_ssh_mips_malta.py @@ -172,14 +172,6 @@ def check_mips_malta(self, uname_m, endianess): # Wait for VM to shut down gracefully self.vm.wait() =20 - def test_mips_malta32eb_kernel3_2_0(self): - """ - :avocado: tags=3Darch:mips - :avocado: tags=3Dendian:big - :avocado: tags=3Ddevice:pcnet32 - """ - self.check_mips_malta('mips', 'be') - def test_mips_malta32el_kernel3_2_0(self): """ :avocado: tags=3Darch:mipsel diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 4113b221de7..4dedfc7b9f7 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -39,7 +39,7 @@ test_timeouts =3D { 'arm_tuxrun' : 240, 'arm_sx1' : 360, 'intel_iommu': 300, - 'mips_malta' : 120, + 'mips_malta' : 480, 'mipsel_replay' : 480, 'mips64el_replay' : 180, 'netdev_ethtool' : 180, diff --git a/tests/functional/test_mips_malta.py b/tests/functional/test_mi= ps_malta.py index 9697c7d63f8..89b9556f30d 100755 --- a/tests/functional/test_mips_malta.py +++ b/tests/functional/test_mips_malta.py @@ -6,10 +6,93 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import LinuxKernelTest, Asset +import os + +from qemu_test import LinuxKernelTest, Asset, wait_for_console_pattern from qemu_test import exec_command_and_wait_for_pattern =20 =20 +def mips_run_common_commands(test, prompt=3D'#'): + exec_command_and_wait_for_pattern(test, + 'uname -m', + 'mips') + exec_command_and_wait_for_pattern(test, + 'grep XT-PIC /proc/interrupts', + 'timer') + wait_for_console_pattern(test, prompt) + exec_command_and_wait_for_pattern(test, + 'grep XT-PIC /proc/interrupts', + 'serial') + wait_for_console_pattern(test, prompt) + exec_command_and_wait_for_pattern(test, + 'grep XT-PIC /proc/interrupts', + 'ata_piix') + wait_for_console_pattern(test, prompt) + exec_command_and_wait_for_pattern(test, + 'grep XT-PIC /proc/interrupts', + 'rtc') + wait_for_console_pattern(test, prompt) + exec_command_and_wait_for_pattern(test, + 'cat /proc/devices', + 'input') + wait_for_console_pattern(test, prompt) + exec_command_and_wait_for_pattern(test, + 'cat /proc/devices', + 'fb') + wait_for_console_pattern(test, prompt) + exec_command_and_wait_for_pattern(test, + 'cat /proc/ioports', + ' : serial') + wait_for_console_pattern(test, prompt) + exec_command_and_wait_for_pattern(test, + 'cat /proc/ioports', + ' : ata_piix') + wait_for_console_pattern(test, prompt) + +def mips_check_wheezy(test, kernel_path, image_path, kernel_command_line, + dl_file, hsum, nic=3D'pcnet', cpuinfo=3D'MIPS 24Kc'): + test.require_netdev('user') + test.require_device(nic) + test.set_machine('malta') + + port=3D8080 + test.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line, + '-drive', 'file=3D%s,snapshot=3Don' % image_path, + '-netdev', 'user,id=3Dn1' + + ',tftp=3D' + os.path.basename(kernel_path)= + + ',hostfwd=3Dtcp:127.0.0.1:0-:%d' % port, + '-device', f'{nic},netdev=3Dn1', + '-no-reboot') + test.vm.set_console() + test.vm.launch() + + wait_for_console_pattern(test, 'login: ', 'Oops') + exec_command_and_wait_for_pattern(test, 'root', 'Password:') + exec_command_and_wait_for_pattern(test, 'root', ':~# ') + mips_run_common_commands(test) + + exec_command_and_wait_for_pattern(test, 'cd /', '# ') + test.check_http_download(dl_file, hsum, port, + pythoncmd=3D'python -m SimpleHTTPServer') + + exec_command_and_wait_for_pattern(test, 'cat /proc/cpuinfo', cpuinfo) + exec_command_and_wait_for_pattern(test, 'cat /proc/devices', 'usb') + exec_command_and_wait_for_pattern(test, 'cat /proc/ioports', + ' : piix4_smbus') + # lspci for the host bridge does not work on big endian targets: + # https://gitlab.com/qemu-project/qemu/-/issues/2826 + # exec_command_and_wait_for_pattern(test, 'lspci -d 11ab:4620', + # 'GT-64120') + exec_command_and_wait_for_pattern(test, + 'cat /sys/bus/i2c/devices/i2c-0/name= ', + 'SMBus PIIX4 adapter') + exec_command_and_wait_for_pattern(test, 'cat /proc/mtd', 'YAMON') + # Empty 'Board Config' (64KB) + exec_command_and_wait_for_pattern(test, 'md5sum /dev/mtd2ro', + '0dfbe8aa4c20b52e1b8bf3cb6cbdf193') + + class MaltaMachineConsole(LinuxKernelTest): =20 ASSET_KERNEL_2_63_2 =3D Asset( @@ -70,7 +153,8 @@ def test_mips_malta_cpio(self): exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', 'BogoMIPS') exec_command_and_wait_for_pattern(self, 'uname -a', - 'Debian') + '4.5.0-2-4kc-malta #1 Debi= an') + mips_run_common_commands(self) =20 exec_command_and_wait_for_pattern(self, 'ip link set eth0 up', 'eth0: link up') @@ -89,6 +173,26 @@ def test_mips_malta_cpio(self): # Wait for VM to shut down gracefully self.vm.wait() =20 + ASSET_WHEEZY_KERNEL =3D Asset( + ('https://people.debian.org/~aurel32/qemu/mips/' + 'vmlinux-3.2.0-4-4kc-malta'), + '0377fcda31299213c10b8e5babe7260ef99188b3ae1aca6f56594abb71e7f67e') + + ASSET_WHEEZY_DISK =3D Asset( + ('https://people.debian.org/~aurel32/qemu/mips/' + 'debian_wheezy_mips_standard.qcow2'), + 'de03599285b8382ad309309a6c4869f6c6c42a5cfc983342bab9ec0dfa7849a2') + + def test_wheezy(self): + kernel_path =3D self.ASSET_WHEEZY_KERNEL.fetch() + image_path =3D self.ASSET_WHEEZY_DISK.fetch() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 root=3D/dev/sda1') + mips_check_wheezy(self, + kernel_path, image_path, kernel_command_line, nic=3D'e1000', + dl_file=3D'/boot/initrd.img-3.2.0-4-4kc-malta', + hsum=3D'ff0c0369143d9bbb9a6e6bc79322a2be535619df639e84103237f4= 06e87493dc') + =20 if __name__ =3D=3D '__main__': LinuxKernelTest.main() --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745394032; cv=none; d=zohomail.com; s=zohoarc; b=bVjLy5zgnRyrvoPf68Me5bNtI3/WRJLUMMfvvfiVOqx6GHRtHn4CxhwX9OBfK3EHEbO5tw5nxhZ8Cc8/4b9TcnDnvefdSH1polnbl0I+jQJFTFtm4mhp55brJ8T5JeE2fgDtRoKeI1HqA3BM/+bD8uk8QdkSmAvHuZfeTaYuBL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745394032; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ICnDD9gDStiGMubGBNvzpXFf7u4VFjhcPlW1x+Zd+jo=; b=JwAkjKOU39COV4ic5a0NKgZAFwSp/O3bvterFTBr+u+TafYz4zkmA68Ck50GT5/Wlv723B+MyT+GHhVvZrl2NNQn9pyt6CbgIJzolMpIXiTFQseqaAZfTcIcQ81Cc2X6b3RbVf85E+WPCRNOGZO8JJcf6Ee0l2luCvEX0L6z204= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745394032853735.2159657533724; Wed, 23 Apr 2025 00:40:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfP-0003Jy-U6; Wed, 23 Apr 2025 03:37:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfE-0003EM-I6 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfB-0003HX-Nh for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:36:59 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-356-PO6NiB_7NyObt6Xoptv3Yg-1; Wed, 23 Apr 2025 03:36:54 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 85B731955DCC; Wed, 23 Apr 2025 07:36:53 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ED3181955BCB; Wed, 23 Apr 2025 07:36:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393816; 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=ICnDD9gDStiGMubGBNvzpXFf7u4VFjhcPlW1x+Zd+jo=; b=PsJWHmdRVl3gJtLJItIiFnMy0Mjw6AB8U8teW+Pz1HI7p7lsuiXxYSGcA44Nml5BZ2VxqC O12L4VWcrxKXAe1UjazERHCsWWwgZsLN1WrLi1C9eU1xeVdvWiyi+zACOC+ugWUfvQZWHH fcsm6lAKqwdaVIypkMwmwk3YCrvAc34= X-MC-Unique: PO6NiB_7NyObt6Xoptv3Yg-1 X-Mimecast-MFC-AGG-ID: PO6NiB_7NyObt6Xoptv3Yg_1745393813 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 17/29] tests/functional: Convert the 32-bit little endian Wheezy mips test Date: Wed, 23 Apr 2025 09:35:57 +0200 Message-ID: <20250423073610.271585-18-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745394034419019000 From: Thomas Huth Reuse the test function from the big endian test to easily convert the 32-bit little endian Wheezy mips test. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-8-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/linux_ssh_mips_malta.py | 8 -------- tests/functional/meson.build | 1 + tests/functional/test_mipsel_malta.py | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/tests/avocado/linux_ssh_mips_malta.py b/tests/avocado/linux_ss= h_mips_malta.py index 73d294ad5cf..c1300aec961 100644 --- a/tests/avocado/linux_ssh_mips_malta.py +++ b/tests/avocado/linux_ssh_mips_malta.py @@ -172,14 +172,6 @@ def check_mips_malta(self, uname_m, endianess): # Wait for VM to shut down gracefully self.vm.wait() =20 - def test_mips_malta32el_kernel3_2_0(self): - """ - :avocado: tags=3Darch:mipsel - :avocado: tags=3Dendian:little - :avocado: tags=3Ddevice:pcnet32 - """ - self.check_mips_malta('mips', 'le') - def test_mips_malta64eb_kernel3_2_0(self): """ :avocado: tags=3Darch:mips64 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 4dedfc7b9f7..cba0abf2920 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -40,6 +40,7 @@ test_timeouts =3D { 'arm_sx1' : 360, 'intel_iommu': 300, 'mips_malta' : 480, + 'mipsel_malta' : 420, 'mipsel_replay' : 480, 'mips64el_replay' : 180, 'netdev_ethtool' : 180, diff --git a/tests/functional/test_mipsel_malta.py b/tests/functional/test_= mipsel_malta.py index fe9c3a172e6..9ee2884da8e 100755 --- a/tests/functional/test_mipsel_malta.py +++ b/tests/functional/test_mipsel_malta.py @@ -13,6 +13,8 @@ from qemu_test import interrupt_interactive_console_until_pattern from qemu_test import wait_for_console_pattern =20 +from test_mips_malta import mips_check_wheezy + =20 class MaltaMachineConsole(LinuxKernelTest): =20 @@ -57,6 +59,26 @@ def test_mips_malta32el_nanomips_16k_up(self): def test_mips_malta32el_nanomips_64k_dbg(self): self.do_test_mips_malta32el_nanomips(self.ASSET_KERNEL_64K) =20 + ASSET_WHEEZY_KERNEL =3D Asset( + ('https://people.debian.org/~aurel32/qemu/mipsel/' + 'vmlinux-3.2.0-4-4kc-malta'), + 'dc8a3648305b0201ca7a5cd135fe2890067a65d93c38728022bb0e656ad2bf9a') + + ASSET_WHEEZY_DISK =3D Asset( + ('https://people.debian.org/~aurel32/qemu/mipsel/' + 'debian_wheezy_mipsel_standard.qcow2'), + '454f09ae39f7e6461c84727b927100d2c7813841f2a0a5dce328114887ecf914') + + def test_wheezy(self): + kernel_path =3D self.ASSET_WHEEZY_KERNEL.fetch() + image_path =3D self.ASSET_WHEEZY_DISK.fetch() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 root=3D/dev/sda1') + mips_check_wheezy(self, + kernel_path, image_path, kernel_command_line, + dl_file=3D'/boot/initrd.img-3.2.0-4-4kc-malta', + hsum=3D'9fc9f250ed56a74e35e704ddfd5a1c5a5625adefc5c9da91f64928= 8d3ca000f0') + =20 class MaltaMachineYAMON(QemuSystemTest): =20 --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745394058; cv=none; d=zohomail.com; s=zohoarc; b=JPjc5vzZFdvvKeH5Sz1qefPbmppw+prQJYO9T+JsweIHEvW/LcAD5IgQxCSMjNrmdhubSaxHOwSpVsA0nhxDH20WU0bfC8BZWLbjm+afHuwH6c0nZn1vApmFH2kaulrZlesS17yLjf3Ukzez4AcxOa2QCSsHoGlRj+QuTdmwi7I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745394058; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ht4IJJXpV+d7/B6NOUTg1u7tsE8nzljSN+037UyyjJI=; b=Lb83ReqdmuOsSGYvwRddhDHw0uP5J9aJoBF2MOQV2ac9NGw1laqYVRpvMRETID1ojdcSfEz5yuOyCJXbytH+PgJukJvjK4HH59ss3EHHPKgHOxhGheTf4ybLEiBPKuIdgoQouH17uxi2zL3PXgwIjFnN5pUeUCMUiOY4hZD2wZU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745394058913664.8780417968974; Wed, 23 Apr 2025 00:40:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfR-0003OY-8V; Wed, 23 Apr 2025 03:37:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfH-0003FO-JZ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfF-0003IH-AR for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:02 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-487-eIw_L9SJNQeVfCHd0rpSdw-1; Wed, 23 Apr 2025 03:36:56 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8843919560B7; Wed, 23 Apr 2025 07:36:55 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EF34519560A3; Wed, 23 Apr 2025 07:36:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393820; 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=Ht4IJJXpV+d7/B6NOUTg1u7tsE8nzljSN+037UyyjJI=; b=ANVHzvYFnn/B/meD5Mc1Ga1Rs/oXu9F0Mq3sy/XqCqUBxzKmrX5ZqvAiQhSRuAWxtBedqm 6cc4Km4+ShDZK+ykJhi4lZmRKFOAuKxIdymCjIjFDowdJGxheofewJKWfuDRAGdFfKjVHB nXt88k27x50n6LA6eXTWQ/jSyZYXeyY= X-MC-Unique: eIw_L9SJNQeVfCHd0rpSdw-1 X-Mimecast-MFC-AGG-ID: eIw_L9SJNQeVfCHd0rpSdw_1745393815 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 18/29] tests/functional: Convert the 64-bit little endian Wheezy mips test Date: Wed, 23 Apr 2025 09:35:58 +0200 Message-ID: <20250423073610.271585-19-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745394060596019000 From: Thomas Huth Reuse the test function from the 32-bit big endian test to easily convert the 64-bit little endian Wheezy mips test. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-9-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/linux_ssh_mips_malta.py | 8 -------- tests/functional/meson.build | 1 + tests/functional/test_mips64el_malta.py | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/tests/avocado/linux_ssh_mips_malta.py b/tests/avocado/linux_ss= h_mips_malta.py index c1300aec961..2fa5cf9a6c1 100644 --- a/tests/avocado/linux_ssh_mips_malta.py +++ b/tests/avocado/linux_ssh_mips_malta.py @@ -179,11 +179,3 @@ def test_mips_malta64eb_kernel3_2_0(self): :avocado: tags=3Ddevice:pcnet32 """ self.check_mips_malta('mips64', 'be') - - def test_mips_malta64el_kernel3_2_0(self): - """ - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dendian:little - :avocado: tags=3Ddevice:pcnet32 - """ - self.check_mips_malta('mips64', 'le') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index cba0abf2920..a4a317115b3 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -42,6 +42,7 @@ test_timeouts =3D { 'mips_malta' : 480, 'mipsel_malta' : 420, 'mipsel_replay' : 480, + 'mips64el_malta' : 420, 'mips64el_replay' : 180, 'netdev_ethtool' : 180, 'ppc_40p' : 240, diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/tes= t_mips64el_malta.py index a8da15a26b3..dd37212f9df 100755 --- a/tests/functional/test_mips64el_malta.py +++ b/tests/functional/test_mips64el_malta.py @@ -16,6 +16,8 @@ from qemu_test import exec_command_and_wait_for_pattern from qemu_test import skipIfMissingImports, skipFlakyTest, skipUntrustedTe= st =20 +from test_mips_malta import mips_check_wheezy + =20 class MaltaMachineConsole(LinuxKernelTest): =20 @@ -90,6 +92,26 @@ def test_mips64el_malta_5KEc_cpio(self): # Wait for VM to shut down gracefully self.vm.wait() =20 + ASSET_WHEEZY_KERNEL =3D Asset( + ('https://people.debian.org/~aurel32/qemu/mipsel/' + 'vmlinux-3.2.0-4-5kc-malta'), + '5e8b725244c59745bb8b64f5d8f49f25fecfa549f3395fb6d19a3b9e5065b85b') + + ASSET_WHEEZY_DISK =3D Asset( + ('https://people.debian.org/~aurel32/qemu/mipsel/' + 'debian_wheezy_mipsel_standard.qcow2'), + '454f09ae39f7e6461c84727b927100d2c7813841f2a0a5dce328114887ecf914') + + def test_wheezy(self): + kernel_path =3D self.ASSET_WHEEZY_KERNEL.fetch() + image_path =3D self.ASSET_WHEEZY_DISK.fetch() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 root=3D/dev/sda1') + mips_check_wheezy(self, + kernel_path, image_path, kernel_command_line, cpuinfo=3D'MIPS = 20Kc', + dl_file=3D'/boot/initrd.img-3.2.0-4-5kc-malta', + hsum=3D'7579f8b56c1187c7c04d0dc3c0c56c7a6314c5ddd3a9bf8803ecc7= cf8a3be9f8') + =20 @skipIfMissingImports('numpy', 'cv2') class MaltaMachineFramebuffer(LinuxKernelTest): --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393842; cv=none; d=zohomail.com; s=zohoarc; b=Scrf3FDjYuPxEBERYSOPQ6TUdr0K61EP3qYv968vPiEtchof+NjsmZYwh1/VIn0CHj0MTj2EaluGjHqwWrbd0wHjzlPzkpm/9tpY4mEGDfMYACFN+iVKtMlJu/BF5LuRXc88pcKTHLZiizzmNBbA1Z2dS4ES/7KcrSgyQ9Y8HEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393842; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ndVevxmNoCk6PIZvrZxaU44cyfspBv9N9IemV+gQ5F8=; b=mv+453BTL6odR0Ixt0o0Tj0Z9KQNY0NrVf6EMUCHUeJt77hB+rDPbs3uKj/U8RPB7f85I+y7Sftntn9izs+qqcEzYJiafEqCcM84+yCvTfzHyaiTWgxOy2Uq4fbucBTFEOjCkt5B6tMC/E7ATlqmk3l/R7q2bkqHU50QGZh5JV0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393842345475.93821091794825; Wed, 23 Apr 2025 00:37:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfS-0003UB-QC; Wed, 23 Apr 2025 03:37:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfL-0003Hz-Ev for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfJ-0003Iz-47 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:07 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-513-2vr_8M25N2O-EyQg99oDaA-1; Wed, 23 Apr 2025 03:36:58 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 893511955DC6; Wed, 23 Apr 2025 07:36:57 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F125519560A3; Wed, 23 Apr 2025 07:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393824; 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=ndVevxmNoCk6PIZvrZxaU44cyfspBv9N9IemV+gQ5F8=; b=DPOWbpOSMU0IRrQYlUVtVytDDkefpGwETOxrOxdGUwGLofE3feI3h0RC27xoODYLbSb+R5 Q6TlZ5ZL5zfhd4gF+jH4Vctz8VD/GcTLHvOCZK3FRGg2Muk7mxDbQE8oNhXP+wKlM6rvm3 IOP59G2n/vQ/AhsEgPrRMH3fCYAp8Dk= X-MC-Unique: 2vr_8M25N2O-EyQg99oDaA-1 X-Mimecast-MFC-AGG-ID: 2vr_8M25N2O-EyQg99oDaA_1745393817 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 19/29] tests/functional: Convert the 64-bit big endian Wheezy mips test Date: Wed, 23 Apr 2025 09:35:59 +0200 Message-ID: <20250423073610.271585-20-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393843934019000 From: Thomas Huth Reuse the test function from the 32-bit big endian test to easily convert the 64-bit big endian Wheezy mips test. Since this was the last test in tests/avocado/linux_ssh_mips_malta.py, we can remove this avocado file now, too. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-10-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 - tests/avocado/linux_ssh_mips_malta.py | 181 -------------------------- tests/functional/meson.build | 2 + tests/functional/test_mips64_malta.py | 35 +++++ 4 files changed, 37 insertions(+), 182 deletions(-) delete mode 100644 tests/avocado/linux_ssh_mips_malta.py create mode 100755 tests/functional/test_mips64_malta.py diff --git a/MAINTAINERS b/MAINTAINERS index 42348df9d68..72f6b208f5a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1355,7 +1355,6 @@ F: hw/acpi/piix4.c F: hw/mips/malta.c F: hw/pci-host/gt64120.c F: include/hw/southbridge/piix.h -F: tests/avocado/linux_ssh_mips_malta.py F: tests/functional/test_mips*_malta.py F: tests/functional/test_mips*_tuxrun.py =20 diff --git a/tests/avocado/linux_ssh_mips_malta.py b/tests/avocado/linux_ss= h_mips_malta.py deleted file mode 100644 index 2fa5cf9a6c1..00000000000 --- a/tests/avocado/linux_ssh_mips_malta.py +++ /dev/null @@ -1,181 +0,0 @@ -# Functional test that boots a VM and run commands via a SSH session -# -# Copyright (c) Philippe Mathieu-Daud=C3=A9 -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -import os -import re -import base64 -import logging -import time - -from avocado import skipUnless -from avocado_qemu import LinuxSSHMixIn -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern -from avocado.utils import process -from avocado.utils import archive -from avocado.utils import ssh - - -@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') -@skipUnless(ssh.SSH_CLIENT_BINARY, 'No SSH client available') -class LinuxSSH(QemuSystemTest, LinuxSSHMixIn): - """ - :avocado: tags=3Daccel:tcg - """ - - timeout =3D 150 # Not for 'configure --enable-debug --enable-debug-tcg' - - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' - VM_IP =3D '127.0.0.1' - - BASE_URL =3D 'https://people.debian.org/~aurel32/qemu/' - IMAGE_INFO =3D { - 'be': {'base_url': 'mips', - 'image_name': 'debian_wheezy_mips_standard.qcow2', - 'image_hash': '8987a63270df67345b2135a6b7a4885a35e392d5', - 'kernel_hash': { - 32: '592e384a4edc16dade52a6cd5c785c637bcbc9ad', - 64: 'db6eea7de35d36c77d8c165b6bcb222e16eb91db'} - }, - 'le': {'base_url': 'mipsel', - 'image_name': 'debian_wheezy_mipsel_standard.qcow2', - 'image_hash': '7866764d9de3ef536ffca24c9fb9f04ffdb45802', - 'kernel_hash': { - 32: 'a66bea5a8adaa2cb3d36a1d4e0ccdb01be8f6c2a', - 64: '6a7f77245acf231415a0e8b725d91ed2f3487794'} - } - } - CPU_INFO =3D { - 32: {'cpu': 'MIPS 24Kc', 'kernel_release': '3.2.0-4-4kc-malta'}, - 64: {'cpu': 'MIPS 20Kc', 'kernel_release': '3.2.0-4-5kc-malta'} - } - - def get_url(self, endianess, path=3D''): - qkey =3D {'le': 'el', 'be': ''} - return '%s/mips%s/%s' % (self.BASE_URL, qkey[endianess], path) - - def get_image_info(self, endianess): - dinfo =3D self.IMAGE_INFO[endianess] - image_url =3D self.get_url(endianess, dinfo['image_name']) - image_hash =3D dinfo['image_hash'] - return (image_url, image_hash) - - def get_kernel_info(self, endianess, wordsize): - minfo =3D self.CPU_INFO[wordsize] - kernel_url =3D self.get_url(endianess, - 'vmlinux-%s' % minfo['kernel_release']) - kernel_hash =3D self.IMAGE_INFO[endianess]['kernel_hash'][wordsize] - return kernel_url, kernel_hash - - def ssh_disconnect_vm(self): - self.ssh_session.quit() - - def boot_debian_wheezy_image_and_ssh_login(self, endianess, kernel_pat= h): - image_url, image_hash =3D self.get_image_info(endianess) - image_path =3D self.fetch_asset(image_url, asset_hash=3Dimage_hash) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE - + 'console=3DttyS0 root=3D/dev/sda1') - self.vm.add_args('-no-reboot', - '-kernel', kernel_path, - '-append', kernel_command_line, - '-drive', 'file=3D%s,snapshot=3Don' % image_path, - '-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22', - '-device', 'pcnet,netdev=3Dvnet') - self.vm.launch() - - self.log.info('VM launched, waiting for sshd') - console_pattern =3D 'Starting OpenBSD Secure Shell server: sshd' - wait_for_console_pattern(self, console_pattern, 'Oops') - self.log.info('sshd ready') - - self.ssh_connect('root', 'root', False) - - def shutdown_via_ssh(self): - self.ssh_command('poweroff') - self.ssh_disconnect_vm() - wait_for_console_pattern(self, 'Power down', 'Oops') - - def run_common_commands(self, wordsize): - self.ssh_command_output_contains( - 'cat /proc/cpuinfo', - self.CPU_INFO[wordsize]['cpu']) - self.ssh_command_output_contains( - 'uname -m', - 'mips') - self.ssh_command_output_contains( - 'uname -r', - self.CPU_INFO[wordsize]['kernel_release']) - self.ssh_command_output_contains( - 'cat /proc/interrupts', - 'XT-PIC timer') - self.ssh_command_output_contains( - 'cat /proc/interrupts', - 'XT-PIC i8042') - self.ssh_command_output_contains( - 'cat /proc/interrupts', - 'XT-PIC serial') - self.ssh_command_output_contains( - 'cat /proc/interrupts', - 'XT-PIC ata_piix') - self.ssh_command_output_contains( - 'cat /proc/interrupts', - 'XT-PIC eth0') - self.ssh_command_output_contains( - 'cat /proc/devices', - 'input') - self.ssh_command_output_contains( - 'cat /proc/devices', - 'usb') - self.ssh_command_output_contains( - 'cat /proc/devices', - 'fb') - self.ssh_command_output_contains( - 'cat /proc/ioports', - ' : serial') - self.ssh_command_output_contains( - 'cat /proc/ioports', - ' : ata_piix') - self.ssh_command_output_contains( - 'cat /proc/ioports', - ' : piix4_smbus') - self.ssh_command_output_contains( - 'lspci -d 11ab:4620', - 'GT-64120') - self.ssh_command_output_contains( - 'cat /sys/bus/i2c/devices/i2c-0/name', - 'SMBus PIIX4 adapter') - self.ssh_command_output_contains( - 'cat /proc/mtd', - 'YAMON') - # Empty 'Board Config' (64KB) - self.ssh_command_output_contains( - 'md5sum /dev/mtd2ro', - '0dfbe8aa4c20b52e1b8bf3cb6cbdf193') - - def check_mips_malta(self, uname_m, endianess): - wordsize =3D 64 if '64' in uname_m else 32 - kernel_url, kernel_hash =3D self.get_kernel_info(endianess, wordsi= ze) - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - self.boot_debian_wheezy_image_and_ssh_login(endianess, kernel_path) - - stdout, _ =3D self.ssh_command('uname -a') - self.assertIn(True, [uname_m + " GNU/Linux" in line for line in st= dout]) - - self.run_common_commands(wordsize) - self.shutdown_via_ssh() - # Wait for VM to shut down gracefully - self.vm.wait() - - def test_mips_malta64eb_kernel3_2_0(self): - """ - :avocado: tags=3Darch:mips64 - :avocado: tags=3Dendian:big - :avocado: tags=3Ddevice:pcnet32 - """ - self.check_mips_malta('mips64', 'be') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index a4a317115b3..985ac5c27fe 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -42,6 +42,7 @@ test_timeouts =3D { 'mips_malta' : 480, 'mipsel_malta' : 420, 'mipsel_replay' : 480, + 'mips64_malta' : 240, 'mips64el_malta' : 420, 'mips64el_replay' : 180, 'netdev_ethtool' : 180, @@ -191,6 +192,7 @@ tests_mipsel_system_thorough =3D [ ] =20 tests_mips64_system_thorough =3D [ + 'mips64_malta', 'mips64_tuxrun', ] =20 diff --git a/tests/functional/test_mips64_malta.py b/tests/functional/test_= mips64_malta.py new file mode 100755 index 00000000000..53c3e0c1221 --- /dev/null +++ b/tests/functional/test_mips64_malta.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# +# Functional tests for the big-endian 64-bit MIPS Malta board +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset +from test_mips_malta import mips_check_wheezy + + +class MaltaMachineConsole(LinuxKernelTest): + + ASSET_WHEEZY_KERNEL =3D Asset( + ('https://people.debian.org/~aurel32/qemu/mips/' + 'vmlinux-3.2.0-4-5kc-malta'), + '3e4ec154db080b3f1839f04dde83120654a33e5e1716863de576c47cb94f68f6') + + ASSET_WHEEZY_DISK =3D Asset( + ('https://people.debian.org/~aurel32/qemu/mips/' + 'debian_wheezy_mips_standard.qcow2'), + 'de03599285b8382ad309309a6c4869f6c6c42a5cfc983342bab9ec0dfa7849a2') + + def test_wheezy(self): + kernel_path =3D self.ASSET_WHEEZY_KERNEL.fetch() + image_path =3D self.ASSET_WHEEZY_DISK.fetch() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 root=3D/dev/sda1') + mips_check_wheezy(self, + kernel_path, image_path, kernel_command_line, cpuinfo=3D'MIPS = 20Kc', + dl_file=3D'/boot/initrd.img-3.2.0-4-5kc-malta', + hsum=3D'd98b953bb4a41c0fc0fd8d19bbc691c08989ac52568c1d3054d92d= fd890d3f06') + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393950; cv=none; d=zohomail.com; s=zohoarc; b=cJQgcEDllqLVAxDMo9ILb+WQnfpYmV3wxScr/VtW7lYLLJuojWVfB2CmRxBSeKVLvOzYixqZ4zU2GPCFUS8e4eXwnnTdcyrTPSuwR3S+75+kF68tr6zvzBOCmoILCA6V8jzSCcjIB4GIWWGSm+IixTFXH7rI9w8B6c2zEeQovGw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393950; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kZRqi4JdQILCcaeMQSCdPvw0mRP3kSVf+QSe3K1vKOo=; b=He4nx+JatYy6Vk1R1l1DF1vxEWrworbVAn0cYIrgu7zDivXpjgi/WyTXRGBZPC6dMQL2AtMswl3qUu0WnAc3+O8QyIxEdcMqL1B1NCOwm0eWDLaIHYW+amivE1Z3nSgJjOg6s55xmlgn+R5xox4WNiPsygvFOwuZIHwLg+iSnGM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393950453640.9798646214628; Wed, 23 Apr 2025 00:39:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfQ-0003Kb-OM; Wed, 23 Apr 2025 03:37:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfN-0003JD-8C for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfK-0003JV-VK for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:08 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-214-rn5nguKmMwCuRKU3XiZ_pQ-1; Wed, 23 Apr 2025 03:37:00 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8ACD11800263; Wed, 23 Apr 2025 07:36:59 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F27E619560A3; Wed, 23 Apr 2025 07:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393826; 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=kZRqi4JdQILCcaeMQSCdPvw0mRP3kSVf+QSe3K1vKOo=; b=fvAWDpnZxhtzTYc7NxlqFPxSQIuh7SCFKFmUzncaGe4/cKi9AJVlGvsDWLAP2DVERqKYUP YKZ/VAxukl6nzc6ILyDv9Jq+661g8kLxlvcryt1IMn445R9Cf6ViMaMt5GzKmuUIXv9qgL oDe1pyl7LAwAnucQWtJFqPG1OwP0RMY= X-MC-Unique: rn5nguKmMwCuRKU3XiZ_pQ-1 X-Mimecast-MFC-AGG-ID: rn5nguKmMwCuRKU3XiZ_pQ_1745393819 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 20/29] tests/avocado: Remove the boot_linux.py tests Date: Wed, 23 Apr 2025 09:36:00 +0200 Message-ID: <20250423073610.271585-21-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393952851019100 From: Thomas Huth These tests are based on the cloudinit functions from Avocado. The cloudinit is very, very slow compared to our other tests, so most of these Avocado tests have either been disabled by default with a decorator, or have been marked to only run with KVM. We won't include this sluggish cloudinit stuff in the functional framework, and we've already got plenty of other tests there that check pretty much the same things, so let's simply get rid of these old tests now. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-11-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/boot_linux.py | 132 ------------------------------------ 1 file changed, 132 deletions(-) delete mode 100644 tests/avocado/boot_linux.py diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py deleted file mode 100644 index a029ef4ad1e..00000000000 --- a/tests/avocado/boot_linux.py +++ /dev/null @@ -1,132 +0,0 @@ -# Functional test that boots a complete Linux system via a cloud image -# -# Copyright (c) 2018-2020 Red Hat, Inc. -# -# Author: -# Cleber Rosa -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -import os - -from avocado_qemu.linuxtest import LinuxTest -from avocado_qemu import BUILD_DIR - -from avocado import skipUnless - - -class BootLinuxX8664(LinuxTest): - """ - :avocado: tags=3Darch:x86_64 - """ - timeout =3D 480 - - def test_pc_i440fx_tcg(self): - """ - :avocado: tags=3Dmachine:pc - :avocado: tags=3Daccel:tcg - """ - self.require_accelerator("tcg") - self.vm.add_args("-accel", "tcg") - self.launch_and_wait(set_up_ssh_connection=3DFalse) - - def test_pc_i440fx_kvm(self): - """ - :avocado: tags=3Dmachine:pc - :avocado: tags=3Daccel:kvm - """ - self.require_accelerator("kvm") - self.vm.add_args("-accel", "kvm") - self.launch_and_wait(set_up_ssh_connection=3DFalse) - - def test_pc_q35_tcg(self): - """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Daccel:tcg - """ - self.require_accelerator("tcg") - self.vm.add_args("-accel", "tcg") - self.launch_and_wait(set_up_ssh_connection=3DFalse) - - def test_pc_q35_kvm(self): - """ - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Daccel:kvm - """ - self.require_accelerator("kvm") - self.vm.add_args("-accel", "kvm") - self.launch_and_wait(set_up_ssh_connection=3DFalse) - - -# For Aarch64 we only boot KVM tests in CI as booting the current -# Fedora OS in TCG tests is very heavyweight. There are lighter weight -# distros which we use in the machine_aarch64_virt.py tests. -class BootLinuxAarch64(LinuxTest): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:virt - """ - timeout =3D 720 - - def test_virt_kvm(self): - """ - :avocado: tags=3Daccel:kvm - :avocado: tags=3Dcpu:host - """ - self.require_accelerator("kvm") - self.vm.add_args("-accel", "kvm") - self.vm.add_args("-machine", "virt,gic-version=3Dhost") - self.vm.add_args('-bios', - os.path.join(BUILD_DIR, 'pc-bios', - 'edk2-aarch64-code.fd')) - self.vm.add_args('-device', 'virtio-rng-pci,rng=3Drng0') - self.vm.add_args('-object', 'rng-random,id=3Drng0,filename=3D/dev/= urandom') - self.launch_and_wait(set_up_ssh_connection=3DFalse) - - -# See the tux_baseline.py tests for almost the same coverage in a lot -# less time. -class BootLinuxPPC64(LinuxTest): - """ - :avocado: tags=3Darch:ppc64 - """ - - timeout =3D 360 - - @skipUnless(os.getenv('SPEED') =3D=3D 'slow', 'runtime limited') - def test_pseries_tcg(self): - """ - :avocado: tags=3Dmachine:pseries - :avocado: tags=3Daccel:tcg - """ - self.require_accelerator("tcg") - self.vm.add_args("-accel", "tcg") - self.launch_and_wait(set_up_ssh_connection=3DFalse) - - def test_pseries_kvm(self): - """ - :avocado: tags=3Dmachine:pseries - :avocado: tags=3Daccel:kvm - """ - self.require_accelerator("kvm") - self.vm.add_args("-accel", "kvm") - self.vm.add_args("-machine", "cap-ccf-assist=3Doff") - self.launch_and_wait(set_up_ssh_connection=3DFalse) - -class BootLinuxS390X(LinuxTest): - """ - :avocado: tags=3Darch:s390x - """ - - timeout =3D 240 - - @skipUnless(os.getenv('SPEED') =3D=3D 'slow', 'runtime limited') - def test_s390_ccw_virtio_tcg(self): - """ - :avocado: tags=3Dmachine:s390-ccw-virtio - :avocado: tags=3Daccel:tcg - """ - self.require_accelerator("tcg") - self.vm.add_args("-accel", "tcg") - self.launch_and_wait(set_up_ssh_connection=3DFalse) --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393895; cv=none; d=zohomail.com; s=zohoarc; b=BfAzKZKxpm9Iyo+n4qdOvY5S+CP5zXyug/J2AFIGdnUgHhh7G2w6dtvsD5bYzVNbARcpZ9O+nqqJE0ogMNxwBklSHXOQf4lpFA90s9B+bcc7gIDL0NzixdxUrRJLGT/CtlGAzBAXXHyl02GjJOACUeWbAIUzGZCoUtbUzrT72CI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393895; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=a+sGRaPNLJFFzE4winYe8fJw+6o17Oi8yTqbGM972Eo=; b=MvYpextO9g1kc0PNNjh7ALMOkWLYN2tGQjOedP9MAImlR2kCcVhur73fB0WQJ390nvz94c56leaWLStSePPewhfAZdP5iojFCFei74XeqV8xfJKhHyDH0fKU6/X0Lsgkqa1sozo6+W8kxPlUiVkYHGmQaOWpsJXsmqTvavwZ+cM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393895097201.43072720820408; Wed, 23 Apr 2025 00:38:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfS-0003RG-63; Wed, 23 Apr 2025 03:37:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfN-0003JF-93 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfK-0003JQ-FZ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:08 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-79-79_-EBErMWKbWrs8HtcvkQ-1; Wed, 23 Apr 2025 03:37:02 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 910F918001CA; Wed, 23 Apr 2025 07:37:01 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 00B9319560A3; Wed, 23 Apr 2025 07:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393825; 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=a+sGRaPNLJFFzE4winYe8fJw+6o17Oi8yTqbGM972Eo=; b=WDYx+vkbzj6suxLiugT1CI97jR1NRyBYa0jWSP5KX4681opp62kOkKBKwwg4gI8/uDwnVE q9xBiyZqQPmNkDgY9OpWQ9RzZyeowELJhndoxjEuKxj9s4K4dugakYw+O9Lxoa30O54D6r ah7VKYfguWHFsL/2o9ycJ1EevplfKcQ= X-MC-Unique: 79_-EBErMWKbWrs8HtcvkQ-1 X-Mimecast-MFC-AGG-ID: 79_-EBErMWKbWrs8HtcvkQ_1745393821 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 21/29] tests/functional: Use the tuxrun kernel for the x86 replay test Date: Wed, 23 Apr 2025 09:36:01 +0200 Message-ID: <20250423073610.271585-22-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393896743019100 From: Thomas Huth This way we can do a full boot in record-replay mode and should get a similar test coverage compared to the old replay test from tests/avocado/replay_linux.py. Thus remove the x86 avocado replay_linux test now. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-12-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/replay_linux.py | 46 -------------------------- tests/functional/test_x86_64_replay.py | 43 ++++++++++++++++++------ 2 files changed, 33 insertions(+), 56 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 59169224353..6ba283d3bf6 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -118,52 +118,6 @@ def run_replay_dump(self, replay_path): except subprocess.CalledProcessError: self.fail('replay-dump.py failed') =20 -@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') -class ReplayLinuxX8664(ReplayLinux): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Daccel:tcg - """ - - chksum =3D 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c= 5c27a0' - - def test_pc_i440fx(self): - """ - :avocado: tags=3Dmachine:pc - """ - self.run_rr(shift=3D1) - - def test_pc_q35(self): - """ - :avocado: tags=3Dmachine:q35 - """ - self.run_rr(shift=3D3) - -@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') -class ReplayLinuxX8664Virtio(ReplayLinux): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Dvirtio - :avocado: tags=3Daccel:tcg - """ - - hdd =3D 'virtio-blk-pci' - cd =3D 'virtio-blk-pci' - bus =3D None - - chksum =3D 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c= 5c27a0' - - def test_pc_i440fx(self): - """ - :avocado: tags=3Dmachine:pc - """ - self.run_rr(shift=3D1) - - def test_pc_q35(self): - """ - :avocado: tags=3Dmachine:q35 - """ - self.run_rr(shift=3D3) =20 @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') class ReplayLinuxAarch64(ReplayLinux): diff --git a/tests/functional/test_x86_64_replay.py b/tests/functional/test= _x86_64_replay.py index 180f23a60c5..27287d452dc 100755 --- a/tests/functional/test_x86_64_replay.py +++ b/tests/functional/test_x86_64_replay.py @@ -5,30 +5,53 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import Asset, skipFlakyTest +from subprocess import check_call, DEVNULL + +from qemu_test import Asset, skipFlakyTest, get_qemu_img from replay_kernel import ReplayKernelBase =20 =20 class X86Replay(ReplayKernelBase): =20 ASSET_KERNEL =3D Asset( - ('https://archives.fedoraproject.org/pub/archive/fedora/linux' - '/releases/29/Everything/x86_64/os/images/pxeboot/vmlinuz'), - '8f237d84712b1b411baf3af2aeaaee10b9aae8e345ec265b87ab3a39639eb143') + 'https://storage.tuxboot.com/buildroot/20241119/x86_64/bzImage', + 'f57bfc6553bcd6e0a54aab86095bf642b33b5571d14e3af1731b18c87ed5aef8') + + ASSET_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/buildroot/20241119/x86_64/rootfs.ext4= .zst', + '4b8b2a99117519c5290e1202cb36eb6c7aaba92b357b5160f5970cf5fb78a751') =20 - def do_test_x86(self, machine): + def do_test_x86(self, machine, blkdevice, devroot): + self.require_netdev('user') self.set_machine(machine) + self.cpu=3D"Nehalem" kernel_path =3D self.ASSET_KERNEL.fetch() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' - console_pattern =3D 'VFS: Cannot open root device' - self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) + + raw_disk =3D self.uncompress(self.ASSET_ROOTFS) + disk =3D self.scratch_file('scratch.qcow2') + qemu_img =3D get_qemu_img(self) + check_call([qemu_img, 'create', '-f', 'qcow2', '-b', raw_disk, + '-F', 'raw', disk], stdout=3DDEVNULL, stderr=3DDEVNULL) + + args =3D ('-drive', 'file=3D%s,snapshot=3Don,id=3Dhd0,if=3Dnone' %= disk, + '-drive', 'driver=3Dblkreplay,id=3Dhd0-rr,if=3Dnone,image= =3Dhd0', + '-device', '%s,drive=3Dhd0-rr' % blkdevice, + '-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22', + '-device', 'virtio-net,netdev=3Dvnet', + '-object', 'filter-replay,id=3Dreplay,netdev=3Dvnet') + + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + f"console=3DttyS0 root=3D/dev/{devroot}") + console_pattern =3D 'Welcome to TuxTest' + self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5, + args=3Dargs) =20 @skipFlakyTest('https://gitlab.com/qemu-project/qemu/-/issues/2094') def test_pc(self): - self.do_test_x86('pc') + self.do_test_x86('pc', 'virtio-blk', 'vda') =20 def test_q35(self): - self.do_test_x86('q35') + self.do_test_x86('q35', 'ide-hd', 'sda') =20 =20 if __name__ =3D=3D '__main__': --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393980; cv=none; d=zohomail.com; s=zohoarc; b=Cx79cdjr0DaZ0xYx+EGrH+B4zs+ulyp9eqHjxYdPsyPHf9VgfdFoHg/MHXx8dvT9BgqXbtfIBAiIe3mL9R8rYzC3itYSDgr/1D3+dAi5ZjRm3rvzAxzrcUBe2hMs3deTpGS9OJhZv2RdAu7LNqaPuaXluJSZ4VjdMoKX45Idvcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393980; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dOrapOjNaXGC/Tgiz9AARYOrIS72b4Wqa59eO2DLEkQ=; b=ZonQFU59NBEN8sOfGQs26TVjbmNERl9/Zi7yCg4WjVZ42Z4cOm4V3hg4vzCJV/WbBrk+JfGfszgcpqzVT8ElIuxwaAfHqkErMfXqnivYuwjW+0dnHnB9tmCOC6wYaDzy63vDG9WrwBAY70LPrwi1TH7I9OcCWSefiA0TrPKpWhI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393980701882.4048711780554; Wed, 23 Apr 2025 00:39:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfW-0003YC-DI; Wed, 23 Apr 2025 03:37:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfR-0003PP-ED for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfO-0003Jy-SG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:13 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-341-LuXgSc_tPG-ifZ0MXfpizg-1; Wed, 23 Apr 2025 03:37:04 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CF4A2195609D; Wed, 23 Apr 2025 07:37:03 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 05C0819560A3; Wed, 23 Apr 2025 07:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393829; 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=dOrapOjNaXGC/Tgiz9AARYOrIS72b4Wqa59eO2DLEkQ=; b=exycmVQBlbR7MulRnvKUpi39O4nWRK3uVKZr9+hreQsxDMctjPe/RGYuyWapdJhkga/8fc pHH62/s3Acj2b1Ky+032i8+zdTk3yqGo5Ro0YNQYEDK7kmUsnsl8zf72aG5Wwa4vGgtdJr UlZA22/1UZ9tsMGQBSpzk2gQywrKxpI= X-MC-Unique: LuXgSc_tPG-ifZ0MXfpizg-1 X-Mimecast-MFC-AGG-ID: LuXgSc_tPG-ifZ0MXfpizg_1745393823 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 22/29] tests/functional: Use the tuxrun kernel for the aarch64 replay test Date: Wed, 23 Apr 2025 09:36:02 +0200 Message-ID: <20250423073610.271585-23-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393982323019000 From: Thomas Huth This way we can do a full boot in record-replay mode and should get a similar test coverage compared to the old replay test from tests/avocado/replay_linux.py. Since the aarch64 test was the last avocado test in the tests/avocado/replay_linux.py file, we can remove this file now completely. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20250414113031.151105-13-thuth@redhat.com> --- MAINTAINERS | 1 - tests/avocado/replay_linux.py | 160 ------------------------ tests/functional/test_aarch64_replay.py | 37 ++++-- 3 files changed, 29 insertions(+), 169 deletions(-) delete mode 100644 tests/avocado/replay_linux.py diff --git a/MAINTAINERS b/MAINTAINERS index 72f6b208f5a..e29910cbd77 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3668,7 +3668,6 @@ F: include/system/replay.h F: docs/devel/replay.rst F: docs/system/replay.rst F: stubs/replay.c -F: tests/avocado/replay_linux.py F: tests/functional/*reverse_debug*.py F: tests/functional/*replay*.py F: qapi/replay.json diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py deleted file mode 100644 index 6ba283d3bf6..00000000000 --- a/tests/avocado/replay_linux.py +++ /dev/null @@ -1,160 +0,0 @@ -# Record/replay test that boots a complete Linux system via a cloud image -# -# Copyright (c) 2020 ISP RAS -# -# Author: -# Pavel Dovgalyuk -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -import os -import logging -import time - -from avocado import skipUnless -from avocado_qemu import BUILD_DIR -from avocado.utils import cloudinit -from avocado.utils import network -from avocado.utils import vmimage -from avocado.utils import datadrainer -from avocado.utils.path import find_command -from avocado_qemu.linuxtest import LinuxTest - -class ReplayLinux(LinuxTest): - """ - Boots a Linux system, checking for a successful initialization - """ - - timeout =3D 1800 - chksum =3D None - hdd =3D 'ide-hd' - cd =3D 'ide-cd' - bus =3D 'ide' - - def setUp(self): - # LinuxTest does many replay-incompatible things, but includes - # useful methods. Do not setup LinuxTest here and just - # call some functions. - super(LinuxTest, self).setUp() - self._set_distro() - self.boot_path =3D self.download_boot() - self.phone_server =3D cloudinit.PhoneHomeServer(('0.0.0.0', 0), - self.name) - ssh_pubkey, self.ssh_key =3D self.set_up_existing_ssh_keys() - self.cloudinit_path =3D self.prepare_cloudinit(ssh_pubkey) - - def vm_add_disk(self, vm, path, id, device): - bus_string =3D '' - if self.bus: - bus_string =3D ',bus=3D%s.%d' % (self.bus, id,) - vm.add_args('-drive', 'file=3D%s,snapshot=3Don,id=3Ddisk%s,if=3Dno= ne' % (path, id)) - vm.add_args('-drive', - 'driver=3Dblkreplay,id=3Ddisk%s-rr,if=3Dnone,image=3Ddisk%s' %= (id, id)) - vm.add_args('-device', - '%s,drive=3Ddisk%s-rr%s' % (device, id, bus_string)) - - def vm_add_cdrom(self, vm, path, id, device): - vm.add_args('-drive', 'file=3D%s,id=3Ddisk%s,if=3Dnone,media=3Dcdr= om' % (path, id)) - - def launch_and_wait(self, record, args, shift): - self.require_netdev('user') - vm =3D self.get_vm() - vm.add_args('-smp', '1') - vm.add_args('-m', '1024') - vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22', - '-device', 'virtio-net,netdev=3Dvnet') - vm.add_args('-object', 'filter-replay,id=3Dreplay,netdev=3Dvnet') - if args: - vm.add_args(*args) - self.vm_add_disk(vm, self.boot_path, 0, self.hdd) - self.vm_add_cdrom(vm, self.cloudinit_path, 1, self.cd) - logger =3D logging.getLogger('replay') - if record: - logger.info('recording the execution...') - mode =3D 'record' - else: - logger.info('replaying the execution...') - mode =3D 'replay' - replay_path =3D os.path.join(self.workdir, 'replay.bin') - vm.add_args('-icount', 'shift=3D%s,rr=3D%s,rrfile=3D%s' % - (shift, mode, replay_path)) - - start_time =3D time.time() - - vm.set_console() - vm.launch() - console_drainer =3D datadrainer.LineLogger(vm.console_socket.filen= o(), - logger=3Dself.log.getChild('console'), - stop_check=3D(lambda : not vm.is_runni= ng())) - console_drainer.start() - if record: - while not self.phone_server.instance_phoned_back: - self.phone_server.handle_request() - vm.shutdown() - logger.info('finished the recording with log size %s bytes' - % os.path.getsize(replay_path)) - self.run_replay_dump(replay_path) - logger.info('successfully tested replay-dump.py') - else: - vm.event_wait('SHUTDOWN', self.timeout) - vm.wait() - logger.info('successfully finished the replay') - elapsed =3D time.time() - start_time - logger.info('elapsed time %.2f sec' % elapsed) - return elapsed - - def run_rr(self, args=3DNone, shift=3D7): - t1 =3D self.launch_and_wait(True, args, shift) - t2 =3D self.launch_and_wait(False, args, shift) - logger =3D logging.getLogger('replay') - logger.info('replay overhead {:.2%}'.format(t2 / t1 - 1)) - - def run_replay_dump(self, replay_path): - try: - subprocess.check_call(["./scripts/replay-dump.py", - "-f", replay_path], - stdout=3Dsubprocess.DEVNULL) - except subprocess.CalledProcessError: - self.fail('replay-dump.py failed') - - -@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') -class ReplayLinuxAarch64(ReplayLinux): - """ - :avocado: tags=3Daccel:tcg - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dcpu:max - """ - - chksum =3D '1e18d9c0cf734940c4b5d5ec592facaed2af0ad0329383d5639c997fdf= 16fe49' - - hdd =3D 'virtio-blk-device' - cd =3D 'virtio-blk-device' - bus =3D None - - def get_common_args(self): - return ('-bios', - os.path.join(BUILD_DIR, 'pc-bios', 'edk2-aarch64-code.fd'), - "-cpu", "max,lpa2=3Doff", - '-device', 'virtio-rng-pci,rng=3Drng0', - '-object', 'rng-builtin,id=3Drng0') - - def test_virt_gicv2(self): - """ - :avocado: tags=3Dmachine:gic-version=3D2 - """ - - self.run_rr(shift=3D3, - args=3D(*self.get_common_args(), - "-machine", "virt,gic-version=3D2")) - - def test_virt_gicv3(self): - """ - :avocado: tags=3Dmachine:gic-version=3D3 - """ - - self.run_rr(shift=3D3, - args=3D(*self.get_common_args(), - "-machine", "virt,gic-version=3D3")) diff --git a/tests/functional/test_aarch64_replay.py b/tests/functional/tes= t_aarch64_replay.py index bd6609d9149..db12e76603f 100755 --- a/tests/functional/test_aarch64_replay.py +++ b/tests/functional/test_aarch64_replay.py @@ -5,25 +5,46 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import Asset, skipIfOperatingSystem +from subprocess import check_call, DEVNULL + +from qemu_test import Asset, skipIfOperatingSystem, get_qemu_img from replay_kernel import ReplayKernelBase =20 =20 class Aarch64Replay(ReplayKernelBase): =20 ASSET_KERNEL =3D Asset( - ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' - 'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'), - '7e1430b81c26bdd0da025eeb8fbd77b5dc961da4364af26e771bd39f379cbbf7') + 'https://storage.tuxboot.com/buildroot/20241119/arm64/Image', + 'b74743c5e89e1cea0f73368d24ae0ae85c5204ff84be3b5e9610417417d2f235') + + ASSET_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/buildroot/20241119/arm64/rootfs.ext4.= zst', + 'a1acaaae2068df4648d04ff75f532aaa8c5edcd6b936122b6f0db4848a07b465') =20 def test_aarch64_virt(self): + self.require_netdev('user') self.set_machine('virt') - self.cpu =3D 'cortex-a53' + self.cpu =3D 'cortex-a57' kernel_path =3D self.ASSET_KERNEL.fetch() + + raw_disk =3D self.uncompress(self.ASSET_ROOTFS) + disk =3D self.scratch_file('scratch.qcow2') + qemu_img =3D get_qemu_img(self) + check_call([qemu_img, 'create', '-f', 'qcow2', '-b', raw_disk, + '-F', 'raw', disk], stdout=3DDEVNULL, stderr=3DDEVNULL) + + args =3D ('-drive', 'file=3D%s,snapshot=3Don,id=3Dhd0,if=3Dnone' %= disk, + '-drive', 'driver=3Dblkreplay,id=3Dhd0-rr,if=3Dnone,image= =3Dhd0', + '-device', 'virtio-blk-device,drive=3Dhd0-rr', + '-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22', + '-device', 'virtio-net,netdev=3Dvnet', + '-object', 'filter-replay,id=3Dreplay,netdev=3Dvnet') + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyAMA0') - console_pattern =3D 'VFS: Cannot open root device' - self.run_rr(kernel_path, kernel_command_line, console_pattern) + 'console=3DttyAMA0 root=3D/dev/vda') + console_pattern =3D 'Welcome to TuxTest' + self.run_rr(kernel_path, kernel_command_line, console_pattern, + args=3Dargs) =20 =20 if __name__ =3D=3D '__main__': --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393922; cv=none; d=zohomail.com; s=zohoarc; b=MUslfnWWAY7WPkQJY5fKWfBRbwQWChAbFiYwFxbuzkaGUdOm9hRkY0Tao1fN7RpLV2ctTBWMoSjmmMx2CxagMWlReRsORLPfTYiUv6pqgXDYXQPwKDzrl1kgki/DaynBMKFYwl6y+b0Nm8qVGDQXLJqhMEYklLyssu8RB67fS7U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393922; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=x0emzPW6NvZSJLz3dV5t6+/JjM51H7IL5Y1yOyWnVSc=; b=M7vGxLUbAMff3ct1IdK9nsV2xblOJhHtQp3ig4TSWsTk/GpMpp5N0F0o+cw2hsCGtKMrFmLBDROVmP0GIVtrN9SHKQx6KdGilkMUDx5RGI/k8Jx2i2QXLNpcNxmFHTSRG2ntULHKPD4LvATjosc5EZZb5FlFW9xHJYRESnQxaHM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393921994757.9929164137219; Wed, 23 Apr 2025 00:38:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfW-0003Yf-US; Wed, 23 Apr 2025 03:37:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfT-0003VZ-Ue for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfP-0003K8-Em for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:15 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-403-qLVdGVw0P2i9-d10Pq7dmg-1; Wed, 23 Apr 2025 03:37:07 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 17848180087A; Wed, 23 Apr 2025 07:37:06 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 43AE519560A3; Wed, 23 Apr 2025 07:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x0emzPW6NvZSJLz3dV5t6+/JjM51H7IL5Y1yOyWnVSc=; b=ay4rRjqsYnWBgsT01DV3VUgGcMZeCZb6TGxr69WenRr50S5PRjSyd+AURcYBQgsnzJ1/CB DrQJc97BJA1ZcsN1qR1YqXXQ8IxlCaMB6/708/lSF5ry5HpfVv2R3gn0BR74ZvYsvkBYvR A/+MicdO/mCbzjnysvEigaEWMGuMTkM= X-MC-Unique: qLVdGVw0P2i9-d10Pq7dmg-1 X-Mimecast-MFC-AGG-ID: qLVdGVw0P2i9-d10Pq7dmg_1745393826 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , Eric Auger Subject: [PULL 23/29] tests/functional: Convert the SMMU test to the functional framework Date: Wed, 23 Apr 2025 09:36:03 +0200 Message-ID: <20250423073610.271585-24-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393924916019100 Content-Type: text/plain; charset="utf-8" From: Thomas Huth This test was using cloudinit and a "dnf install" command in the guest to exercise the NIC with SMMU enabled. Since we don't have the cloudinit stuff in the functional framework and we should not rely on having access to external networks (once our ASSETs have been cached), we rather boot into the initrd first, manually mount the root disk and then use the check_http_download() function from the functional framework here instead for testing whether the network works as expected. Unfortunately, there seems to be a small race when using the files from Fedora 33: To enter the initrd shell, we have to send a "return" once. But it does not seem to work if we send it too early. Using a sleep(0.2) makes it work reliably for me, but to make it even more unlikely to trigger this situation, let's better limit the Fedora 33 tests to only run with KVM. Finally, while we're at it, we also add some lines for testing writes to the hard disk, as we already do it in the test_intel_iommu test. Reviewed-by: Eric Auger Tested-by: Eric Auger Message-ID: <20250414113031.151105-14-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- tests/avocado/smmu.py | 139 ----------------- tests/functional/meson.build | 2 + tests/functional/test_aarch64_smmu.py | 205 ++++++++++++++++++++++++++ 4 files changed, 208 insertions(+), 140 deletions(-) delete mode 100644 tests/avocado/smmu.py create mode 100755 tests/functional/test_aarch64_smmu.py diff --git a/MAINTAINERS b/MAINTAINERS index e29910cbd77..07f77c048e2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -211,7 +211,7 @@ L: qemu-arm@nongnu.org S: Maintained F: hw/arm/smmu* F: include/hw/arm/smmu* -F: tests/avocado/smmu.py +F: tests/functional/test_aarch64_smmu.py =20 AVR TCG CPUs M: Michael Rolnik diff --git a/tests/avocado/smmu.py b/tests/avocado/smmu.py deleted file mode 100644 index 83fd79e922e..00000000000 --- a/tests/avocado/smmu.py +++ /dev/null @@ -1,139 +0,0 @@ -# SMMUv3 Functional tests -# -# Copyright (c) 2021 Red Hat, Inc. -# -# Author: -# Eric Auger -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. -import os - -from avocado import skipUnless -from avocado_qemu import BUILD_DIR -from avocado_qemu.linuxtest import LinuxTest - -@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLa= b') -class SMMU(LinuxTest): - """ - :avocado: tags=3Daccel:kvm - :avocado: tags=3Dcpu:host - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Ddistro:fedora - :avocado: tags=3Dsmmu - :avocado: tags=3Dflaky - """ - - IOMMU_ADDON =3D ',iommu_platform=3Don,disable-modern=3Doff,disable-leg= acy=3Don' - kernel_path =3D None - initrd_path =3D None - kernel_params =3D None - - def set_up_boot(self): - path =3D self.download_boot() - self.vm.add_args('-device', 'virtio-blk-pci,bus=3Dpcie.0,' + - 'drive=3Ddrv0,id=3Dvirtio-disk0,bootindex=3D1,' - 'werror=3Dstop,rerror=3Dstop' + self.IOMMU_ADDON) - self.vm.add_args('-drive', - 'file=3D%s,if=3Dnone,cache=3Dwritethrough,id=3Ddr= v0' % path) - - def setUp(self): - super(SMMU, self).setUp(None, 'virtio-net-pci' + self.IOMMU_ADDON) - - def common_vm_setup(self, custom_kernel=3DFalse): - self.require_accelerator("kvm") - self.vm.add_args("-accel", "kvm") - self.vm.add_args("-cpu", "host") - self.vm.add_args("-machine", "iommu=3Dsmmuv3") - self.vm.add_args("-d", "guest_errors") - self.vm.add_args('-bios', os.path.join(BUILD_DIR, 'pc-bios', - 'edk2-aarch64-code.fd')) - self.vm.add_args('-device', 'virtio-rng-pci,rng=3Drng0') - self.vm.add_args('-object', - 'rng-random,id=3Drng0,filename=3D/dev/urandom') - - if custom_kernel is False: - return - - kernel_url =3D self.distro.pxeboot_url + 'vmlinuz' - initrd_url =3D self.distro.pxeboot_url + 'initrd.img' - self.kernel_path =3D self.fetch_asset(kernel_url) - self.initrd_path =3D self.fetch_asset(initrd_url) - - def run_and_check(self): - if self.kernel_path: - self.vm.add_args('-kernel', self.kernel_path, - '-append', self.kernel_params, - '-initrd', self.initrd_path) - self.launch_and_wait() - self.ssh_command('cat /proc/cmdline') - self.ssh_command('dnf -y install numactl-devel') - - - # 5.3 kernel without RIL # - - def test_smmu_noril(self): - """ - :avocado: tags=3Dsmmu_noril - :avocado: tags=3Dsmmu_noril_tests - :avocado: tags=3Ddistro_version:31 - """ - self.common_vm_setup() - self.run_and_check() - - def test_smmu_noril_passthrough(self): - """ - :avocado: tags=3Dsmmu_noril_passthrough - :avocado: tags=3Dsmmu_noril_tests - :avocado: tags=3Ddistro_version:31 - """ - self.common_vm_setup(True) - self.kernel_params =3D (self.distro.default_kernel_params + - ' iommu.passthrough=3Don') - self.run_and_check() - - def test_smmu_noril_nostrict(self): - """ - :avocado: tags=3Dsmmu_noril_nostrict - :avocado: tags=3Dsmmu_noril_tests - :avocado: tags=3Ddistro_version:31 - """ - self.common_vm_setup(True) - self.kernel_params =3D (self.distro.default_kernel_params + - ' iommu.strict=3D0') - self.run_and_check() - - # 5.8 kernel featuring range invalidation - # >=3D v5.7 kernel - - def test_smmu_ril(self): - """ - :avocado: tags=3Dsmmu_ril - :avocado: tags=3Dsmmu_ril_tests - :avocado: tags=3Ddistro_version:33 - """ - self.common_vm_setup() - self.run_and_check() - - def test_smmu_ril_passthrough(self): - """ - :avocado: tags=3Dsmmu_ril_passthrough - :avocado: tags=3Dsmmu_ril_tests - :avocado: tags=3Ddistro_version:33 - """ - self.common_vm_setup(True) - self.kernel_params =3D (self.distro.default_kernel_params + - ' iommu.passthrough=3Don') - self.run_and_check() - - def test_smmu_ril_nostrict(self): - """ - :avocado: tags=3Dsmmu_ril_nostrict - :avocado: tags=3Dsmmu_ril_tests - :avocado: tags=3Ddistro_version:33 - """ - self.common_vm_setup(True) - self.kernel_params =3D (self.distro.default_kernel_params + - ' iommu.strict=3D0') - self.run_and_check() diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 985ac5c27fe..b317ad42c5a 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -18,6 +18,7 @@ test_timeouts =3D { 'aarch64_rme_sbsaref' : 1200, 'aarch64_sbsaref_alpine' : 1200, 'aarch64_sbsaref_freebsd' : 720, + 'aarch64_smmu' : 720, 'aarch64_tuxrun' : 240, 'aarch64_virt' : 360, 'aarch64_virt_gpu' : 480, @@ -88,6 +89,7 @@ tests_aarch64_system_thorough =3D [ 'aarch64_sbsaref', 'aarch64_sbsaref_alpine', 'aarch64_sbsaref_freebsd', + 'aarch64_smmu', 'aarch64_tcg_plugins', 'aarch64_tuxrun', 'aarch64_virt', diff --git a/tests/functional/test_aarch64_smmu.py b/tests/functional/test_= aarch64_smmu.py new file mode 100755 index 00000000000..c65d0f28178 --- /dev/null +++ b/tests/functional/test_aarch64_smmu.py @@ -0,0 +1,205 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +# SMMUv3 Functional tests +# +# Copyright (c) 2021 Red Hat, Inc. +# +# Author: +# Eric Auger +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import os +import time + +from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern +from qemu_test import BUILD_DIR +from qemu.utils import kvm_available + + +class SMMU(LinuxKernelTest): + + default_kernel_params =3D ('earlyprintk=3Dpl011,0x9000000 no_timer_che= ck ' + 'printk.time=3D1 rd_NO_PLYMOUTH net.ifnames= =3D0 ' + 'console=3DttyAMA0 rd.rescue') + IOMMU_ADDON =3D ',iommu_platform=3Don,disable-modern=3Doff,disable-leg= acy=3Don' + kernel_path =3D None + initrd_path =3D None + kernel_params =3D None + + GUEST_PORT =3D 8080 + + def set_up_boot(self, path): + self.vm.add_args('-device', 'virtio-blk-pci,bus=3Dpcie.0,' + + 'drive=3Ddrv0,id=3Dvirtio-disk0,bootindex=3D1,' + 'werror=3Dstop,rerror=3Dstop' + self.IOMMU_ADDON) + self.vm.add_args('-drive', + f'file=3D{path},if=3Dnone,cache=3Dwritethrough,id=3Ddrv0,s= napshot=3Don') + + self.vm.add_args('-netdev', + 'user,id=3Dn1,hostfwd=3Dtcp:127.0.0.1:0-:%d' % + self.GUEST_PORT) + self.vm.add_args('-device', 'virtio-net,netdev=3Dn1' + self.IOMMU_= ADDON) + + def common_vm_setup(self, kernel, initrd, disk): + self.require_accelerator("kvm") + self.require_netdev('user') + self.set_machine("virt") + self.vm.add_args('-m', '1G') + self.vm.add_args("-accel", "kvm") + self.vm.add_args("-cpu", "host") + self.vm.add_args("-machine", "iommu=3Dsmmuv3") + self.vm.add_args("-d", "guest_errors") + self.vm.add_args('-bios', os.path.join(BUILD_DIR, 'pc-bios', + 'edk2-aarch64-code.fd')) + self.vm.add_args('-device', 'virtio-rng-pci,rng=3Drng0') + self.vm.add_args('-object', + 'rng-random,id=3Drng0,filename=3D/dev/urandom') + + self.kernel_path =3D kernel.fetch() + self.initrd_path =3D initrd.fetch() + self.set_up_boot(disk.fetch()) + + def run_and_check(self, filename, hashsum): + self.vm.add_args('-initrd', self.initrd_path) + self.vm.add_args('-append', self.kernel_params) + self.launch_kernel(self.kernel_path, initrd=3Dself.initrd_path, + wait_for=3D'attach it to a bug report.') + prompt =3D '# ' + # Fedora 33 requires 'return' to be pressed to enter the shell. + # There seems to be a small race between detecting the previous ':' + # and sending the newline, so we need to add a small delay here. + self.wait_for_console_pattern(':') + time.sleep(0.2) + exec_command_and_wait_for_pattern(self, '\n', prompt) + exec_command_and_wait_for_pattern(self, 'cat /proc/cmdline', + self.kernel_params) + + # Checking for SMMU enablement: + self.log.info("Checking whether SMMU has been enabled...") + exec_command_and_wait_for_pattern(self, 'dmesg | grep smmu', + 'arm-smmu-v3') + self.wait_for_console_pattern(prompt) + exec_command_and_wait_for_pattern(self, + 'find /sys/kernel/iommu_groups/ -type = l', + 'devices/0000:00:') + self.wait_for_console_pattern(prompt) + + # Copy a file (checked later), umount afterwards to drop disk cach= e: + self.log.info("Checking hard disk...") + exec_command_and_wait_for_pattern(self, + "while ! (dmesg -c | grep vda:) ; do sleep 1 ; don= e", + "vda2") + exec_command_and_wait_for_pattern(self, 'mount /dev/vda2 /sysroot', + 'mounted filesystem') + exec_command_and_wait_for_pattern(self, 'cp /bin/vi /sysroot/root/= vi', + prompt) + exec_command_and_wait_for_pattern(self, 'umount /sysroot', prompt) + # Switch from initrd to the cloud image filesystem: + exec_command_and_wait_for_pattern(self, 'mount /dev/vda2 /sysroot', + prompt) + exec_command_and_wait_for_pattern(self, + ('for d in dev proc sys run ; do ' + 'mount -o bind /$d /sysroot/$d ; done'), prompt) + exec_command_and_wait_for_pattern(self, 'chroot /sysroot', prompt) + # Check files on the hard disk: + exec_command_and_wait_for_pattern(self, + ('if diff -q /root/vi /usr/bin/vi ; then echo "file" "ok" ; ' + 'else echo "files differ"; fi'), 'file ok') + self.wait_for_console_pattern(prompt) + exec_command_and_wait_for_pattern(self, f'sha256sum {filename}', + hashsum) + + # Check virtio-net via HTTP: + exec_command_and_wait_for_pattern(self, 'dhclient eth0', prompt) + self.check_http_download(filename, hashsum, self.GUEST_PORT) + + + # 5.3 kernel without RIL # + + ASSET_KERNEL_F31 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' + 'releases/31/Server/aarch64/os/images/pxeboot/vmlinuz'), + '3ae07fcafbfc8e4abeb693035a74fe10698faae15e9ccd48882a9167800c1527') + + ASSET_INITRD_F31 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' + 'releases/31/Server/aarch64/os/images/pxeboot/initrd.img'), + '9f3146b28bc531c689f3c5f114cb74e4bd7bd548e0ba19fa77921d8bd256755a') + + ASSET_DISK_F31 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/rele= ases' + '/31/Cloud/aarch64/images/Fedora-Cloud-Base-31-1.9.aarch64.qcow2'= ), + '1e18d9c0cf734940c4b5d5ec592facaed2af0ad0329383d5639c997fdf16fe49') + + F31_FILENAME =3D '/boot/initramfs-5.3.7-301.fc31.aarch64.img' + F31_HSUM =3D '1a4beec6607d94df73d9dd1b4985c9c23dd0fdcf4e6ca1351d477f19= 0df7bef9' + + def test_smmu_noril(self): + self.common_vm_setup(self.ASSET_KERNEL_F31, self.ASSET_INITRD_F31, + self.ASSET_DISK_F31) + self.kernel_params =3D self.default_kernel_params + self.run_and_check(self.F31_FILENAME, self.F31_HSUM) + + def test_smmu_noril_passthrough(self): + self.common_vm_setup(self.ASSET_KERNEL_F31, self.ASSET_INITRD_F31, + self.ASSET_DISK_F31) + self.kernel_params =3D (self.default_kernel_params + + ' iommu.passthrough=3Don') + self.run_and_check(self.F31_FILENAME, self.F31_HSUM) + + def test_smmu_noril_nostrict(self): + self.common_vm_setup(self.ASSET_KERNEL_F31, self.ASSET_INITRD_F31, + self.ASSET_DISK_F31) + self.kernel_params =3D (self.default_kernel_params + + ' iommu.strict=3D0') + self.run_and_check(self.F31_FILENAME, self.F31_HSUM) + + + # 5.8 kernel featuring range invalidation + # >=3D v5.7 kernel + + ASSET_KERNEL_F33 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' + 'releases/33/Server/aarch64/os/images/pxeboot/vmlinuz'), + 'd8b1e6f7241f339d8e7609c456cf0461ffa4583ed07e0b55c7d1d8a0c154aa89') + + ASSET_INITRD_F33 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' + 'releases/33/Server/aarch64/os/images/pxeboot/initrd.img'), + '92513f55295c2c16a777f7b6c35ccd70a438e9e1e40b6ba39e0e60900615b3df') + + ASSET_DISK_F33 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux/rele= ases' + '/33/Cloud/aarch64/images/Fedora-Cloud-Base-33-1.2.aarch64.qcow2'= ), + 'e7f75cdfd523fe5ac2ca9eeece68edc1a81f386a17f969c1d1c7c87031008a6b') + + F33_FILENAME =3D '/boot/initramfs-5.8.15-301.fc33.aarch64.img' + F33_HSUM =3D '079cfad0caa82e84c8ca1fb0897a4999dd769f262216099f518619e8= 07a550d9' + + def test_smmu_ril(self): + self.common_vm_setup(self.ASSET_KERNEL_F33, self.ASSET_INITRD_F33, + self.ASSET_DISK_F33) + self.kernel_params =3D self.default_kernel_params + self.run_and_check(self.F33_FILENAME, self.F33_HSUM) + + def test_smmu_ril_passthrough(self): + self.common_vm_setup(self.ASSET_KERNEL_F33, self.ASSET_INITRD_F33, + self.ASSET_DISK_F33) + self.kernel_params =3D (self.default_kernel_params + + ' iommu.passthrough=3Don') + self.run_and_check(self.F33_FILENAME, self.F33_HSUM) + + def test_smmu_ril_nostrict(self): + self.common_vm_setup(self.ASSET_KERNEL_F33, self.ASSET_INITRD_F33, + self.ASSET_DISK_F33) + self.kernel_params =3D (self.default_kernel_params + + ' iommu.strict=3D0') + self.run_and_check(self.F33_FILENAME, self.F33_HSUM) + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393904; cv=none; d=zohomail.com; s=zohoarc; b=GHjL4bOjZq9I5ePUr3flRhg600kUQLWp2ZbEY9I9qTbM1q1Femx8iqLfycW/NoXyqLfEkmw0Zw7oIdLb92ul52nIl9XpMER6h69MX0iwTEDkRgcg7fO5cXk60b9IDdd6XBV8IPcxzOyUoT3ZaFu7ChWVJ9dvMfxjUFPSWJWzcX0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393904; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iBqLnYF68chXw7FgEp2geCt/EX7oA46eB4xbEG1tJB4=; b=WlygQMafKcSEl4b9YDuUp4Ml2Y1PL1tOFwpV2xccuyATdO1WULGK7nesXAzkar2WUjdQ/EROG59f/btmm/RG1Vq3REYbQX6yLA9+mC2ExyeKSXpiJ1UfG+Cbe/lYHuiWsNVA4mKdqWAkg0jS4MvkgkZ6Pv49LqiduXovFjsNCzA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393904603502.58880977564354; Wed, 23 Apr 2025 00:38:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfU-0003Vl-5H; Wed, 23 Apr 2025 03:37:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfR-0003On-5o for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfP-0003K7-8R for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:12 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-56-OcOqi51XOMCq83GYSahshA-1; Wed, 23 Apr 2025 03:37:09 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 181DB180010A; Wed, 23 Apr 2025 07:37:08 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7FDA21955BCB; Wed, 23 Apr 2025 07:37:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393830; 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=iBqLnYF68chXw7FgEp2geCt/EX7oA46eB4xbEG1tJB4=; b=D2QwxPSIjyfDGsn83BaIaiE0yDyAYZwA5kor1by4ieREEI/Ql9wZhL0r8bjb3TGpe6Op4R IrIuDlZQqhfZQ8p9zhIM8G2l7CyQSejjEUO0sTfpQMTA5UjGzA16gdSF0pPG74KcBMaocc PdGFm6aey6L/B5FwZIyE0ZNdvq4OQLQ= X-MC-Unique: OcOqi51XOMCq83GYSahshA-1 X-Mimecast-MFC-AGG-ID: OcOqi51XOMCq83GYSahshA_1745393828 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 24/29] gitlab-ci: Update QEMU_JOB_AVOCADO and QEMU_CI_AVOCADO_TESTING Date: Wed, 23 Apr 2025 09:36:04 +0200 Message-ID: <20250423073610.271585-25-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393906757019100 From: Thomas Huth Since we don't run the Avocado jobs in the CI anymore, rename these variables to QEMU_JOB_FUNCTIONAL and QEMU_CI_FUNCTIONAL. Also, there was a mismatch between the documentation and the implementation of QEMU_CI_AVOCADO_TESTING: While the documentation said that you had to "Set this variable to have the tests using the Avocado framework run automatically", you indeed needed to set it to make the pipelines appear in your dashboard - but they were never run automatically in forks and had to be triggered manually. Let's improve this now: No need to hide these pipelines from the users by default anymore (the functional tests should be stable enough nowadays), and rather allow the users to run the pipelines auto- matically with this switch now instead, as was documented. Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-15-thuth@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing/ci-jobs.rst.inc | 19 +++++++++---------- .gitlab-ci.d/base.yml | 8 ++------ .gitlab-ci.d/buildtest-template.yml | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/devel/testing/ci-jobs.rst.inc b/docs/devel/testing/ci-job= s.rst.inc index 3756bbe3554..f1c541cc25b 100644 --- a/docs/devel/testing/ci-jobs.rst.inc +++ b/docs/devel/testing/ci-jobs.rst.inc @@ -126,10 +126,10 @@ QEMU_JOB_PUBLISH The job is for publishing content after a branch has been merged into the upstream default branch. =20 -QEMU_JOB_AVOCADO -~~~~~~~~~~~~~~~~ +QEMU_JOB_FUNCTIONAL +~~~~~~~~~~~~~~~~~~~ =20 -The job runs the Avocado integration test suite +The job runs the functional test suite =20 Contributor controlled runtime variables ---------------------------------------- @@ -149,13 +149,12 @@ the jobs to be manually started from the UI Set this variable to 2 to create the pipelines and run all the jobs immediately, as was the historical behaviour =20 -QEMU_CI_AVOCADO_TESTING -~~~~~~~~~~~~~~~~~~~~~~~ -By default, tests using the Avocado framework are not run automatically in -the pipelines (because multiple artifacts have to be downloaded, and if -these artifacts are not already cached, downloading them make the jobs -reach the timeout limit). Set this variable to have the tests using the -Avocado framework run automatically. +QEMU_CI_FUNCTIONAL +~~~~~~~~~~~~~~~~~~ +By default, tests using the functional framework are not run automatically +in the pipelines (because multiple artifacts have to be downloaded, which +might cause a lot of network traffic). Set this variable to have the tests +using the functional framework run automatically. =20 Other misc variables -------------------- diff --git a/.gitlab-ci.d/base.yml b/.gitlab-ci.d/base.yml index 25b88aaa06a..60a24a9d14d 100644 --- a/.gitlab-ci.d/base.yml +++ b/.gitlab-ci.d/base.yml @@ -69,10 +69,6 @@ variables: - if: '$QEMU_CI !=3D "1" && $QEMU_CI !=3D "2" && $CI_PROJECT_NAMESPACE= !=3D $QEMU_CI_UPSTREAM' when: never =20 - # Avocado jobs don't run in forks unless $QEMU_CI_AVOCADO_TESTING is s= et - - if: '$QEMU_JOB_AVOCADO && $QEMU_CI_AVOCADO_TESTING !=3D "1" && $CI_P= ROJECT_NAMESPACE !=3D $QEMU_CI_UPSTREAM' - when: never - =20 ############################################################# # Stage 2: fine tune execution of jobs in specific scenarios @@ -101,8 +97,8 @@ variables: when: manual allow_failure: true =20 - # Avocado jobs can be manually start in forks if $QEMU_CI_AVOCADO_TEST= ING is unset - - if: '$QEMU_JOB_AVOCADO && $CI_PROJECT_NAMESPACE !=3D $QEMU_CI_UPSTRE= AM' + # Functional jobs can be manually started in forks + - if: '$QEMU_JOB_FUNCTIONAL && $QEMU_CI_FUNCTIONAL !=3D "1" && $CI_PRO= JECT_NAMESPACE !=3D $QEMU_CI_UPSTREAM' when: manual allow_failure: true =20 diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml index 13fa4f4a4fc..d4f145fdb58 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -114,4 +114,4 @@ - cd build - du -chs ${CI_PROJECT_DIR}/*-cache variables: - QEMU_JOB_AVOCADO: 1 + QEMU_JOB_FUNCTIONAL: 1 --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393943; cv=none; d=zohomail.com; s=zohoarc; b=FE2K5+ahMOROUWG+1CqIRyKL8ciwDIr/JPIP9X2a9UFaYViqBGFBC7YxkdojUk+YbbVe27ANm/627MOT4qDGoQ2EocoELfpHOc7Exmr6eNVZQM0HqJoQdYCb8S2dXgsrRN7U4F4GyBqpzq+cW8eWidtRimWXfZkX3S1F5x3luz0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393943; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eHVxBU6A3l6WehY/7nFa84fD2Mw+v4/XWApzCpErQIo=; b=NXZqNnYsHx9U0lqjQfX5Qqd1YLakOVwmZ/rWuqzcf0JQnvi156qCm9TQPnc2+R1QM6mKm3VifszOBQpiXpcAvVq5imuOszQPEaXu4smPNjVNlMw77cRgWTavEVIfKT1npOo1uEbE4DsOGPdNcyNZjTg4BrAf2CyEbMPzgKy/xB0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393943402201.7730118958449; Wed, 23 Apr 2025 00:39:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7UfY-0003ZN-Vs; Wed, 23 Apr 2025 03:37:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfW-0003Yg-TQ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfU-0003Ki-2s for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:18 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-31-mJ6JU6woNY-0DWUH9KmfAQ-1; Wed, 23 Apr 2025 03:37:11 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1644419560AB; Wed, 23 Apr 2025 07:37:10 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 80B6C19560A3; Wed, 23 Apr 2025 07:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393835; 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=eHVxBU6A3l6WehY/7nFa84fD2Mw+v4/XWApzCpErQIo=; b=ioIEriZGl8mTk1pjG/Dg0zl/L+S23HSfLOoLVt6eHFO/krTCQ8RprW4c7mISmuuMOljcMy s9P9C7DauOfgsvcYM5mTT/WnzZyPUiyQttM7wQzFwKL0E9GavGRg9danSOkocOUq6lq4dx tH8Ud+s3A4w4IIrwfiG57VwjUY1dmjw= X-MC-Unique: mJ6JU6woNY-0DWUH9KmfAQ-1 X-Mimecast-MFC-AGG-ID: mJ6JU6woNY-0DWUH9KmfAQ_1745393830 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson Subject: [PULL 25/29] docs/devel/testing: Dissolve the ci-definitions.rst.inc file Date: Wed, 23 Apr 2025 09:36:05 +0200 Message-ID: <20250423073610.271585-26-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393944129019000 From: Thomas Huth This file was meant for defining the vocabulary for our testing efforts, but it did not age well: First, the definitions are not only about the CI part, but also about testing in general, so most of the information should rather reside in main.rst instead. Second, some vocabulary has never been really adopted by the QEMU project, for example we never really use the word "system testing" since "system" rather means the system emulator binaries in the QEMU project (and we also don't do any testing with other components like libvirt and virt-managers here). It also defines that the qtests are the "functional" tests in QEMU, which is not really up to date anymore after the "tests/functional" framework has been introduced a couple of months ago (FWIW, the qtests could rather be seen as a mix between unit testing and functional testing). To solve this problem, move the useful parts of this file into main.rst and directly into ci.rst, and drop the ones (like "system testing") that we don't really need anymore. Message-ID: <20250314085959.1585568-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing/ci-definitions.rst.inc | 121 ---------------------- docs/devel/testing/ci.rst | 28 ++++- docs/devel/testing/main.rst | 65 ++++++++++-- 3 files changed, 81 insertions(+), 133 deletions(-) delete mode 100644 docs/devel/testing/ci-definitions.rst.inc diff --git a/docs/devel/testing/ci-definitions.rst.inc b/docs/devel/testing= /ci-definitions.rst.inc deleted file mode 100644 index 6d5c6fd9f20..00000000000 --- a/docs/devel/testing/ci-definitions.rst.inc +++ /dev/null @@ -1,121 +0,0 @@ -Definition of terms -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -This section defines the terms used in this document and correlates them w= ith -what is currently used on QEMU. - -Automated tests ---------------- - -An automated test is written on a test framework using its generic test -functions/classes. The test framework can run the tests and report their -success or failure [1]_. - -An automated test has essentially three parts: - -1. The test initialization of the parameters, where the expected parameter= s, - like inputs and expected results, are set up; -2. The call to the code that should be tested; -3. An assertion, comparing the result from the previous call with the expe= cted - result set during the initialization of the parameters. If the result - matches the expected result, the test has been successful; otherwise, i= t has - failed. - -Unit testing ------------- - -A unit test is responsible for exercising individual software components a= s a -unit, like interfaces, data structures, and functionality, uncovering erro= rs -within the boundaries of a component. The verification effort is in the -smallest software unit and focuses on the internal processing logic and da= ta -structures. A test case of unit tests should be designed to uncover errors= due -to erroneous computations, incorrect comparisons, or improper control flow= [2]_. - -On QEMU, unit testing is represented by the 'check-unit' target from 'make= '. - -Functional testing ------------------- - -A functional test focuses on the functional requirement of the software. -Deriving sets of input conditions, the functional tests should fully exerc= ise -all the functional requirements for a program. Functional testing is -complementary to other testing techniques, attempting to find errors like -incorrect or missing functions, interface errors, behavior errors, and -initialization and termination errors [3]_. - -On QEMU, functional testing is represented by the 'check-qtest' target from -'make'. - -System testing --------------- - -System tests ensure all application elements mesh properly while the overa= ll -functionality and performance are achieved [4]_. Some or all system compon= ents -are integrated to create a complete system to be tested as a whole. System -testing ensures that components are compatible, interact correctly, and -transfer the right data at the right time across their interfaces. As syst= em -testing focuses on interactions, use case-based testing is a practical app= roach -to system testing [5]_. Note that, in some cases, system testing may requi= re -interaction with third-party software, like operating system images, datab= ases, -networks, and so on. - -On QEMU, system testing is represented by the 'check-avocado' target from -'make'. - -Flaky tests ------------ - -A flaky test is defined as a test that exhibits both a passing and a faili= ng -result with the same code on different runs. Some usual reasons for an -intermittent/flaky test are async wait, concurrency, and test order depend= ency -[6]_. - -Gating ------- - -A gate restricts the move of code from one stage to another on a -test/deployment pipeline. The step move is granted with approval. The appr= oval -can be a manual intervention or a set of tests succeeding [7]_. - -On QEMU, the gating process happens during the pull request. The approval = is -done by the project leader running its own set of tests. The pull request = gets -merged when the tests succeed. - -Continuous Integration (CI) ---------------------------- - -Continuous integration (CI) requires the builds of the entire application = and -the execution of a comprehensive set of automated tests every time there i= s a -need to commit any set of changes [8]_. The automated tests can be compose= d of -the unit, functional, system, and other tests. - -Keynotes about continuous integration (CI) [9]_: - -1. System tests may depend on external software (operating system images, - firmware, database, network). -2. It may take a long time to build and test. It may be impractical to bui= ld - the system being developed several times per day. -3. If the development platform is different from the target platform, it m= ay - not be possible to run system tests in the developer=E2=80=99s private = workspace. - There may be differences in hardware, operating system, or installed - software. Therefore, more time is required for testing the system. - -References ----------- - -.. [1] Sommerville, Ian (2016). Software Engineering. p. 233. -.. [2] Pressman, Roger S. & Maxim, Bruce R. (2020). Software Engineering, - A Practitioner=E2=80=99s Approach. p. 48, 376, 378, 381. -.. [3] Pressman, Roger S. & Maxim, Bruce R. (2020). Software Engineering, - A Practitioner=E2=80=99s Approach. p. 388. -.. [4] Pressman, Roger S. & Maxim, Bruce R. (2020). Software Engineering, - A Practitioner=E2=80=99s Approach. Software Engineering, p. 377. -.. [5] Sommerville, Ian (2016). Software Engineering. p. 59, 232, 240. -.. [6] Luo, Qingzhou, et al. An empirical analysis of flaky tests. - Proceedings of the 22nd ACM SIGSOFT International Symposium on - Foundations of Software Engineering. 2014. -.. [7] Humble, Jez & Farley, David (2010). Continuous Delivery: - Reliable Software Releases Through Build, Test, and Deployment, p. = 122. -.. [8] Humble, Jez & Farley, David (2010). Continuous Delivery: - Reliable Software Releases Through Build, Test, and Deployment, p. = 55. -.. [9] Sommerville, Ian (2016). Software Engineering. p. 743. diff --git a/docs/devel/testing/ci.rst b/docs/devel/testing/ci.rst index ed88a2010be..e21d39db57a 100644 --- a/docs/devel/testing/ci.rst +++ b/docs/devel/testing/ci.rst @@ -1,14 +1,34 @@ .. _ci: =20 -=3D=3D -CI -=3D=3D +Continuous Integration (CI) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + +Continuous integration (CI) requires the builds of the entire application = and +the execution of a comprehensive set of automated tests every time there i= s a +need to commit any set of changes [1]_. The automated tests are composed +of unit, functional and other tests. =20 Most of QEMU's CI is run on GitLab's infrastructure although a number of other CI services are used for specialised purposes. The most up to date information about them and their status can be found on the `project wiki testing page `_. =20 -.. include:: ci-definitions.rst.inc +These tests are also used as gating tests before merging pull requests. +A gating test restricts the move of code from one stage to another on a +test/deployment pipeline. The step move is granted with approval. The appr= oval +can be a manual intervention or a set of tests succeeding [2]_. + +On QEMU, the gating process happens during the pull request. The approval = is +done by the project leader running its own set of tests. The pull request = gets +merged when the tests succeed. + .. include:: ci-jobs.rst.inc .. include:: ci-runners.rst.inc + +References +---------- + +.. [1] Humble, Jez & Farley, David (2010). Continuous Delivery: + Reliable Software Releases Through Build, Test, and Deployment, p. = 55. +.. [2] Humble, Jez & Farley, David (2010). Continuous Delivery: + Reliable Software Releases Through Build, Test, and Deployment, p. = 122. diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst index 9869bcf0341..e56da22edf6 100644 --- a/docs/devel/testing/main.rst +++ b/docs/devel/testing/main.rst @@ -5,19 +5,32 @@ Testing in QEMU =20 QEMU's testing infrastructure is fairly complex as it covers everything from unit testing and exercising specific sub-systems all -the way to full blown acceptance tests. To get an overview of the +the way to full blown functional tests. To get an overview of the tests you can run ``make check-help`` from either the source or build tree. =20 -Most (but not all) tests are also integrated into the meson build -system so can be run directly from the build tree, for example: - -.. code:: +Most (but not all) tests are also integrated as an automated test into +the meson build system so can be run directly from the build tree, +for example:: =20 [./pyvenv/bin/]meson test --suite qemu:softfloat =20 will run just the softfloat tests. =20 +An automated test is written with one of the test frameworks using its +generic test functions/classes. The test framework can run the tests and +report their success or failure [1]_. + +An automated test has essentially three parts: + +1. The test initialization of the parameters, where the expected parameter= s, + like inputs and expected results, are set up; +2. The call to the code that should be tested; +3. An assertion, comparing the result from the previous call with the expe= cted + result set during the initialization of the parameters. If the result + matches the expected result, the test has been successful; otherwise, i= t has + failed. + The rest of this document will cover the details for specific test groups. =20 @@ -44,9 +57,17 @@ cannot find them. Unit tests ~~~~~~~~~~ =20 -Unit tests, which can be invoked with ``make check-unit``, are simple C te= sts -that typically link to individual QEMU object files and exercise them by -calling exported functions. +A unit test is responsible for exercising individual software components a= s a +unit, like interfaces, data structures, and functionality, uncovering erro= rs +within the boundaries of a component. The verification effort is in the +smallest software unit and focuses on the internal processing logic and da= ta +structures. A test case of unit tests should be designed to uncover errors +due to erroneous computations, incorrect comparisons, or improper control +flow [2]_. + +In QEMU, unit tests can be invoked with ``make check-unit``. They are +simple C tests that typically link to individual QEMU object files and +exercise them by calling exported functions. =20 If you are writing new code in QEMU, consider adding a unit test, especial= ly for utility modules that are relatively stateless or have few dependencies= . To @@ -885,6 +906,10 @@ changing the ``-c`` option. Functional tests using Python ----------------------------- =20 +A functional test focuses on the functional requirement of the software, +attempting to find errors like incorrect functions, interface errors, +behavior errors, and initialization and termination errors [3]_. + The ``tests/functional`` directory hosts functional tests written in Python. You can run the functional tests simply by executing: =20 @@ -1023,3 +1048,27 @@ coverage-html`` which will create Further analysis can be conducted by running the ``gcov`` command directly on the various .gcda output files. Please read the ``gcov`` documentation for more information. + +Flaky tests +----------- + +A flaky test is defined as a test that exhibits both a passing and a faili= ng +result with the same code on different runs. Some usual reasons for an +intermittent/flaky test are async wait, concurrency, and test order depend= ency +[4]_. + +In QEMU, tests that are identified to be flaky are normally disabled by +default. Set the QEMU_TEST_FLAKY_TESTS environment variable before running +the tests to enable them. + +References +---------- + +.. [1] Sommerville, Ian (2016). Software Engineering. p. 233. +.. [2] Pressman, Roger S. & Maxim, Bruce R. (2020). Software Engineering, + A Practitioner=E2=80=99s Approach. p. 48, 376, 378, 381. +.. [3] Pressman, Roger S. & Maxim, Bruce R. (2020). Software Engineering, + A Practitioner=E2=80=99s Approach. p. 388. +.. [4] Luo, Qingzhou, et al. An empirical analysis of flaky tests. + Proceedings of the 22nd ACM SIGSOFT International Symposium on + Foundations of Software Engineering. 2014. --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393984; cv=none; d=zohomail.com; s=zohoarc; b=HbgHb4EGgkg6LGEHGdDWrsbqX40g2FRTqC5p73A4LukigdH0L+SFRgn9XDzDgUUgujiVC5FOnrZZhEsN+q5iCEw4F663YHCOCX/8mXRJ6E1eG9fM0FreRbDzhvxY9VrI7e4uyNf/w1g1ETwd2bnMXnT5SDax6G5vXWT9/5WI81Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393984; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=HQbxLGOYtVJdeFDrFKxKfqEJIzcFcGaFPDtdJi0YSEo=; b=kBL6cXm+qtmZhZMnTkMILp3kkSukQOPrN2Go3pnddx/oGmG6bsXPyW+tBRMWJdDBabIxQ5OeuPYMCoeYyW8+0WUmNrfSPeI5K2zMDQQqpi2wXE/VeMFtB7l+WnXe4Ajyco0n5asmXq1sVg88Xos95WzjQUAuYi/u7l+uH1iYLMY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393984515508.6036642277013; Wed, 23 Apr 2025 00:39:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Ufe-0003q9-Ag; Wed, 23 Apr 2025 03:37:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ufb-0003gM-VZ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfW-0003L2-NX for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:23 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-270-G_H6DhszMYyojeUjoNTceg-1; Wed, 23 Apr 2025 03:37:13 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 859121956094; Wed, 23 Apr 2025 07:37:12 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7ECD219560A3; Wed, 23 Apr 2025 07:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393837; 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=HQbxLGOYtVJdeFDrFKxKfqEJIzcFcGaFPDtdJi0YSEo=; b=f5pZlndVCROB6fxGfmzEwNOpIDjg8Yl11csM+o12beIn3Uol/IdqkhTQL3gwDMcuCbDii8 9P65ZecTBZXIPTt+Em0qTz26YNQZX6fY1StoXHweHz/4J7PLxf0+1L2mrjx0mjbtsvTA9a j6A/Dw4fNZN7solgAeIy86GFkQFhjBg= X-MC-Unique: G_H6DhszMYyojeUjoNTceg-1 X-Mimecast-MFC-AGG-ID: G_H6DhszMYyojeUjoNTceg_1745393832 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 26/29] Remove the remainders of the Avocado tests Date: Wed, 23 Apr 2025 09:36:06 +0200 Message-ID: <20250423073610.271585-27-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, WEIRD_QUOTING=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393986294019000 From: Thomas Huth Now that all Avocado tests have been converted to or been replaced by other functional tests, we can delete the remainders of the Avocado tests from the QEMU source tree. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Message-ID: <20250414113031.151105-16-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 8 +- docs/about/build-platforms.rst | 10 +- docs/devel/build-system.rst | 11 +- docs/devel/codebase.rst | 5 - docs/devel/testing/avocado.rst | 581 ------------------------ docs/devel/testing/functional.rst | 3 - docs/devel/testing/index.rst | 1 - docs/devel/testing/main.rst | 15 - tests/avocado/README.rst | 10 - configure | 2 +- pythondeps.toml | 8 +- tests/Makefile.include | 60 +-- tests/avocado/avocado_qemu/__init__.py | 424 ----------------- tests/avocado/avocado_qemu/linuxtest.py | 253 ----------- 14 files changed, 16 insertions(+), 1375 deletions(-) delete mode 100644 docs/devel/testing/avocado.rst delete mode 100644 tests/avocado/README.rst delete mode 100644 tests/avocado/avocado_qemu/__init__.py delete mode 100644 tests/avocado/avocado_qemu/linuxtest.py diff --git a/MAINTAINERS b/MAINTAINERS index 07f77c048e2..5fd757c5ddb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2073,7 +2073,7 @@ S: Supported F: hw/acpi/viot.c F: hw/acpi/viot.h =20 -ACPI/AVOCADO/BIOSBITS +ACPI/FUNCTIONAL/BIOSBITS M: Ani Sinha M: Michael S. Tsirkin S: Supported @@ -4246,12 +4246,6 @@ R: Philippe Mathieu-Daud=C3=A9 S: Maintained F: tests/tcg/Makefile.target =20 -Integration Testing with the Avocado framework -W: https://trello.com/b/6Qi1pxVn/avocado-qemu -R: Cleber Rosa -S: Odd Fixes -F: tests/avocado/ - GitLab custom runner (Works On Arm Sponsored) M: Alex Benn=C3=A9e M: Philippe Mathieu-Daud=C3=A9 diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst index 1552b1a7044..52521552c8a 100644 --- a/docs/about/build-platforms.rst +++ b/docs/about/build-platforms.rst @@ -123,11 +123,11 @@ Rust build dependencies to build QEMU. =20 Optional build dependencies - Build components whose absence does not affect the ability to build - QEMU may not be available in distros, or may be too old for QEMU's - requirements. Many of these, such as the Avocado testing framework - or various linters, are written in Python and therefore can also - be installed using ``pip``. Cross compilers are another example + Build components whose absence does not affect the ability to build QEMU + may not be available in distros, or may be too old for our requirements. + Many of these, such as additional modules for the functional testing + framework or various linters, are written in Python and therefore can + also be installed using ``pip``. Cross compilers are another example of optional build-time dependency; in this case it is possible to download them from repositories such as EPEL, to use container-based cross compilation using ``docker`` or ``podman``, or to use pre-built diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index a759982f45c..258cfad3fe7 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -134,7 +134,7 @@ in how the build process runs Python code. =20 At this stage, ``configure`` also queries the chosen Python interpreter about QEMU's build dependencies. Note that the build process does *not* -look for ``meson``, ``sphinx-build`` or ``avocado`` binaries in the PATH; +look for ``meson`` or ``sphinx-build`` binaries in the PATH; likewise, there are no options such as ``--meson`` or ``--sphinx-build``. This avoids a potential mismatch, where Meson and Sphinx binaries on the PATH might operate in a different Python environment than the one chosen @@ -151,7 +151,7 @@ virtual environment with ``pip``, either from wheels in= ``python/wheels`` or by downloading the package with PyPI. Downloading can be disabled with ``--disable-download``; and anyway, it only happens when a ``configure`` option (currently, only ``--enable-docs``) is explicitly enabled but -the dependencies are not present\ [#pip]_. +the dependencies are not present. =20 .. [#distlib] The scripts are created based on the package's metadata, specifically the ``console_script`` entry points. This is t= he @@ -164,10 +164,6 @@ the dependencies are not present\ [#pip]_. because the Python Packaging Authority provides a package ``distlib.scripts`` to perform this task. =20 -.. [#pip] ``pip`` might also be used when running ``make check-avocado`` - if downloading is enabled, to ensure that Avocado is - available. - The required versions of the packages are stored in a configuration file ``pythondeps.toml``. The format is custom to QEMU, but it is documented at the top of the file itself and it should be easy to understand. The @@ -497,8 +493,7 @@ number of dynamically created files listed later. ``pyvenv/bin``, and calling ``pip`` to install dependencies. =20 ``tests/Makefile.include`` - Rules for external test harnesses. These include the TCG tests - and the Avocado-based integration tests. + Rules for external test harnesses like the TCG tests. =20 ``tests/docker/Makefile.include`` Rules for Docker tests. Like ``tests/Makefile.include``, this file is diff --git a/docs/devel/codebase.rst b/docs/devel/codebase.rst index ef98578296c..40273e7d31e 100644 --- a/docs/devel/codebase.rst +++ b/docs/devel/codebase.rst @@ -175,11 +175,6 @@ yet, so sometimes the source code is all you have. * `tests `_: QEMU `test ` suite =20 - - `avocado `_: - Functional tests booting full VM using `Avocado framework `. - Those tests will be transformed and moved into - `tests/functional `_ - in the future. - `data `= _: Data for various tests. - `decode `_: diff --git a/docs/devel/testing/avocado.rst b/docs/devel/testing/avocado.rst deleted file mode 100644 index eda76fe2dbd..00000000000 --- a/docs/devel/testing/avocado.rst +++ /dev/null @@ -1,581 +0,0 @@ -.. _checkavocado-ref: - - -Integration testing with Avocado -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D - -The ``tests/avocado`` directory hosts integration tests. They're usually -higher level tests, and may interact with external resources and with -various guest operating systems. - -These tests are written using the Avocado Testing Framework (which must be -installed separately) in conjunction with a the ``avocado_qemu.QemuSystemT= est`` -class, implemented at ``tests/avocado/avocado_qemu``. - -Tests based on ``avocado_qemu.QemuSystemTest`` can easily: - - * Customize the command line arguments given to the convenience - ``self.vm`` attribute (a QEMUMachine instance) - - * Interact with the QEMU monitor, send QMP commands and check - their results - - * Interact with the guest OS, using the convenience console device - (which may be useful to assert the effectiveness and correctness of - command line arguments or QMP commands) - - * Interact with external data files that accompany the test itself - (see ``self.get_data()``) - - * Download (and cache) remote data files, such as firmware and kernel - images - - * Have access to a library of guest OS images (by means of the - ``avocado.utils.vmimage`` library) - - * Make use of various other test related utilities available at the - test class itself and at the utility library: - - - http://avocado-framework.readthedocs.io/en/latest/api/test/avocado.ht= ml#avocado.Test - - http://avocado-framework.readthedocs.io/en/latest/api/utils/avocado.u= tils.html - -Running tests -------------- - -You can run the avocado tests simply by executing: - -.. code:: - - make check-avocado - -This involves the automatic installation, from PyPI, of all the -necessary avocado-framework dependencies into the QEMU venv within the -build tree (at ``./pyvenv``). Test results are also saved within the -build tree (at ``tests/results``). - -Note: the build environment must be using a Python 3 stack, and have -the ``venv`` and ``pip`` packages installed. If necessary, make sure -``configure`` is called with ``--python=3D`` and that those modules are -available. On Debian and Ubuntu based systems, depending on the -specific version, they may be on packages named ``python3-venv`` and -``python3-pip``. - -It is also possible to run tests based on tags using the -``make check-avocado`` command and the ``AVOCADO_TAGS`` environment -variable: - -.. code:: - - make check-avocado AVOCADO_TAGS=3Dquick - -Note that tags separated with commas have an AND behavior, while tags -separated by spaces have an OR behavior. For more information on Avocado -tags, see: - - https://avocado-framework.readthedocs.io/en/latest/guides/user/chapters/t= ags.html - -To run a single test file, a couple of them, or a test within a file -using the ``make check-avocado`` command, set the ``AVOCADO_TESTS`` -environment variable with the test files or test names. To run all -tests from a single file, use: - - .. code:: - - make check-avocado AVOCADO_TESTS=3D$FILEPATH - -The same is valid to run tests from multiple test files: - - .. code:: - - make check-avocado AVOCADO_TESTS=3D'$FILEPATH1 $FILEPATH2' - -To run a single test within a file, use: - - .. code:: - - make check-avocado AVOCADO_TESTS=3D$FILEPATH:$TESTCLASS.$TESTNAME - -The same is valid to run single tests from multiple test files: - - .. code:: - - make check-avocado AVOCADO_TESTS=3D'$FILEPATH1:$TESTCLASS1.$TESTNAME1 $F= ILEPATH2:$TESTCLASS2.$TESTNAME2' - -The scripts installed inside the virtual environment may be used -without an "activation". For instance, the Avocado test runner -may be invoked by running: - - .. code:: - - pyvenv/bin/avocado run $OPTION1 $OPTION2 tests/avocado/ - -Note that if ``make check-avocado`` was not executed before, it is -possible to create the Python virtual environment with the dependencies -needed running: - - .. code:: - - make check-venv - -It is also possible to run tests from a single file or a single test within -a test file. To run tests from a single file within the build tree, use: - - .. code:: - - pyvenv/bin/avocado run tests/avocado/$TESTFILE - -To run a single test within a test file, use: - - .. code:: - - pyvenv/bin/avocado run tests/avocado/$TESTFILE:$TESTCLASS.$TESTNAME - -Valid test names are visible in the output from any previous execution -of Avocado or ``make check-avocado``, and can also be queried using: - - .. code:: - - pyvenv/bin/avocado list tests/avocado - -Manual Installation -------------------- - -To manually install Avocado and its dependencies, run: - -.. code:: - - pip install --user avocado-framework - -Alternatively, follow the instructions on this link: - - https://avocado-framework.readthedocs.io/en/latest/guides/user/chapters/= installing.html - -Overview --------- - -The ``tests/avocado/avocado_qemu`` directory provides the -``avocado_qemu`` Python module, containing the ``avocado_qemu.QemuSystemTe= st`` -class. Here's a simple usage example: - -.. code:: - - from avocado_qemu import QemuSystemTest - - - class Version(QemuSystemTest): - """ - :avocado: tags=3Dquick - """ - def test_qmp_human_info_version(self): - self.vm.launch() - res =3D self.vm.cmd('human-monitor-command', - command_line=3D'info version') - self.assertRegex(res, r'^(\d+\.\d+\.\d)') - -To execute your test, run: - -.. code:: - - avocado run version.py - -Tests may be classified according to a convention by using docstring -directives such as ``:avocado: tags=3DTAG1,TAG2``. To run all tests -in the current directory, tagged as "quick", run: - -.. code:: - - avocado run -t quick . - -The ``avocado_qemu.QemuSystemTest`` base test class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``avocado_qemu.QemuSystemTest`` class has a number of characteristics -that are worth being mentioned right away. - -First of all, it attempts to give each test a ready to use QEMUMachine -instance, available at ``self.vm``. Because many tests will tweak the -QEMU command line, launching the QEMUMachine (by using ``self.vm.launch()`= `) -is left to the test writer. - -The base test class has also support for tests with more than one -QEMUMachine. The way to get machines is through the ``self.get_vm()`` -method which will return a QEMUMachine instance. The ``self.get_vm()`` -method accepts arguments that will be passed to the QEMUMachine creation -and also an optional ``name`` attribute so you can identify a specific -machine and get it more than once through the tests methods. A simple -and hypothetical example follows: - -.. code:: - - from avocado_qemu import QemuSystemTest - - - class MultipleMachines(QemuSystemTest): - def test_multiple_machines(self): - first_machine =3D self.get_vm() - second_machine =3D self.get_vm() - self.get_vm(name=3D'third_machine').launch() - - first_machine.launch() - second_machine.launch() - - first_res =3D first_machine.cmd( - 'human-monitor-command', - command_line=3D'info version') - - second_res =3D second_machine.cmd( - 'human-monitor-command', - command_line=3D'info version') - - third_res =3D self.get_vm(name=3D'third_machine').cmd( - 'human-monitor-command', - command_line=3D'info version') - - self.assertEqual(first_res, second_res, third_res) - -At test "tear down", ``avocado_qemu.QemuSystemTest`` handles all the -QEMUMachines shutdown. - -The ``avocado_qemu.LinuxTest`` base test class -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``avocado_qemu.LinuxTest`` is further specialization of the -``avocado_qemu.QemuSystemTest`` class, so it contains all the characterist= ics -of the later plus some extra features. - -First of all, this base class is intended for tests that need to -interact with a fully booted and operational Linux guest. At this -time, it uses a Fedora 31 guest image. The most basic example looks -like this: - -.. code:: - - from avocado_qemu import LinuxTest - - - class SomeTest(LinuxTest): - - def test(self): - self.launch_and_wait() - self.ssh_command('some_command_to_be_run_in_the_guest') - -Please refer to tests that use ``avocado_qemu.LinuxTest`` under -``tests/avocado`` for more examples. - -QEMUMachine ------------ - -The QEMUMachine API is already widely used in the Python iotests, -device-crash-test and other Python scripts. It's a wrapper around the -execution of a QEMU binary, giving its users: - - * the ability to set command line arguments to be given to the QEMU - binary - - * a ready to use QMP connection and interface, which can be used to - send commands and inspect its results, as well as asynchronous - events - - * convenience methods to set commonly used command line arguments in - a more succinct and intuitive way - -QEMU binary selection -^^^^^^^^^^^^^^^^^^^^^ - -The QEMU binary used for the ``self.vm`` QEMUMachine instance will -primarily depend on the value of the ``qemu_bin`` parameter. If it's -not explicitly set, its default value will be the result of a dynamic -probe in the same source tree. A suitable binary will be one that -targets the architecture matching host machine. - -Based on this description, test writers will usually rely on one of -the following approaches: - -1) Set ``qemu_bin``, and use the given binary - -2) Do not set ``qemu_bin``, and use a QEMU binary named like - "qemu-system-${arch}", either in the current - working directory, or in the current source tree. - -The resulting ``qemu_bin`` value will be preserved in the -``avocado_qemu.QemuSystemTest`` as an attribute with the same name. - -Attribute reference -------------------- - -Test -^^^^ - -Besides the attributes and methods that are part of the base -``avocado.Test`` class, the following attributes are available on any -``avocado_qemu.QemuSystemTest`` instance. - -vm -"" - -A QEMUMachine instance, initially configured according to the given -``qemu_bin`` parameter. - -arch -"""" - -The architecture can be used on different levels of the stack, e.g. by -the framework or by the test itself. At the framework level, it will -currently influence the selection of a QEMU binary (when one is not -explicitly given). - -Tests are also free to use this attribute value, for their own needs. -A test may, for instance, use the same value when selecting the -architecture of a kernel or disk image to boot a VM with. - -The ``arch`` 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=3Darch:VALUE`` tag, it will be set to ``VALUE``. - -cpu -""" - -The cpu model that will be set to all QEMUMachine instances created -by the test. - -The ``cpu`` 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=3Dcpu:VALUE`` tag, it will be set to ``VALUE``. - -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 -"""""""" - -The preserved value of the ``qemu_bin`` parameter or the result of the -dynamic probe for a QEMU binary in the current working directory or -source tree. - -LinuxTest -^^^^^^^^^ - -Besides the attributes present on the ``avocado_qemu.QemuSystemTest`` base -class, the ``avocado_qemu.LinuxTest`` adds the following attributes: - -distro -"""""" - -The name of the Linux distribution used as the guest image for the -test. The name should match the **Provider** column on the list -of images supported by the avocado.utils.vmimage library: - -https://avocado-framework.readthedocs.io/en/latest/guides/writer/libs/vmim= age.html#supported-images - -distro_version -"""""""""""""" - -The version of the Linux distribution as the guest image for the -test. The name should match the **Version** column on the list -of images supported by the avocado.utils.vmimage library: - -https://avocado-framework.readthedocs.io/en/latest/guides/writer/libs/vmim= age.html#supported-images - -distro_checksum -""""""""""""""" - -The sha256 hash of the guest image file used for the test. - -If this value is not set in the code or by a test parameter (with the -same name), no validation on the integrity of the image will be -performed. - -Parameter reference -------------------- - -To understand how Avocado parameters are accessed by tests, and how -they can be passed to tests, please refer to:: - - https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapter= s/writing.html#accessing-test-parameters - -Parameter values can be easily seen in the log files, and will look -like the following: - -.. code:: - - PARAMS (key=3Dqemu_bin, path=3D*, default=3D./qemu-system-x86_64) =3D> '= ./qemu-system-x86_64 - -Test -^^^^ - -arch -"""" - -The architecture that will influence the selection of a QEMU binary -(when one is not explicitly given). - -Tests are also free to use this parameter value, for their own needs. -A test may, for instance, use the same value when selecting the -architecture of a kernel or disk image to boot a VM with. - -This parameter has a direct relation with the ``arch`` attribute. If -not given, it will default to None. - -cpu -""" - -The cpu model that will be set to all QEMUMachine instances created -by the test. - -machine -""""""" - -The machine type that will be set to all QEMUMachine instances created -by the test. - -qemu_bin -"""""""" - -The exact QEMU binary to be used on QEMUMachine. - -LinuxTest -^^^^^^^^^ - -Besides the parameters present on the ``avocado_qemu.QemuSystemTest`` base -class, the ``avocado_qemu.LinuxTest`` adds the following parameters: - -distro -"""""" - -The name of the Linux distribution used as the guest image for the -test. The name should match the **Provider** column on the list -of images supported by the avocado.utils.vmimage library: - -https://avocado-framework.readthedocs.io/en/latest/guides/writer/libs/vmim= age.html#supported-images - -distro_version -"""""""""""""" - -The version of the Linux distribution as the guest image for the -test. The name should match the **Version** column on the list -of images supported by the avocado.utils.vmimage library: - -https://avocado-framework.readthedocs.io/en/latest/guides/writer/libs/vmim= age.html#supported-images - -distro_checksum -""""""""""""""" - -The sha256 hash of the guest image file used for the test. - -If this value is not set in the code or by this parameter no -validation on the integrity of the image will be performed. - -Skipping tests --------------- - -The Avocado framework provides Python decorators which allow for easily sk= ip -tests running under certain conditions. For example, on the lack of a bina= ry -on the test system or when the running environment is a CI system. For fur= ther -information about those decorators, please refer to:: - - https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapter= s/writing.html#skipping-tests - -While the conditions for skipping tests are often specifics of each one, t= here -are recurring scenarios identified by the QEMU developers and the use of -environment variables became a kind of standard way to enable/disable test= s. - -Here is a list of the most used variables: - -AVOCADO_ALLOW_LARGE_STORAGE -^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Tests which are going to fetch or produce assets considered *large* are not -going to run unless that ``AVOCADO_ALLOW_LARGE_STORAGE=3D1`` is exported on -the environment. - -The definition of *large* is a bit arbitrary here, but it usually means an -asset which occupies at least 1GB of size on disk when uncompressed. - -SPEED -^^^^^ -Tests which have a long runtime will not be run unless ``SPEED=3Dslow`` is -exported on the environment. - -The definition of *long* is a bit arbitrary here, and it depends on the -usefulness of the test too. A unique test is worth spending more time on, -small variations on existing tests perhaps less so. As a rough guide, -a test or set of similar tests which take more than 100 seconds to -complete. - -AVOCADO_ALLOW_UNTRUSTED_CODE -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -There are tests which will boot a kernel image or firmware that can be -considered not safe to run on the developer's workstation, thus they are -skipped by default. The definition of *not safe* is also arbitrary but -usually it means a blob which either its source or build process aren't -public available. - -You should export ``AVOCADO_ALLOW_UNTRUSTED_CODE=3D1`` on the environment = in -order to allow tests which make use of those kind of assets. - -AVOCADO_TIMEOUT_EXPECTED -^^^^^^^^^^^^^^^^^^^^^^^^ -The Avocado framework has a timeout mechanism which interrupts tests to av= oid the -test suite of getting stuck. The timeout value can be set via test paramet= er or -property defined in the test class, for further details:: - - https://avocado-framework.readthedocs.io/en/latest/guides/writer/chapter= s/writing.html#setting-a-test-timeout - -Even though the timeout can be set by the test developer, there are some t= ests -that may not have a well-defined limit of time to finish under certain -conditions. For example, tests that take longer to execute when QEMU is -compiled with debug flags. Therefore, the ``AVOCADO_TIMEOUT_EXPECTED`` var= iable -has been used to determine whether those tests should run or not. - -QEMU_TEST_FLAKY_TESTS -^^^^^^^^^^^^^^^^^^^^^ -Some tests are not working reliably and thus are disabled by default. -This includes tests that don't run reliably on GitLab's CI which -usually expose real issues that are rarely seen on developer machines -due to the constraints of the CI environment. If you encounter a -similar situation then raise a bug and then mark the test as shown on -the code snippet below: - -.. code:: - - # See https://gitlab.com/qemu-project/qemu/-/issues/nnnn - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on Git= Lab') - def test(self): - do_something() - -You can also add ``:avocado: tags=3Dflaky`` to the test meta-data so -only the flaky tests can be run as a group: - -.. code:: - - env QEMU_TEST_FLAKY_TESTS=3D1 ./pyvenv/bin/avocado \ - run tests/avocado -filter-by-tags=3Dflaky - -Tests should not live in this state forever and should either be fixed -or eventually removed. - - -Uninstalling Avocado --------------------- - -If you've followed the manual installation instructions above, you can -easily uninstall Avocado. Start by listing the packages you have -installed:: - - pip list --user - -And remove any package you want with:: - - pip uninstall - -If you've used ``make check-avocado``, the Python virtual environment where -Avocado is installed will be cleaned up as part of ``make check-clean``. diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functio= nal.rst index 9bc973392aa..8030cb4299f 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -6,9 +6,6 @@ Functional testing with Python The ``tests/functional`` directory hosts functional tests written in Python. They are usually higher level tests, and may interact with external resources and with various guest operating systems. -The functional tests have initially evolved from the Avocado tests, so the= re -is a lot of similarity to those tests here (see :ref:`checkavocado-ref` for -details about the Avocado tests). =20 The tests should be written in the style of the Python `unittest`_ framewo= rk, using stdio for the TAP protocol. The folder ``tests/functional/qemu_test`` diff --git a/docs/devel/testing/index.rst b/docs/devel/testing/index.rst index 1171f7db8f0..ccc2fc6cbc1 100644 --- a/docs/devel/testing/index.rst +++ b/docs/devel/testing/index.rst @@ -10,7 +10,6 @@ testing infrastructure. main qtest functional - avocado acpi-bits ci fuzzing diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst index e56da22edf6..6b18ed875cd 100644 --- a/docs/devel/testing/main.rst +++ b/docs/devel/testing/main.rst @@ -919,21 +919,6 @@ Python. You can run the functional tests simply by exe= cuting: =20 See :ref:`checkfunctional-ref` for more details. =20 -Integration tests using the Avocado Framework ---------------------------------------------- - -The ``tests/avocado`` directory hosts integration tests. They're usually -higher level tests, and may interact with external resources and with -various guest operating systems. - -You can run the avocado tests simply by executing: - -.. code:: - - make check-avocado - -See :ref:`checkavocado-ref` for more details. - .. _checktcg-ref: =20 Testing with "make check-tcg" diff --git a/tests/avocado/README.rst b/tests/avocado/README.rst deleted file mode 100644 index 94488371bbe..00000000000 --- a/tests/avocado/README.rst +++ /dev/null @@ -1,10 +0,0 @@ -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -Integration tests using the Avocado Framework -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -This directory contains integration tests. They're usually higher -level, and may interact with external resources and with various -guest operating systems. - -For more information, please refer to ``docs/devel/testing.rst``, -section "Integration tests using the Avocado Framework". diff --git a/configure b/configure index 02f1dd2311f..000309cf610 100755 --- a/configure +++ b/configure @@ -1685,7 +1685,7 @@ LINKS=3D"$LINKS pc-bios/optionrom/Makefile" LINKS=3D"$LINKS pc-bios/s390-ccw/Makefile" LINKS=3D"$LINKS pc-bios/vof/Makefile" LINKS=3D"$LINKS .gdbinit scripts" # scripts needed by relative path in .gd= binit -LINKS=3D"$LINKS tests/avocado tests/data" +LINKS=3D"$LINKS tests/data" LINKS=3D"$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile" LINKS=3D"$LINKS python" for f in $LINKS ; do diff --git a/pythondeps.toml b/pythondeps.toml index c03c9df81b5..7eaaa0fed10 100644 --- a/pythondeps.toml +++ b/pythondeps.toml @@ -27,9 +27,5 @@ pycotap =3D { accepted =3D ">=3D1.1.0", installed =3D "1.= 3.1" } sphinx =3D { accepted =3D ">=3D3.4.3", installed =3D "5.3.0", canary =3D "= sphinx-build" } sphinx_rtd_theme =3D { accepted =3D ">=3D0.5", installed =3D "1.1.1" } =20 -[avocado] -# Note that qemu.git/python/ is always implicitly installed. -# Prefer an LTS version when updating the accepted versions of -# avocado-framework, for example right now the limit is 92.x. -avocado-framework =3D { accepted =3D "(>=3D103.0, <104.0)", installed =3D = "103.0", canary =3D "avocado" } -pycdlib =3D { accepted =3D ">=3D1.11.0" } +[testdeps] +qemu.qmp =3D { accepted =3D ">=3D0.0.3", installed =3D "0.0.3" } diff --git a/tests/Makefile.include b/tests/Makefile.include index 010369bd3ac..23fb722d426 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -18,7 +18,6 @@ ifneq ($(filter $(all-check-targets), check-softfloat),) @echo " $(MAKE) check-tcg Run TCG tests" @echo " $(MAKE) check-softfloat Run FPU emulation tests" endif - @echo " $(MAKE) check-avocado Run avocado (integration) tests = for currently configured targets" @echo @echo " $(MAKE) check-report.junit.xml Generates an aggregated XML test= report" @echo " $(MAKE) check-venv Creates a Python venv for tests" @@ -26,7 +25,6 @@ endif @echo @echo "The following are useful for CI builds" @echo " $(MAKE) check-build Build most test binaries" - @echo " $(MAKE) get-vm-images Downloads all images used by avo= cado tests, according to configured targets (~350 MB each, 1.5 GB max)" @echo @echo @echo "The variable SPEED can be set to control the gtester speed setting= ." @@ -86,26 +84,12 @@ distclean-tcg: $(DISTCLEAN_TCG_TARGET_RULES) =20 # Python venv for running tests =20 -.PHONY: check-venv check-avocado check-acceptance check-acceptance-depreca= ted-warning +.PHONY: check-venv =20 # Build up our target list from the filtered list of ninja targets TARGETS=3D$(patsubst libqemu-%.a, %, $(filter libqemu-%.a, $(ninja-targets= ))) =20 TESTS_VENV_TOKEN=3D$(BUILD_DIR)/pyvenv/tests.group -TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results -ifndef AVOCADO_TESTS - AVOCADO_TESTS=3Dtests/avocado -endif -# Controls the output generated by Avocado when running tests. -# Any number of command separated loggers are accepted. For more -# information please refer to "avocado --help". -AVOCADO_SHOW?=3Dapp -ifndef AVOCADO_TAGS - AVOCADO_CMDLINE_TAGS=3D$(patsubst %-softmmu,-t arch:%, \ - $(filter %-softmmu,$(TARGETS))) -else - AVOCADO_CMDLINE_TAGS=3D$(addprefix -t , $(AVOCADO_TAGS)) -endif =20 quiet-venv-pip =3D $(quiet-@)$(call quiet-command-run, \ $(PYTHON) -m pip -q --disable-pip-version-check $1, \ @@ -113,47 +97,11 @@ quiet-venv-pip =3D $(quiet-@)$(call quiet-command-run,= \ =20 $(TESTS_VENV_TOKEN): $(SRC_PATH)/pythondeps.toml $(call quiet-venv-pip,install -e "$(SRC_PATH)/python/") - $(MKVENV_ENSUREGROUP) $< avocado + $(MKVENV_ENSUREGROUP) $< testdeps $(call quiet-command, touch $@) =20 -$(TESTS_RESULTS_DIR): - $(call quiet-command, mkdir -p $@, \ - MKDIR, $@) - check-venv: $(TESTS_VENV_TOKEN) =20 -FEDORA_31_ARCHES_TARGETS=3D$(patsubst %-softmmu,%, $(filter %-softmmu,$(TA= RGETS))) -FEDORA_31_ARCHES_CANDIDATES=3D$(patsubst ppc64,ppc64le,$(FEDORA_31_ARCHES_= TARGETS)) -FEDORA_31_ARCHES :=3D x86_64 aarch64 ppc64le s390x -FEDORA_31_DOWNLOAD=3D$(filter $(FEDORA_31_ARCHES),$(FEDORA_31_ARCHES_CANDI= DATES)) - -# download one specific Fedora 31 image -get-vm-image-fedora-31-%: check-venv - $(call quiet-command, \ - $(PYTHON) -m avocado vmimage get \ - --distro=3Dfedora --distro-version=3D31 --arch=3D$*, \ - "AVOCADO", "Downloading avocado tests VM image for $*") - -# download all vm images, according to defined targets -get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_= 31_DOWNLOAD)) - -check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images - $(call quiet-command, \ - $(PYTHON) -m avocado \ - --show=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_DIR) \ - $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ - --filter-by-tags-include-empty-key) \ - $(AVOCADO_CMDLINE_TAGS) --max-parallel-tasks=3D1 \ - $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ - "AVOCADO", "tests/avocado") - -check-acceptance-deprecated-warning: - @echo - @echo "Note '$(MAKE) check-acceptance' is deprecated, use '$(MAKE) check-= avocado' instead." - @echo - -check-acceptance: check-acceptance-deprecated-warning | check-avocado - FUNCTIONAL_TARGETS=3D$(patsubst %-softmmu,check-functional-%, $(filter %-s= oftmmu,$(TARGETS))) .PHONY: $(FUNCTIONAL_TARGETS) $(FUNCTIONAL_TARGETS): @@ -166,13 +114,13 @@ check-functional: =20 # Consolidated targets =20 -.PHONY: check check-clean get-vm-images +.PHONY: check check-clean check: =20 check-build: run-ninja =20 check-clean: - rm -rf $(TESTS_RESULTS_DIR) + rm -rf $(BUILD_DIR)/tests/functional =20 clean: check-clean clean-tcg distclean: distclean-tcg diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py deleted file mode 100644 index 93c34602428..00000000000 --- a/tests/avocado/avocado_qemu/__init__.py +++ /dev/null @@ -1,424 +0,0 @@ -# Test class and utilities for functional tests -# -# Copyright (c) 2018 Red Hat, Inc. -# -# Author: -# Cleber Rosa -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -import logging -import os -import subprocess -import sys -import tempfile -import time -import uuid - -import avocado -from avocado.utils import ssh -from avocado.utils.path import find_command - -from qemu.machine import QEMUMachine -from qemu.utils import (get_info_usernet_hostfwd_port, kvm_available, - tcg_available) - - -#: The QEMU build root directory. It may also be the source directory -#: if building from the source dir, but it's safer to use BUILD_DIR for -#: that purpose. Be aware that if this code is moved outside of a source -#: and build tree, it will not be accurate. -BUILD_DIR =3D os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirn= ame(__file__)))) - - -def has_cmd(name, args=3DNone): - """ - This function is for use in a @avocado.skipUnless decorator, e.g.: - - @skipUnless(*has_cmd('sudo -n', ('sudo', '-n', 'true'))) - def test_something_that_needs_sudo(self): - ... - """ - - if args is None: - args =3D ('which', name) - - try: - _, stderr, exitcode =3D run_cmd(args) - except Exception as e: - exitcode =3D -1 - stderr =3D str(e) - - if exitcode !=3D 0: - cmd_line =3D ' '.join(args) - err =3D f'{name} required, but "{cmd_line}" failed: {stderr.strip(= )}' - return (False, err) - else: - return (True, '') - -def has_cmds(*cmds): - """ - This function is for use in a @avocado.skipUnless decorator and - allows checking for the availability of multiple commands, e.g.: - - @skipUnless(*has_cmds(('cmd1', ('cmd1', '--some-parameter')), - 'cmd2', 'cmd3')) - def test_something_that_needs_cmd1_and_cmd2(self): - ... - """ - - for cmd in cmds: - if isinstance(cmd, str): - cmd =3D (cmd,) - - ok, errstr =3D has_cmd(*cmd) - if not ok: - return (False, errstr) - - return (True, '') - -def run_cmd(args): - subp =3D subprocess.Popen(args, - stdout=3Dsubprocess.PIPE, - stderr=3Dsubprocess.PIPE, - universal_newlines=3DTrue) - stdout, stderr =3D subp.communicate() - ret =3D subp.returncode - - return (stdout, stderr, ret) - -def is_readable_executable_file(path): - return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) - - -def pick_default_qemu_bin(bin_prefix=3D'qemu-system-', arch=3DNone): - """ - Picks the path of a QEMU binary, starting either in the current working - directory or in the source tree root directory. - - :param arch: the arch to use when looking for a QEMU binary (the target - will match the arch given). If None (the default), arch - will be the current host system arch (as given by - :func:`os.uname`). - :type arch: str - :returns: the path to the default QEMU binary or None if one could not - be found - :rtype: str or None - """ - if arch is None: - arch =3D os.uname()[4] - # qemu binary path does not match arch for powerpc, handle it - if 'ppc64le' in arch: - arch =3D 'ppc64' - qemu_bin_name =3D bin_prefix + arch - qemu_bin_paths =3D [ - os.path.join(".", qemu_bin_name), - os.path.join(BUILD_DIR, qemu_bin_name), - os.path.join(BUILD_DIR, "build", qemu_bin_name), - ] - for path in qemu_bin_paths: - if is_readable_executable_file(path): - return path - return None - - -def _console_interaction(test, success_message, failure_message, - send_string, keep_sending=3DFalse, vm=3DNone): - assert not keep_sending or send_string - if vm is None: - vm =3D test.vm - console =3D vm.console_file - console_logger =3D logging.getLogger('console') - while True: - if send_string: - vm.console_socket.sendall(send_string.encode()) - if not keep_sending: - send_string =3D None # send only once - - # Only consume console output if waiting for something - if success_message is None and failure_message is None: - if send_string is None: - break - continue - - try: - msg =3D console.readline().decode().strip() - except UnicodeDecodeError: - msg =3D None - if not msg: - continue - console_logger.debug(msg) - if success_message is None or success_message in msg: - break - if failure_message and failure_message in msg: - console.close() - fail =3D 'Failure message found in console: "%s". Expected: "%= s"' % \ - (failure_message, success_message) - test.fail(fail) - -def interrupt_interactive_console_until_pattern(test, success_message, - failure_message=3DNone, - interrupt_string=3D'\r'): - """ - Keep sending a string to interrupt a console prompt, while logging the - console output. Typical use case is to break a boot loader prompt, suc= h: - - Press a key within 5 seconds to interrupt boot process. - 5 - 4 - 3 - 2 - 1 - Booting default image... - - :param test: an Avocado test containing a VM that will have its console - read and probed for a success or failure message - :type test: :class:`avocado_qemu.QemuSystemTest` - :param success_message: if this message appears, test succeeds - :param failure_message: if this message appears, test fails - :param interrupt_string: a string to send to the console before trying - to read a new line - """ - _console_interaction(test, success_message, failure_message, - interrupt_string, True) - -def wait_for_console_pattern(test, success_message, failure_message=3DNone, - vm=3DNone): - """ - Waits for messages to appear on the console, while logging the content - - :param test: an Avocado test containing a VM that will have its console - read and probed for a success or failure message - :type test: :class:`avocado_qemu.QemuSystemTest` - :param success_message: if this message appears, test succeeds - :param failure_message: if this message appears, test fails - """ - _console_interaction(test, success_message, failure_message, None, vm= =3Dvm) - -def exec_command(test, command): - """ - Send a command to a console (appending CRLF characters), while logging - the content. - - :param test: an Avocado test containing a VM. - :type test: :class:`avocado_qemu.QemuSystemTest` - :param command: the command to send - :type command: str - """ - _console_interaction(test, None, None, command + '\r') - -def exec_command_and_wait_for_pattern(test, command, - success_message, failure_message=3DN= one): - """ - Send a command to a console (appending CRLF characters), then wait - for success_message to appear on the console, while logging the. - content. Mark the test as failed if failure_message is found instead. - - :param test: an Avocado test containing a VM that will have its console - read and probed for a success or failure message - :type test: :class:`avocado_qemu.QemuSystemTest` - :param command: the command to send - :param success_message: if this message appears, test succeeds - :param failure_message: if this message appears, test fails - """ - _console_interaction(test, success_message, failure_message, command += '\r') - -class QemuBaseTest(avocado.Test): - - # default timeout for all tests, can be overridden - timeout =3D 120 - - 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, bin_prefix): - self.arch =3D self.params.get('arch', - default=3Dself._get_unique_tag_val('ar= ch')) - - self.cpu =3D self.params.get('cpu', - default=3Dself._get_unique_tag_val('cpu= ')) - - default_qemu_bin =3D pick_default_qemu_bin(bin_prefix, arch=3Dself= .arch) - self.qemu_bin =3D self.params.get('qemu_bin', - default=3Ddefault_qemu_bin) - if self.qemu_bin is None: - self.cancel("No QEMU binary defined or found in the build tree= ") - - def fetch_asset(self, name, - asset_hash, algorithm=3DNone, - locations=3DNone, expire=3DNone, - find_only=3DFalse, cancel_on_missing=3DTrue): - return super().fetch_asset(name, - asset_hash=3Dasset_hash, - algorithm=3Dalgorithm, - locations=3Dlocations, - expire=3Dexpire, - find_only=3Dfind_only, - cancel_on_missing=3Dcancel_on_missing) - - -class QemuSystemTest(QemuBaseTest): - """Facilitates system emulation tests.""" - - def setUp(self): - self._vms =3D {} - - super().setUp('qemu-system-') - - accel_required =3D self._get_unique_tag_val('accel') - if accel_required: - self.require_accelerator(accel_required) - - self.machine =3D self.params.get('machine', - default=3Dself._get_unique_tag_val(= 'machine')) - - def require_accelerator(self, accelerator): - """ - Requires an accelerator to be available for the test to continue - - It takes into account the currently set qemu binary. - - If the check fails, the test is canceled. If the check itself - for the given accelerator is not available, the test is also - canceled. - - :param accelerator: name of the accelerator, such as "kvm" or "tcg" - :type accelerator: str - """ - checker =3D {'tcg': tcg_available, - 'kvm': kvm_available}.get(accelerator) - if checker is None: - self.cancel("Don't know how to check for the presence " - "of accelerator %s" % accelerator) - if not checker(qemu_bin=3Dself.qemu_bin): - self.cancel("%s accelerator does not seem to be " - "available" % accelerator) - - def require_netdev(self, netdevname): - netdevhelp =3D run_cmd([self.qemu_bin, - '-M', 'none', '-netdev', 'help'])[0]; - if netdevhelp.find('\n' + netdevname + '\n') < 0: - self.cancel('no support for user networking') - - def _new_vm(self, name, *args): - self._sd =3D tempfile.TemporaryDirectory(prefix=3D"qemu_") - vm =3D QEMUMachine(self.qemu_bin, base_temp_dir=3Dself.workdir, - log_dir=3Dself.logdir) - self.log.debug('QEMUMachine "%s" created', name) - self.log.debug('QEMUMachine "%s" temp_dir: %s', name, vm.temp_dir) - self.log.debug('QEMUMachine "%s" log_dir: %s', name, vm.log_dir) - if args: - vm.add_args(*args) - return vm - - def get_qemu_img(self): - self.log.debug('Looking for and selecting a qemu-img binary') - - # If qemu-img has been built, use it, otherwise the system wide one - # will be used. - qemu_img =3D os.path.join(BUILD_DIR, 'qemu-img') - if not os.path.exists(qemu_img): - qemu_img =3D find_command('qemu-img', False) - if qemu_img is False: - self.cancel('Could not find "qemu-img"') - - return qemu_img - - @property - def vm(self): - return self.get_vm(name=3D'default') - - def get_vm(self, *args, name=3DNone): - if not name: - name =3D str(uuid.uuid4()) - if self._vms.get(name) is None: - self._vms[name] =3D self._new_vm(name, *args) - if self.cpu is not None: - self._vms[name].add_args('-cpu', self.cpu) - if self.machine is not None: - self._vms[name].set_machine(self.machine) - return self._vms[name] - - def set_vm_arg(self, arg, value): - """ - Set an argument to list of extra arguments to be given to the QEMU - binary. If the argument already exists then its value is replaced. - - :param arg: the QEMU argument, such as "-cpu" in "-cpu host" - :type arg: str - :param value: the argument value, such as "host" in "-cpu host" - :type value: str - """ - if not arg or not value: - return - if arg not in self.vm.args: - self.vm.args.extend([arg, value]) - else: - idx =3D self.vm.args.index(arg) + 1 - if idx < len(self.vm.args): - self.vm.args[idx] =3D value - else: - self.vm.args.append(value) - - def tearDown(self): - for vm in self._vms.values(): - vm.shutdown() - self._sd =3D None - super().tearDown() - - -class LinuxSSHMixIn: - """Contains utility methods for interacting with a guest via SSH.""" - - def ssh_connect(self, username, credential, credential_is_key=3DTrue): - self.ssh_logger =3D logging.getLogger('ssh') - res =3D self.vm.cmd('human-monitor-command', - command_line=3D'info usernet') - port =3D get_info_usernet_hostfwd_port(res) - self.assertIsNotNone(port) - self.assertGreater(port, 0) - self.log.debug('sshd listening on port: %d', port) - if credential_is_key: - self.ssh_session =3D ssh.Session('127.0.0.1', port=3Dport, - user=3Dusername, key=3Dcredenti= al) - else: - self.ssh_session =3D ssh.Session('127.0.0.1', port=3Dport, - user=3Dusername, password=3Dcre= dential) - for i in range(10): - try: - self.ssh_session.connect() - return - except: - time.sleep(i) - self.fail('ssh connection timeout') - - def ssh_command(self, command): - self.ssh_logger.info(command) - result =3D self.ssh_session.cmd(command) - stdout_lines =3D [line.rstrip() for line - in result.stdout_text.splitlines()] - for line in stdout_lines: - self.ssh_logger.info(line) - stderr_lines =3D [line.rstrip() for line - in result.stderr_text.splitlines()] - for line in stderr_lines: - self.ssh_logger.warning(line) - - self.assertEqual(result.exit_status, 0, - f'Guest command failed: {command}') - return stdout_lines, stderr_lines - - def ssh_command_output_contains(self, cmd, exp): - stdout, _ =3D self.ssh_command(cmd) - for line in stdout: - if exp in line: - break - else: - self.fail('"%s" output does not contain "%s"' % (cmd, exp)) diff --git a/tests/avocado/avocado_qemu/linuxtest.py b/tests/avocado/avocad= o_qemu/linuxtest.py deleted file mode 100644 index 66fb9f15079..00000000000 --- a/tests/avocado/avocado_qemu/linuxtest.py +++ /dev/null @@ -1,253 +0,0 @@ -# Test class and utilities for functional Linux-based tests -# -# Copyright (c) 2018 Red Hat, Inc. -# -# Author: -# Cleber Rosa -# -# This work is licensed under the terms of the GNU GPL, version 2 or -# later. See the COPYING file in the top-level directory. - -import os -import shutil - -from avocado.utils import cloudinit, datadrainer, process, vmimage - -from avocado_qemu import LinuxSSHMixIn -from avocado_qemu import QemuSystemTest - -if os.path.islink(os.path.dirname(os.path.dirname(__file__))): - # The link to the avocado tests dir in the source code directory - lnk =3D os.path.dirname(os.path.dirname(__file__)) - #: The QEMU root source directory - SOURCE_DIR =3D os.path.dirname(os.path.dirname(os.readlink(lnk))) -else: - SOURCE_DIR =3D BUILD_DIR - -class LinuxDistro: - """Represents a Linux distribution - - Holds information of known distros. - """ - #: A collection of known distros and their respective image checksum - KNOWN_DISTROS =3D { - 'fedora': { - '31': { - 'x86_64': - {'checksum': ('e3c1b309d9203604922d6e255c2c5d09' - '8a309c2d46215d8fc026954f3c5c27a0'), - 'pxeboot_url': ('https://archives.fedoraproject.org/' - 'pub/archive/fedora/linux/releases/31/' - 'Everything/x86_64/os/images/pxeboot/'), - 'kernel_params': ('root=3DUUID=3Db1438b9b-2cab-4065-a99a-' - '08a96687f73c ro no_timer_check ' - 'net.ifnames=3D0 console=3Dtty1 ' - 'console=3DttyS0,115200n8'), - }, - 'aarch64': - {'checksum': ('1e18d9c0cf734940c4b5d5ec592facae' - 'd2af0ad0329383d5639c997fdf16fe49'), - 'pxeboot_url': 'https://archives.fedoraproject.org/' - 'pub/archive/fedora/linux/releases/31/' - 'Everything/aarch64/os/images/pxeboot/', - 'kernel_params': ('root=3DUUID=3Db6950a44-9f3c-4076-a9c2-' - '355e8475b0a7 ro earlyprintk=3Dpl011,0x9= 000000' - ' ignore_loglevel no_timer_check' - ' printk.time=3D1 rd_NO_PLYMOUTH' - ' console=3DttyAMA0'), - }, - 'ppc64': - {'checksum': ('7c3528b85a3df4b2306e892199a9e1e4' - '3f991c506f2cc390dc4efa2026ad2f58')}, - 's390x': - {'checksum': ('4caaab5a434fd4d1079149a072fdc789' - '1e354f834d355069ca982fdcaf5a122d')}, - }, - '32': { - 'aarch64': - {'checksum': ('b367755c664a2d7a26955bbfff985855' - 'adfa2ca15e908baf15b4b176d68d3967'), - 'pxeboot_url': ('http://dl.fedoraproject.org/pub/fedora/li= nux/' - 'releases/32/Server/aarch64/os/images/' - 'pxeboot/'), - 'kernel_params': ('root=3DUUID=3D3df75b65-be8d-4db4-8655-' - '14d95c0e90c5 ro no_timer_check net.ifna= mes=3D0' - ' console=3Dtty1 console=3DttyS0,115200n= 8'), - }, - }, - '33': { - 'aarch64': - {'checksum': ('e7f75cdfd523fe5ac2ca9eeece68edc1' - 'a81f386a17f969c1d1c7c87031008a6b'), - 'pxeboot_url': ('http://dl.fedoraproject.org/pub/fedora/li= nux/' - 'releases/33/Server/aarch64/os/images/' - 'pxeboot/'), - 'kernel_params': ('root=3DUUID=3Dd20b3ffa-6397-4a63-a734-' - '1126a0208f8a ro no_timer_check net.ifna= mes=3D0' - ' console=3Dtty1 console=3DttyS0,115200n= 8' - ' console=3Dtty0'), - }, - }, - } - } - - def __init__(self, name, version, arch): - self.name =3D name - self.version =3D version - self.arch =3D arch - try: - info =3D self.KNOWN_DISTROS.get(name).get(version).get(arch) - except AttributeError: - # Unknown distro - info =3D None - self._info =3D info or {} - - @property - def checksum(self): - """Gets the cloud-image file checksum""" - return self._info.get('checksum', None) - - @checksum.setter - def checksum(self, value): - self._info['checksum'] =3D value - - @property - def pxeboot_url(self): - """Gets the repository url where pxeboot files can be found""" - return self._info.get('pxeboot_url', None) - - @property - def default_kernel_params(self): - """Gets the default kernel parameters""" - return self._info.get('kernel_params', None) - - -class LinuxTest(LinuxSSHMixIn, QemuSystemTest): - """Facilitates having a cloud-image Linux based available. - - For tests that intend to interact with guests, this is a better choice - to start with than the more vanilla `QemuSystemTest` class. - """ - - distro =3D None - username =3D 'root' - password =3D 'password' - smp =3D '2' - memory =3D '1024' - - def _set_distro(self): - distro_name =3D self.params.get( - 'distro', - default=3Dself._get_unique_tag_val('distro')) - if not distro_name: - distro_name =3D 'fedora' - - distro_version =3D self.params.get( - 'distro_version', - default=3Dself._get_unique_tag_val('distro_version')) - if not distro_version: - distro_version =3D '31' - - self.distro =3D LinuxDistro(distro_name, distro_version, self.arch) - - # The distro checksum behaves differently than distro name and - # version. First, it does not respect a tag with the same - # name, given that it's not expected to be used for filtering - # (distro name versions are the natural choice). Second, the - # order of precedence is: parameter, attribute and then value - # from KNOWN_DISTROS. - distro_checksum =3D self.params.get('distro_checksum', - default=3DNone) - if distro_checksum: - self.distro.checksum =3D distro_checksum - - def setUp(self, ssh_pubkey=3DNone, network_device_type=3D'virtio-net'): - super().setUp() - self.require_netdev('user') - self._set_distro() - self.vm.add_args('-smp', self.smp) - self.vm.add_args('-m', self.memory) - # The following network device allows for SSH connections - self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22', - '-device', '%s,netdev=3Dvnet' % network_device_ty= pe) - self.set_up_boot() - if ssh_pubkey is None: - ssh_pubkey, self.ssh_key =3D self.set_up_existing_ssh_keys() - self.set_up_cloudinit(ssh_pubkey) - - def set_up_existing_ssh_keys(self): - ssh_public_key =3D os.path.join(SOURCE_DIR, 'tests', 'keys', 'id_r= sa.pub') - source_private_key =3D os.path.join(SOURCE_DIR, 'tests', 'keys', '= id_rsa') - ssh_dir =3D os.path.join(self.workdir, '.ssh') - os.mkdir(ssh_dir, mode=3D0o700) - ssh_private_key =3D os.path.join(ssh_dir, - os.path.basename(source_private_key= )) - shutil.copyfile(source_private_key, ssh_private_key) - os.chmod(ssh_private_key, 0o600) - return (ssh_public_key, ssh_private_key) - - def download_boot(self): - # Set the qemu-img binary. - # If none is available, the test will cancel. - vmimage.QEMU_IMG =3D super().get_qemu_img() - - self.log.info('Downloading/preparing boot image') - # Fedora 31 only provides ppc64le images - image_arch =3D self.arch - if self.distro.name =3D=3D 'fedora': - if image_arch =3D=3D 'ppc64': - image_arch =3D 'ppc64le' - - try: - boot =3D vmimage.get( - self.distro.name, arch=3Dimage_arch, version=3Dself.distro= .version, - checksum=3Dself.distro.checksum, - algorithm=3D'sha256', - cache_dir=3Dself.cache_dirs[0], - snapshot_dir=3Dself.workdir) - except: - self.cancel('Failed to download/prepare boot image') - return boot.path - - def prepare_cloudinit(self, ssh_pubkey=3DNone): - self.log.info('Preparing cloudinit image') - try: - cloudinit_iso =3D os.path.join(self.workdir, 'cloudinit.iso') - pubkey_content =3D None - if ssh_pubkey: - with open(ssh_pubkey) as pubkey: - pubkey_content =3D pubkey.read() - cloudinit.iso(cloudinit_iso, self.name, - username=3Dself.username, - password=3Dself.password, - # QEMU's hard coded usermode router address - phone_home_host=3D'10.0.2.2', - phone_home_port=3Dself.phone_server.server_port, - authorized_key=3Dpubkey_content) - except Exception: - self.cancel('Failed to prepare the cloudinit image') - return cloudinit_iso - - def set_up_boot(self): - path =3D self.download_boot() - self.vm.add_args('-drive', 'file=3D%s' % path) - - def set_up_cloudinit(self, ssh_pubkey=3DNone): - self.phone_server =3D cloudinit.PhoneHomeServer(('0.0.0.0', 0), - self.name) - cloudinit_iso =3D self.prepare_cloudinit(ssh_pubkey) - self.vm.add_args('-drive', 'file=3D%s,format=3Draw' % cloudinit_is= o) - - def launch_and_wait(self, set_up_ssh_connection=3DTrue): - self.vm.set_console() - self.vm.launch() - console_drainer =3D datadrainer.LineLogger(self.vm.console_socket.= fileno(), - logger=3Dself.log.getChil= d('console')) - console_drainer.start() - self.log.info('VM launched, waiting for boot confirmation from gue= st') - while not self.phone_server.instance_phoned_back: - self.phone_server.handle_request() - - if set_up_ssh_connection: - self.log.info('Setting up the SSH connection') - self.ssh_connect(self.username, self.ssh_key) --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393894; cv=none; d=zohomail.com; s=zohoarc; b=dW+5qcw3g/SozH+VWiBA/Yh27igqHlDpZxh55va0FTrdmBBfYZ/gu1j6oaqdlui6BB1p6UWz3cUdR51iOMYr8fFrNX85lFi9pzop4/RxlBA9yovWTgpTdPvMONYeqnPLhnD364bmUU1OEU4cvsPxEYrHO/1DIf9OHQ9ghgCuTUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393894; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1UNzmj4bAkwrOZaRDYriBwbMjAFqLpskQ9wXIXBclec=; b=Vrga6mjqvxx7/ojZR7KVy/KaY+tNftEgATWrDpr+5EgZ615YME8yQ0eK9cXCiWn8MebJap9sIuDuEtUDIH25H61l/udhr3GG/pSBhjiimJGZF5lXRQhiQQjm1NA5D/527uQpZuyoZh+umZFXMtdf8IG+J55t5XT2bZTFhs4bNYM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393894198860.7930654557248; Wed, 23 Apr 2025 00:38:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Ufd-0003nk-DN; Wed, 23 Apr 2025 03:37:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ufc-0003gQ-0v for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfZ-0003LG-4J for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:23 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-440-Tc3sOrDAMD2PKxTlW7JZyA-1; Wed, 23 Apr 2025 03:37:16 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3DC31180034E; Wed, 23 Apr 2025 07:37:15 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EE42C19560A3; Wed, 23 Apr 2025 07:37:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393840; 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=1UNzmj4bAkwrOZaRDYriBwbMjAFqLpskQ9wXIXBclec=; b=hJ9d4MhtLs6NzttUnzTeyujxOEg4wsZsb9Aa9stDrsak2LMgJNsdiJ2EaCH5076x28AlX9 o/lGXrdQUsJVL01PI1IDESYDsPEPLxnemvvKs48VlaSsSzu2B4X315FsjblREy4i3bA4sT X5S6U3EqwQKthhHzcvegsj5rZGFBe+g= X-MC-Unique: Tc3sOrDAMD2PKxTlW7JZyA-1 X-Mimecast-MFC-AGG-ID: Tc3sOrDAMD2PKxTlW7JZyA_1745393835 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Nina Schoetterl-Glausch , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 27/29] tests/functional: Remove semicolons at the end of lines Date: Wed, 23 Apr 2025 09:36:07 +0200 Message-ID: <20250423073610.271585-28-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393896161019000 From: Thomas Huth Yes, we are all C coders who try to write Python code for testing... but still, let's better avoid semicolons at the end of the lines to keep "pylint" happy! Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: C=C3=A9dric Le Goater Message-ID: <20250327201305.996241-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/aspeed.py | 2 +- tests/functional/test_aarch64_aspeed.py | 2 +- tests/functional/test_arm_aspeed_ast2500.py | 6 ++-- tests/functional/test_arm_aspeed_ast2600.py | 36 +++++++++---------- tests/functional/test_arm_aspeed_bletchley.py | 4 +-- tests/functional/test_arm_aspeed_palmetto.py | 4 +-- tests/functional/test_arm_aspeed_romulus.py | 4 +-- .../functional/test_arm_aspeed_witherspoon.py | 4 +-- tests/functional/test_arm_bpim2u.py | 2 +- tests/functional/test_arm_cubieboard.py | 2 +- tests/functional/test_arm_orangepi.py | 2 +- tests/functional/test_s390x_topology.py | 12 +++---- 12 files changed, 40 insertions(+), 40 deletions(-) diff --git a/tests/functional/aspeed.py b/tests/functional/aspeed.py index 77dc8930fa4..7a40d5dda73 100644 --- a/tests/functional/aspeed.py +++ b/tests/functional/aspeed.py @@ -44,7 +44,7 @@ def do_test_arm_aspeed_buildroot_start(self, image, cpu_i= d, pattern=3D'Aspeed EVB' =20 def do_test_arm_aspeed_buildroot_poweroff(self): exec_command_and_wait_for_pattern(self, 'poweroff', - 'System halted'); + 'System halted') =20 def do_test_arm_aspeed_sdk_start(self, image): self.require_netdev('user') diff --git a/tests/functional/test_aarch64_aspeed.py b/tests/functional/tes= t_aarch64_aspeed.py index c25c9662782..c7f3b3b319f 100755 --- a/tests/functional/test_aarch64_aspeed.py +++ b/tests/functional/test_aarch64_aspeed.py @@ -85,7 +85,7 @@ def start_ast2700_test(self, name): =20 exec_command_and_wait_for_pattern(self, 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-1/device/new_device ', - 'i2c i2c-1: new_device: Instantiated device lm75 at 0x4d'); + 'i2c i2c-1: new_device: Instantiated device lm75 at 0x4d') exec_command_and_wait_for_pattern(self, 'cat /sys/bus/i2c/devices/1-004d/hwmon/hwmon*/temp1_input', '0= ') self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', diff --git a/tests/functional/test_arm_aspeed_ast2500.py b/tests/functional= /test_arm_aspeed_ast2500.py index 1ffba6c9953..ddc6459f710 100755 --- a/tests/functional/test_arm_aspeed_ast2500.py +++ b/tests/functional/test_arm_aspeed_ast2500.py @@ -22,17 +22,17 @@ def test_arm_ast2500_evb_buildroot(self): image_path =3D self.ASSET_BR2_202411_AST2500_FLASH.fetch() =20 self.vm.add_args('-device', - 'tmp105,bus=3Daspeed.i2c.bus.3,address=3D0x4d,id= =3Dtmp-test'); + 'tmp105,bus=3Daspeed.i2c.bus.3,address=3D0x4d,id= =3Dtmp-test') self.do_test_arm_aspeed_buildroot_start(image_path, '0x0', 'ast2500-evb login:') =20 exec_command_and_wait_for_pattern(self, 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device', - 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); + 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d') exec_command_and_wait_for_pattern(self, 'cat /sys/class/hwmon/hwmon1/temp1_input', '0= ') self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', - property=3D'temperature', value=3D18000); + property=3D'temperature', value=3D18000) exec_command_and_wait_for_pattern(self, 'cat /sys/class/hwmon/hwmon1/temp1_input', '1= 8000') =20 diff --git a/tests/functional/test_arm_aspeed_ast2600.py b/tests/functional= /test_arm_aspeed_ast2600.py index 6ae4ed636ac..5ef52f06595 100755 --- a/tests/functional/test_arm_aspeed_ast2600.py +++ b/tests/functional/test_arm_aspeed_ast2600.py @@ -27,38 +27,38 @@ def test_arm_ast2600_evb_buildroot(self): image_path =3D self.ASSET_BR2_202411_AST2600_FLASH.fetch() =20 self.vm.add_args('-device', - 'tmp105,bus=3Daspeed.i2c.bus.3,address=3D0x4d,id= =3Dtmp-test'); + 'tmp105,bus=3Daspeed.i2c.bus.3,address=3D0x4d,id= =3Dtmp-test') self.vm.add_args('-device', - 'ds1338,bus=3Daspeed.i2c.bus.3,address=3D0x32'); + 'ds1338,bus=3Daspeed.i2c.bus.3,address=3D0x32') self.vm.add_args('-device', - 'i2c-echo,bus=3Daspeed.i2c.bus.3,address=3D0x42'); + 'i2c-echo,bus=3Daspeed.i2c.bus.3,address=3D0x42') self.do_test_arm_aspeed_buildroot_start(image_path, '0xf00', 'ast2600-evb login:') =20 exec_command_and_wait_for_pattern(self, 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device', - 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); + 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d') exec_command_and_wait_for_pattern(self, 'cat /sys/class/hwmon/hwmon1/temp1_input', '0= ') self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', - property=3D'temperature', value=3D18000); + property=3D'temperature', value=3D18000) exec_command_and_wait_for_pattern(self, 'cat /sys/class/hwmon/hwmon1/temp1_input', '1= 8000') =20 exec_command_and_wait_for_pattern(self, 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-3/device/new_devic= e', - 'i2c i2c-3: new_device: Instantiated device ds1307 at 0x32'); + 'i2c i2c-3: new_device: Instantiated device ds1307 at 0x32') year =3D time.strftime("%Y") - exec_command_and_wait_for_pattern(self, 'hwclock -f /dev/rtc1', ye= ar); + exec_command_and_wait_for_pattern(self, 'hwclock -f /dev/rtc1', ye= ar) =20 exec_command_and_wait_for_pattern(self, 'echo slave-24c02 0x1064 > /sys/bus/i2c/devices/i2c-3/new_dev= ice', - 'i2c i2c-3: new_device: Instantiated device slave-24c02 at 0x= 64'); + 'i2c i2c-3: new_device: Instantiated device slave-24c02 at 0x= 64') exec_command_and_wait_for_pattern(self, - 'i2cset -y 3 0x42 0x64 0x00 0xaa i', '#'); + 'i2cset -y 3 0x42 0x64 0x00 0xaa i', '#') exec_command_and_wait_for_pattern(self, 'hexdump /sys/bus/i2c/devices/3-1064/slave-eeprom', - '0000000 ffaa ffff ffff ffff ffff ffff ffff ffff'); + '0000000 ffaa ffff ffff ffff ffff ffff ffff ffff') self.do_test_arm_aspeed_buildroot_poweroff() =20 ASSET_BR2_202302_AST2600_TPM_FLASH =3D Asset( @@ -90,10 +90,10 @@ def test_arm_ast2600_evb_buildroot_tpm(self): =20 exec_command_and_wait_for_pattern(self, 'echo tpm_tis_i2c 0x2e > /sys/bus/i2c/devices/i2c-12/new_devic= e', - 'tpm_tis_i2c 12-002e: 2.0 TPM (device-id 0x1, rev-id 1)'); + 'tpm_tis_i2c 12-002e: 2.0 TPM (device-id 0x1, rev-id 1)') exec_command_and_wait_for_pattern(self, 'cat /sys/class/tpm/tpm0/pcr-sha256/0', - 'B804724EA13F52A9072BA87FE8FDCC497DFC9DF9AA15B9088694639C43168= 8E0'); + 'B804724EA13F52A9072BA87FE8FDCC497DFC9DF9AA15B9088694639C43168= 8E0') =20 self.do_test_arm_aspeed_buildroot_poweroff() =20 @@ -107,9 +107,9 @@ def test_arm_ast2600_evb_sdk(self): self.archive_extract(self.ASSET_SDK_V806_AST2600_A2) =20 self.vm.add_args('-device', - 'tmp105,bus=3Daspeed.i2c.bus.5,address=3D0x4d,id=3Dtmp-test'); + 'tmp105,bus=3Daspeed.i2c.bus.5,address=3D0x4d,id=3Dtmp-test') self.vm.add_args('-device', - 'ds1338,bus=3Daspeed.i2c.bus.5,address=3D0x32'); + 'ds1338,bus=3Daspeed.i2c.bus.5,address=3D0x32') self.do_test_arm_aspeed_sdk_start( self.scratch_file("ast2600-a2", "image-bmc")) =20 @@ -120,20 +120,20 @@ def test_arm_ast2600_evb_sdk(self): =20 exec_command_and_wait_for_pattern(self, 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-5/device/new_device', - 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d'); + 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d') exec_command_and_wait_for_pattern(self, 'cat /sys/class/hwmon/hwmon19/temp1_input', '0') self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', - property=3D'temperature', value=3D18000); + property=3D'temperature', value=3D18000) exec_command_and_wait_for_pattern(self, 'cat /sys/class/hwmon/hwmon19/temp1_input', '18000') =20 exec_command_and_wait_for_pattern(self, 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_devic= e', - 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32'); + 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32') year =3D time.strftime("%Y") exec_command_and_wait_for_pattern(self, - '/sbin/hwclock -f /dev/rtc1', year); + '/sbin/hwclock -f /dev/rtc1', year) =20 if __name__ =3D=3D '__main__': AspeedTest.main() diff --git a/tests/functional/test_arm_aspeed_bletchley.py b/tests/function= al/test_arm_aspeed_bletchley.py index 0da856c5ed4..5a60b24b3d2 100644 --- a/tests/functional/test_arm_aspeed_bletchley.py +++ b/tests/functional/test_arm_aspeed_bletchley.py @@ -12,14 +12,14 @@ class BletchleyMachine(AspeedTest): =20 ASSET_BLETCHLEY_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/master/images/bl= etchley-bmc/openbmc-20250128071329/obmc-phosphor-image-bletchley-2025012807= 1329.static.mtd.xz', - 'db21d04d47d7bb2a276f59d308614b4dfb70b9c7c81facbbca40a3977a2d8844'= ); + 'db21d04d47d7bb2a276f59d308614b4dfb70b9c7c81facbbca40a3977a2d8844') =20 def test_arm_ast2600_bletchley_openbmc(self): image_path =3D self.uncompress(self.ASSET_BLETCHLEY_FLASH) =20 self.do_test_arm_aspeed_openbmc('bletchley-bmc', image=3Dimage_pat= h, uboot=3D'2019.04', cpu_id=3D'0xf00= ', - soc=3D'AST2600 rev A3'); + soc=3D'AST2600 rev A3') =20 if __name__ =3D=3D '__main__': AspeedTest.main() diff --git a/tests/functional/test_arm_aspeed_palmetto.py b/tests/functiona= l/test_arm_aspeed_palmetto.py index 35d832bc98e..ff0b821be65 100755 --- a/tests/functional/test_arm_aspeed_palmetto.py +++ b/tests/functional/test_arm_aspeed_palmetto.py @@ -12,14 +12,14 @@ class PalmettoMachine(AspeedTest): =20 ASSET_PALMETTO_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/master/images/pa= lmetto-bmc/openbmc-20250128071432/obmc-phosphor-image-palmetto-202501280714= 32.static.mtd', - 'bce7c392eec75c707a91cfc8fad7ca9a69d7e4f10df936930d65c1cb9897ac81'= ); + 'bce7c392eec75c707a91cfc8fad7ca9a69d7e4f10df936930d65c1cb9897ac81') =20 def test_arm_ast2400_palmetto_openbmc(self): image_path =3D self.ASSET_PALMETTO_FLASH.fetch() =20 self.do_test_arm_aspeed_openbmc('palmetto-bmc', image=3Dimage_path, uboot=3D'2019.04', cpu_id=3D'0x0', - soc=3D'AST2400 rev A1'); + soc=3D'AST2400 rev A1') =20 if __name__ =3D=3D '__main__': AspeedTest.main() diff --git a/tests/functional/test_arm_aspeed_romulus.py b/tests/functional= /test_arm_aspeed_romulus.py index b97ed951b1f..0447212bbf0 100755 --- a/tests/functional/test_arm_aspeed_romulus.py +++ b/tests/functional/test_arm_aspeed_romulus.py @@ -12,14 +12,14 @@ class RomulusMachine(AspeedTest): =20 ASSET_ROMULUS_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/master/images/ro= mulus-bmc/openbmc-20250128071340/obmc-phosphor-image-romulus-20250128071340= .static.mtd', - '6d031376440c82ed9d087d25e9fa76aea75b42f80daa252ec402c0bc3cf6cf5b'= ); + '6d031376440c82ed9d087d25e9fa76aea75b42f80daa252ec402c0bc3cf6cf5b') =20 def test_arm_ast2500_romulus_openbmc(self): image_path =3D self.ASSET_ROMULUS_FLASH.fetch() =20 self.do_test_arm_aspeed_openbmc('romulus-bmc', image=3Dimage_path, uboot=3D'2019.04', cpu_id=3D'0x0', - soc=3D'AST2500 rev A1'); + soc=3D'AST2500 rev A1') =20 if __name__ =3D=3D '__main__': AspeedTest.main() diff --git a/tests/functional/test_arm_aspeed_witherspoon.py b/tests/functi= onal/test_arm_aspeed_witherspoon.py index ea1ce89b05c..51a2d47af28 100644 --- a/tests/functional/test_arm_aspeed_witherspoon.py +++ b/tests/functional/test_arm_aspeed_witherspoon.py @@ -12,14 +12,14 @@ class WitherspoonMachine(AspeedTest): =20 ASSET_WITHERSPOON_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/master/images/wi= therspoon-bmc/openbmc-20240618035022/obmc-phosphor-image-witherspoon-202406= 18035022.ubi.mtd', - '937d9ed449ea6c6cbed983519088a42d0cafe276bcfe4fce07772ca6673f9213'= ); + '937d9ed449ea6c6cbed983519088a42d0cafe276bcfe4fce07772ca6673f9213') =20 def test_arm_ast2500_witherspoon_openbmc(self): image_path =3D self.ASSET_WITHERSPOON_FLASH.fetch() =20 self.do_test_arm_aspeed_openbmc('witherspoon-bmc', image=3Dimage_p= ath, uboot=3D'2016.07', cpu_id=3D'0x0', - soc=3D'AST2500 rev A1'); + soc=3D'AST2500 rev A1') =20 if __name__ =3D=3D '__main__': AspeedTest.main() diff --git a/tests/functional/test_arm_bpim2u.py b/tests/functional/test_ar= m_bpim2u.py index 8de6ccba881..8bed64b702f 100755 --- a/tests/functional/test_arm_bpim2u.py +++ b/tests/functional/test_arm_bpim2u.py @@ -163,7 +163,7 @@ def test_arm_bpim2u_openwrt_22_03_3(self): self, 'Hit any key to stop autoboot:', '=3D>') exec_command_and_wait_for_pattern(self, "setenv extraargs '" + kernel_command_line + "'",= '=3D>') - exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel .= ..'); + exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel .= ..') =20 self.wait_for_console_pattern( 'Please press Enter to activate this console.') diff --git a/tests/functional/test_arm_cubieboard.py b/tests/functional/tes= t_arm_cubieboard.py index b87a28154da..1eaca0272bb 100755 --- a/tests/functional/test_arm_cubieboard.py +++ b/tests/functional/test_arm_cubieboard.py @@ -128,7 +128,7 @@ def test_arm_cubieboard_openwrt_22_03_2(self): self, 'Hit any key to stop autoboot:', '=3D>') exec_command_and_wait_for_pattern(self, "setenv extraargs '" + kernel_command_line + "'",= '=3D>') - exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel .= ..'); + exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel .= ..') =20 self.wait_for_console_pattern( 'Please press Enter to activate this console.') diff --git a/tests/functional/test_arm_orangepi.py b/tests/functional/test_= arm_orangepi.py index 1815f56e027..f9bfa8c78d9 100755 --- a/tests/functional/test_arm_orangepi.py +++ b/tests/functional/test_arm_orangepi.py @@ -174,7 +174,7 @@ def test_arm_orangepi_armbian(self): exec_command_and_wait_for_pattern(self, ' ', '=3D>') exec_command_and_wait_for_pattern(self, "setenv extraargs '" + kernel_command_line + "'",= '=3D>') - exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel .= ..'); + exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel .= ..') =20 self.wait_for_console_pattern('systemd[1]: Hostname set ' + 'to ') diff --git a/tests/functional/test_s390x_topology.py b/tests/functional/tes= t_s390x_topology.py index eefd9729cb2..1b5dc651353 100755 --- a/tests/functional/test_s390x_topology.py +++ b/tests/functional/test_s390x_topology.py @@ -217,12 +217,12 @@ def test_polarization(self): self.assertEqual(res['return']['polarization'], 'horizontal') self.check_topology(0, 0, 0, 0, 'medium', False) =20 - self.guest_set_dispatching('1'); + self.guest_set_dispatching('1') res =3D self.vm.qmp('query-s390x-cpu-polarization') self.assertEqual(res['return']['polarization'], 'vertical') self.check_topology(0, 0, 0, 0, 'medium', False) =20 - self.guest_set_dispatching('0'); + self.guest_set_dispatching('0') res =3D self.vm.qmp('query-s390x-cpu-polarization') self.assertEqual(res['return']['polarization'], 'horizontal') self.check_topology(0, 0, 0, 0, 'medium', False) @@ -283,7 +283,7 @@ def test_entitlement(self): self.check_polarization('vertical:high') self.check_topology(0, 0, 0, 0, 'high', False) =20 - self.guest_set_dispatching('0'); + self.guest_set_dispatching('0') self.check_polarization("horizontal") self.check_topology(0, 0, 0, 0, 'high', False) =20 @@ -310,11 +310,11 @@ def test_dedicated(self): self.check_topology(0, 0, 0, 0, 'high', True) self.check_polarization("horizontal") =20 - self.guest_set_dispatching('1'); + self.guest_set_dispatching('1') self.check_topology(0, 0, 0, 0, 'high', True) self.check_polarization("vertical:high") =20 - self.guest_set_dispatching('0'); + self.guest_set_dispatching('0') self.check_topology(0, 0, 0, 0, 'high', True) self.check_polarization("horizontal") =20 @@ -360,7 +360,7 @@ def test_dedicated_error(self): =20 self.check_topology(0, 0, 0, 0, 'high', True) =20 - self.guest_set_dispatching('1'); + self.guest_set_dispatching('1') =20 self.check_topology(0, 0, 0, 0, 'high', True) =20 --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745394000; cv=none; d=zohomail.com; s=zohoarc; b=VBWRPGhwij14s6DTcp11r2fYnF3qqDkQAl3HA1zrnAHGzobX5u9kv9Gx4FZsGvISbBebfJu2NpC/ArcCI8A8gAKT8N+wPZyEDCSH50qMJAAOMM8yThLFxBCOGZwq+Hfa3rzRTvGEvfyOhaBfffBhR+3XnmVwtZ7izSWrd0gJe4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745394000; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xzKlpAvIYSjO88pMS10A+zh2U5QacjQjItAfwpjsTYY=; b=Pi0+wHgnOEV/PLXmC7lx048ui5cuuO3WB06WgI0Dy4I5XX6GhXjXGqymaWhipfvy5hCadtJvopDea/UH450i6JrqZxqmQzPRmF5qoRq9ZUtE1SmJfH1kDCP0aS7e99IdzqtMhjxsYeiIw1EahcYMAp1nv/dQj7hJEJA+kcEVHIs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745394000010511.1368362578959; Wed, 23 Apr 2025 00:40:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uff-0003rv-AY; Wed, 23 Apr 2025 03:37:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ufc-0003j3-Qa for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7UfZ-0003LK-Cg for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:24 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-292-A8qpsKX0MHmqsrMonNnsUA-1; Wed, 23 Apr 2025 03:37:18 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5D92619560AA; Wed, 23 Apr 2025 07:37:17 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A838019560A3; Wed, 23 Apr 2025 07:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393840; 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=xzKlpAvIYSjO88pMS10A+zh2U5QacjQjItAfwpjsTYY=; b=VhwZGYQMwDQDVlkJtkRlWMb+CqaIi2PqVFE25DsQ5lyDyWKOM963CpnSYVSmfwdpqmo+7+ ZeuJ6oNb5u+tiOz4aBHA6jCmRl2pxrQNqU5FRhdFZBetw9js2K9zQlQcxSVILDeD6WnKVZ iofR6gdLSd/NuPrr54ZWi+8zkoQphrA= X-MC-Unique: A8qpsKX0MHmqsrMonNnsUA-1 X-Mimecast-MFC-AGG-ID: A8qpsKX0MHmqsrMonNnsUA_1745393837 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 28/29] tests/functional: Remove unnecessary import statements Date: Wed, 23 Apr 2025 09:36:08 +0200 Message-ID: <20250423073610.271585-29-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745394002146019000 From: Thomas Huth pylint complains about these unnecessary import statements, so let's remove them. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250414145457.261734-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/qemu_test/ports.py | 3 +-- tests/functional/qemu_test/tuxruntest.py | 2 -- tests/functional/qemu_test/uncompress.py | 2 +- tests/functional/test_aarch64_rme_sbsaref.py | 6 ++---- tests/functional/test_aarch64_rme_virt.py | 2 -- tests/functional/test_aarch64_sbsaref_alpine.py | 3 --- tests/functional/test_aarch64_sbsaref_freebsd.py | 2 -- tests/functional/test_aarch64_tcg_plugins.py | 1 - tests/functional/test_aarch64_virt.py | 8 ++------ tests/functional/test_arm_aspeed_ast2500.py | 3 +-- tests/functional/test_arm_cubieboard.py | 2 -- tests/functional/test_arm_quanta_gsj.py | 2 -- tests/functional/test_arm_smdkc210.py | 2 -- tests/functional/test_migration.py | 3 +-- tests/functional/test_mips64el_replay.py | 6 +----- tests/functional/test_mips_replay.py | 2 +- tests/functional/test_mipsel_replay.py | 2 +- tests/functional/test_ppc64_hv.py | 8 ++++---- tests/functional/test_vnc.py | 4 ++-- tests/functional/test_x86_64_kvm_xen.py | 2 -- 20 files changed, 17 insertions(+), 48 deletions(-) diff --git a/tests/functional/qemu_test/ports.py b/tests/functional/qemu_te= st/ports.py index cc39939d481..631b77abf6b 100644 --- a/tests/functional/qemu_test/ports.py +++ b/tests/functional/qemu_test/ports.py @@ -10,12 +10,11 @@ import fcntl import os import socket -import sys -import tempfile =20 from .config import BUILD_DIR from typing import List =20 + class Ports(): =20 PORTS_ADDR =3D '127.0.0.1' diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qe= mu_test/tuxruntest.py index c2bd5baaae9..6c442ff0dc4 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -10,8 +10,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 import os -import stat -from subprocess import check_call, DEVNULL =20 from qemu_test import QemuSystemTest from qemu_test import exec_command_and_wait_for_pattern diff --git a/tests/functional/qemu_test/uncompress.py b/tests/functional/qe= mu_test/uncompress.py index ce79da1b686..b7ef8f759b7 100644 --- a/tests/functional/qemu_test/uncompress.py +++ b/tests/functional/qemu_test/uncompress.py @@ -13,7 +13,7 @@ import stat import shutil from urllib.parse import urlparse -from subprocess import run, CalledProcessError, DEVNULL +from subprocess import run, CalledProcessError =20 from .asset import Asset =20 diff --git a/tests/functional/test_aarch64_rme_sbsaref.py b/tests/functiona= l/test_aarch64_rme_sbsaref.py index 0f4f6103a1e..746770e776d 100755 --- a/tests/functional/test_aarch64_rme_sbsaref.py +++ b/tests/functional/test_aarch64_rme_sbsaref.py @@ -9,15 +9,13 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import time import os -import logging =20 -from qemu_test import QemuSystemTest, Asset -from qemu_test import exec_command, wait_for_console_pattern +from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern from qemu_test import exec_command_and_wait_for_pattern from test_aarch64_rme_virt import test_realms_guest =20 + class Aarch64RMESbsaRefMachine(QemuSystemTest): =20 # Stack is built with OP-TEE build environment from those instructions: diff --git a/tests/functional/test_aarch64_rme_virt.py b/tests/functional/t= est_aarch64_rme_virt.py index a1abf584f0e..8452d27928f 100755 --- a/tests/functional/test_aarch64_rme_virt.py +++ b/tests/functional/test_aarch64_rme_virt.py @@ -9,9 +9,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import time import os -import logging =20 from qemu_test import QemuSystemTest, Asset from qemu_test import exec_command, wait_for_console_pattern diff --git a/tests/functional/test_aarch64_sbsaref_alpine.py b/tests/functi= onal/test_aarch64_sbsaref_alpine.py index c660cc7a406..6108ec65a54 100755 --- a/tests/functional/test_aarch64_sbsaref_alpine.py +++ b/tests/functional/test_aarch64_sbsaref_alpine.py @@ -10,11 +10,8 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import QemuSystemTest, Asset, skipSlowTest from qemu_test import wait_for_console_pattern -from unittest import skipUnless from test_aarch64_sbsaref import fetch_firmware =20 =20 diff --git a/tests/functional/test_aarch64_sbsaref_freebsd.py b/tests/funct= ional/test_aarch64_sbsaref_freebsd.py index bd6728dc705..26dfc5878bb 100755 --- a/tests/functional/test_aarch64_sbsaref_freebsd.py +++ b/tests/functional/test_aarch64_sbsaref_freebsd.py @@ -10,8 +10,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import QemuSystemTest, Asset, skipSlowTest from qemu_test import wait_for_console_pattern from test_aarch64_sbsaref import fetch_firmware diff --git a/tests/functional/test_aarch64_tcg_plugins.py b/tests/functiona= l/test_aarch64_tcg_plugins.py index 4ea71f5f882..cb7e9298fb8 100755 --- a/tests/functional/test_aarch64_tcg_plugins.py +++ b/tests/functional/test_aarch64_tcg_plugins.py @@ -13,7 +13,6 @@ =20 import tempfile import mmap -import os import re =20 from qemu.machine.machine import VMLaunchFailure diff --git a/tests/functional/test_aarch64_virt.py b/tests/functional/test_= aarch64_virt.py index 884aad7af61..4d0ad90ff89 100755 --- a/tests/functional/test_aarch64_virt.py +++ b/tests/functional/test_aarch64_virt.py @@ -13,12 +13,8 @@ import logging from subprocess import check_call, DEVNULL =20 -from qemu.machine.machine import VMLaunchFailure - -from qemu_test import QemuSystemTest, Asset -from qemu_test import exec_command, exec_command_and_wait_for_pattern -from qemu_test import wait_for_console_pattern -from qemu_test import skipIfMissingCommands, get_qemu_img +from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pat= tern +from qemu_test import wait_for_console_pattern, get_qemu_img =20 =20 class Aarch64VirtMachine(QemuSystemTest): diff --git a/tests/functional/test_arm_aspeed_ast2500.py b/tests/functional= /test_arm_aspeed_ast2500.py index ddc6459f710..a3b44572fcf 100755 --- a/tests/functional/test_arm_aspeed_ast2500.py +++ b/tests/functional/test_arm_aspeed_ast2500.py @@ -4,9 +4,8 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import Asset +from qemu_test import Asset, exec_command_and_wait_for_pattern from aspeed import AspeedTest -from qemu_test import exec_command_and_wait_for_pattern =20 =20 class AST2500Machine(AspeedTest): diff --git a/tests/functional/test_arm_cubieboard.py b/tests/functional/tes= t_arm_cubieboard.py index 1eaca0272bb..b536c2f77a0 100755 --- a/tests/functional/test_arm_cubieboard.py +++ b/tests/functional/test_arm_cubieboard.py @@ -4,8 +4,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern from qemu_test import interrupt_interactive_console_until_pattern from qemu_test import skipBigDataTest diff --git a/tests/functional/test_arm_quanta_gsj.py b/tests/functional/tes= t_arm_quanta_gsj.py index da60aeb6595..cb0545f7bfa 100755 --- a/tests/functional/test_arm_quanta_gsj.py +++ b/tests/functional/test_arm_quanta_gsj.py @@ -4,8 +4,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern from qemu_test import interrupt_interactive_console_until_pattern, skipSlo= wTest =20 diff --git a/tests/functional/test_arm_smdkc210.py b/tests/functional/test_= arm_smdkc210.py index 0fda45c63a8..3154e7f7322 100755 --- a/tests/functional/test_arm_smdkc210.py +++ b/tests/functional/test_arm_smdkc210.py @@ -4,8 +4,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu_test import LinuxKernelTest, Asset =20 =20 diff --git a/tests/functional/test_migration.py b/tests/functional/test_mig= ration.py index 181223a69e3..c4393c35434 100755 --- a/tests/functional/test_migration.py +++ b/tests/functional/test_migration.py @@ -11,14 +11,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. =20 - import tempfile -import os import time =20 from qemu_test import QemuSystemTest, skipIfMissingCommands from qemu_test.ports import Ports =20 + class MigrationTest(QemuSystemTest): =20 timeout =3D 10 diff --git a/tests/functional/test_mips64el_replay.py b/tests/functional/te= st_mips64el_replay.py index 4f63d7fb340..26a6ccff3f7 100755 --- a/tests/functional/test_mips64el_replay.py +++ b/tests/functional/test_mips64el_replay.py @@ -4,11 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os -import logging - -from qemu_test import Asset, exec_command_and_wait_for_pattern -from qemu_test import skipIfMissingImports, skipFlakyTest, skipUntrustedTe= st +from qemu_test import Asset, skipUntrustedTest from replay_kernel import ReplayKernelBase =20 =20 diff --git a/tests/functional/test_mips_replay.py b/tests/functional/test_m= ips_replay.py index eda031ccadd..4327481e35b 100755 --- a/tests/functional/test_mips_replay.py +++ b/tests/functional/test_mips_replay.py @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import Asset, skipSlowTest, exec_command_and_wait_for_patte= rn +from qemu_test import Asset, skipSlowTest from replay_kernel import ReplayKernelBase =20 =20 diff --git a/tests/functional/test_mipsel_replay.py b/tests/functional/test= _mipsel_replay.py index 0a330de43f8..5f4796cf899 100644 --- a/tests/functional/test_mipsel_replay.py +++ b/tests/functional/test_mipsel_replay.py @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -from qemu_test import Asset, wait_for_console_pattern, skipSlowTest +from qemu_test import Asset, skipSlowTest from replay_kernel import ReplayKernelBase =20 =20 diff --git a/tests/functional/test_ppc64_hv.py b/tests/functional/test_ppc6= 4_hv.py index 1920e91f18b..d87f440fa79 100755 --- a/tests/functional/test_ppc64_hv.py +++ b/tests/functional/test_ppc64_hv.py @@ -9,14 +9,14 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 +import os +import subprocess + +from datetime import datetime from qemu_test import QemuSystemTest, Asset from qemu_test import wait_for_console_pattern, exec_command from qemu_test import skipIfMissingCommands, skipBigDataTest from qemu_test import exec_command_and_wait_for_pattern -import os -import time -import subprocess -from datetime import datetime =20 # Alpine is a light weight distro that supports QEMU. These tests boot # that on the machine then run a QEMU guest inside it in KVM mode, diff --git a/tests/functional/test_vnc.py b/tests/functional/test_vnc.py index d4e9dd0279e..5c0ee5f9272 100755 --- a/tests/functional/test_vnc.py +++ b/tests/functional/test_vnc.py @@ -11,12 +11,12 @@ # later. See the COPYING file in the top-level directory. =20 import socket -from typing import List -from qemu.machine.machine import VMLaunchFailure =20 +from qemu.machine.machine import VMLaunchFailure from qemu_test import QemuSystemTest from qemu_test.ports import Ports =20 + VNC_ADDR =3D '127.0.0.1' =20 def check_connect(port: int) -> bool: diff --git a/tests/functional/test_x86_64_kvm_xen.py b/tests/functional/tes= t_x86_64_kvm_xen.py index c6abf6bba3b..a5d445023c9 100755 --- a/tests/functional/test_x86_64_kvm_xen.py +++ b/tests/functional/test_x86_64_kvm_xen.py @@ -11,8 +11,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os - from qemu.machine import machine =20 from qemu_test import QemuSystemTest, Asset, exec_command_and_wait_for_pat= tern --=20 2.49.0 From nobody Sat Nov 15 23:36:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1745393978; cv=none; d=zohomail.com; s=zohoarc; b=fR5teNbRGlo6e+uSsIcZ0eNUwLPLamHr/+jdYpQtqRZ/IhDqyGpBnpM1xnN387DB8gMjmcEfwsNGDMceFZ2zh4BOI3tLNL1NW97Bsq/fDqExr65jOGRdn/+i61Hr20CgbRVbE9mtpAkJJqPF/iasgZ5+TJrw/+UrQ7KUMz2WAck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745393978; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PVP+7fwcqYMkX9Lc6XcDOxujdeQNAYy5MB2fObPPJvc=; b=nRe0VW8X02OG+MzaO818+45ArD0+lKYsMZqpWYvq+jSel7/oDwPlznxHl/8HK3mqdqMEDjPaIdIeGInXKCYY32zdqLWzV2ruAj2pYVo4QyFE6R0IZnHS5YGWMaYZ7y7rp0HIKhrCxblRPO5PnqqYW/6qBtSkcNBeN+NiSfkDV6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745393978559877.1149868857489; Wed, 23 Apr 2025 00:39:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7Uff-0003uT-M6; Wed, 23 Apr 2025 03:37:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ufd-0003os-UB for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7Ufb-0003LY-NH for qemu-devel@nongnu.org; Wed, 23 Apr 2025 03:37:25 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-526-fwxpdfgkPVOsvt7tcAKaHQ-1; Wed, 23 Apr 2025 03:37:20 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 44DAD19560A1; Wed, 23 Apr 2025 07:37:19 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-219.str.redhat.com [10.33.192.219]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AA10019560A3; Wed, 23 Apr 2025 07:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745393843; 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=PVP+7fwcqYMkX9Lc6XcDOxujdeQNAYy5MB2fObPPJvc=; b=I6Yz/NxMcJboUtMPKdwxcQpID1xF00AwnMllnHTT0AytCaxhx3k9wZ4JE3sW9b7TvgwGZJ T2FXsVlN1Z/KqDioN+DEDY7/ye1uo1vmTN1j0UM/yt1VEV0wqqYfV4sGzdPuGf33onp2sJ hcmalX0N9mARt27Grwwj/7Wy9qUzMzg= X-MC-Unique: fwxpdfgkPVOsvt7tcAKaHQ-1 X-Mimecast-MFC-AGG-ID: fwxpdfgkPVOsvt7tcAKaHQ_1745393839 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 29/29] MAINTAINERS: Add functional tests that are not covered yet Date: Wed, 23 Apr 2025 09:36:09 +0200 Message-ID: <20250423073610.271585-30-thuth@redhat.com> In-Reply-To: <20250423073610.271585-1-thuth@redhat.com> References: <20250423073610.271585-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.411, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1745393980094019000 From: Thomas Huth Some functional tests are currently not covered by the entries in MAINTAINERS yet, so scripts/get_maintainers.pl fails to suggest the right people who should be CC:-ed for related patches. Add the uncovered tests to the right sections to close this gap. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250414121520.213665-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5fd757c5ddb..c6d9b022f9d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -475,6 +475,7 @@ F: docs/system/i386/sgx.rst F: target/i386/kvm/ F: target/i386/sev* F: scripts/kvm/vmxcap +F: tests/functional/test_x86_64_hotplug_cpu.py =20 Xen emulation on X86 KVM CPUs M: David Woodhouse @@ -626,6 +627,7 @@ S: Maintained F: hw/alpha/ F: hw/isa/smc37c669-superio.c F: tests/tcg/alpha/system/ +F: tests/functional/test_alpha_clipper.py =20 ARM Machines ------------ @@ -950,7 +952,7 @@ F: hw/misc/sbsa_ec.c F: hw/watchdog/sbsa_gwdt.c F: include/hw/watchdog/sbsa_gwdt.h F: docs/system/arm/sbsa.rst -F: tests/functional/test_aarch64_sbsaref*.py +F: tests/functional/test_aarch64_*sbsaref*.py =20 Sharp SL-5500 (Collie) PDA M: Peter Maydell @@ -1019,9 +1021,10 @@ S: Maintained F: hw/arm/virt* F: include/hw/arm/virt.h F: docs/system/arm/virt.rst -F: tests/functional/test_aarch64_virt*.py +F: tests/functional/test_aarch64_*virt*.py F: tests/functional/test_aarch64_tuxrun.py F: tests/functional/test_arm_tuxrun.py +F: tests/functional/test_arm_virt.py =20 Xilinx Zynq M: Edgar E. Iglesias @@ -1262,6 +1265,7 @@ F: hw/m68k/mcf_intc.c F: hw/char/mcf_uart.c F: hw/net/mcf_fec.c F: include/hw/m68k/mcf*.h +F: tests/functional/test_m68k_mcf5208evb.py =20 NeXTcube M: Thomas Huth @@ -1406,6 +1410,7 @@ S: Maintained F: docs/system/openrisc/or1k-sim.rst F: hw/intc/ompic.c F: hw/openrisc/openrisc_sim.c +F: tests/functional/test_or1k_sim.py =20 PowerPC Machines ---------------- @@ -1827,6 +1832,7 @@ F: include/hw/isa/apm.h F: tests/unit/test-x86-topo.c F: tests/qtest/test-x86-cpuid-compat.c F: tests/functional/test_i386_tuxrun.py +F: tests/functional/test_linux_initrd.py F: tests/functional/test_mem_addr_space.py F: tests/functional/test_pc_cpu_hotplug_props.py F: tests/functional/test_x86_64_tuxrun.py @@ -3150,6 +3156,7 @@ F: include/ui/ F: qapi/ui.json F: util/drm.c F: docs/devel/ui.rst +F: tests/functional/test_vnc.py =20 Cocoa graphics M: Peter Maydell @@ -3815,6 +3822,7 @@ F: configs/targets/*linux-user.mak F: scripts/qemu-binfmt-conf.sh F: scripts/update-syscalltbl.sh F: scripts/update-mips-syscall-args.sh +F: tests/functional/test_arm_bflt.py =20 Tiny Code Generator (TCG) ------------------------- @@ -4187,6 +4195,7 @@ F: hw/remote/vfio-user-obj.c F: include/hw/remote/vfio-user-obj.h F: hw/remote/iommu.c F: include/hw/remote/iommu.h +F: tests/functional/test_multiprocess.py =20 EBPF: M: Jason Wang --=20 2.49.0