From nobody Fri May 17 16:16:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611847839; cv=none; d=zohomail.com; s=zohoarc; b=k826rTqy8uSqpCxGUiEn2pRebFi2LqDLcfVu6Z97j0ujVsnw5OpkXibemH92u5nFcV4/GKMhYzMEHflVaMVDuHh8/0aLVjRGuzHIzWxI5HkIzS7l2NtE1WPa4yT9YKvCzM4mjyvfBgVbzW9k8S2OsakLtXxugY3R0tzQjH7YBWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611847839; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=EIs4kAhmHFYVNbzGqA5he/SAdOhK6BuHJdkrirV0LoM=; b=jcaE2dpmSuVFYepfNdQXS321eU0O8cPWG5pD6XT+agNQfm86uXtNTJl65xezTGf/xfFgxrTBiULPegDp6mdGPzpT1pDbCIGmCo3X1xic+7i1j1euDFOz3DTTAym31GvnGkO6Zu8oUsE7ATOm1ZN7gMj8Nbt6YSrGw+SAhhAa0AY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1611847839330132.20390238586333; Thu, 28 Jan 2021 07:30:39 -0800 (PST) Received: from localhost ([::1]:37306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l59Fl-0005Yz-RK for importer@patchew.org; Thu, 28 Jan 2021 10:30:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l59E9-0004Dz-4p for qemu-devel@nongnu.org; Thu, 28 Jan 2021 10:28:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28229) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l59E7-0007aP-Au for qemu-devel@nongnu.org; Thu, 28 Jan 2021 10:28:56 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-457-Ym_pBcPONKeK82cJTQ7F4w-1; Thu, 28 Jan 2021 10:28:51 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A40C710054FF; Thu, 28 Jan 2021 15:28:50 +0000 (UTC) Received: from thuth.com (ovpn-112-110.ams2.redhat.com [10.36.112.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09A016085D; Thu, 28 Jan 2021 15:28:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611847734; 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; bh=EIs4kAhmHFYVNbzGqA5he/SAdOhK6BuHJdkrirV0LoM=; b=EuLFzDKX2ScKktYN4WKRpzgPvd06AbtlxV0PhdtsPtUflj0PwaIybl4Tp5DnEfPzVeaNCx ARy6RrLIBOWjrYLNSh+9fEVXCA/tZf8PQh3ne3tmMbCqSZ1w/4eFoE10KYUmU4XACEcwrv JSYSyJCNrTzcdKjsueUJgxc2MR+FGBM= X-MC-Unique: Ym_pBcPONKeK82cJTQ7F4w-1 From: Thomas Huth To: qemu-devel@nongnu.org, "Edgar E. Iglesias" Subject: [PATCH] tests/acceptance: Re-enable the microblaze test Date: Thu, 28 Jan 2021 16:28:15 +0100 Message-Id: <20210128152815.585478-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.252, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The microblaze kernel sometimes gets stuck during boot (ca. 1 out of 200 times), so we disabled the corresponding acceptance tests some months ago. However, it's likely better to check that the kernel is still starting than to not testing it at all anymore. Move the test to a separate file, enable it again and check for an earlier console message that should always appear. Signed-off-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta --- MAINTAINERS | 1 + tests/acceptance/boot_linux_console.py | 9 ------- tests/acceptance/machine_microblaze.py | 35 ++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 tests/acceptance/machine_microblaze.py diff --git a/MAINTAINERS b/MAINTAINERS index 34359a99b8..157ad4f7ef 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1112,6 +1112,7 @@ M: Edgar E. Iglesias S: Maintained F: hw/microblaze/petalogix_s3adsp1800_mmu.c F: include/hw/char/xilinx_uartlite.h +F: tests/acceptance/machine_microblaze.py =20 petalogix_ml605 M: Edgar E. Iglesias diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index fb41bb7144..969fbf3952 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -1047,15 +1047,6 @@ class BootLinuxConsole(LinuxKernelTest): tar_hash =3D 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c' self.do_test_advcal_2018('07', tar_hash, 'sanity-clause.elf') =20 - @skip("Test currently broken") # Console stuck as of 5.2-rc1 - def test_microblaze_s3adsp1800(self): - """ - :avocado: tags=3Darch:microblaze - :avocado: tags=3Dmachine:petalogix-s3adsp1800 - """ - tar_hash =3D '08bf3e3bfb6b6c7ce1e54ab65d54e189f2caf13f' - self.do_test_advcal_2018('17', tar_hash, 'ballerina.bin') - def test_or1k_sim(self): """ :avocado: tags=3Darch:or1k diff --git a/tests/acceptance/machine_microblaze.py b/tests/acceptance/mach= ine_microblaze.py new file mode 100644 index 0000000000..7f6d18495d --- /dev/null +++ b/tests/acceptance/machine_microblaze.py @@ -0,0 +1,35 @@ +# Functional test that boots a microblaze Linux kernel and checks the cons= ole +# +# Copyright (c) 2018, 2021 Red Hat, Inc. +# +# 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 avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern +from avocado.utils import archive + +class MicroblazeMachine(Test): + + timeout =3D 90 + + def test_microblaze_s3adsp1800(self): + """ + :avocado: tags=3Darch:microblaze + :avocado: tags=3Dmachine:petalogix-s3adsp1800 + """ + + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day17.tar.xz') + tar_hash =3D '08bf3e3bfb6b6c7ce1e54ab65d54e189f2caf13f' + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + archive.extract(file_path, self.workdir) + self.vm.set_console() + self.vm.add_args('-kernel', self.workdir + '/day17/ballerina.bin') + self.vm.launch() + wait_for_console_pattern(self, 'This architecture does not have ' + 'kernel memory protection') + # Note: + # The kernel sometimes gets stuck after the "This architecture ..." + # message, that's why we don't test for a later string here. This + # needs some investigation by a microblaze wizard one day... --=20 2.27.0