From nobody Mon Feb 9 11:53:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1568582583; cv=none; d=zoho.com; s=zohoarc; b=EMfEOPh3SnQVITMZ1OziRTVYPxvNKG+E7qkIMdMPIxtctF2xmJvKCssgHi/Juaq3lic8vzD3TlgLTHB7MIbKguITaUkuRrW/0TUbZk0H33G4ywm8h/JSngGxGfVwtULFTHAqRIkpCNODuvLaaRjYkuK0rpGtYZqSxP82j5Z1I+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568582583; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=DGAkei/pdxmAWxadGqaNiywfyQsm6bUbjLXzI6Q0mkQ=; b=EA/yBWmNUcPUqZOQvL1GuNWWzmEJUtJr7V1335iB6sVKfkAnVWQxHQ0d6Ao97kXcXlPeVExAIrsK0kVdxR+04WmAsT88aeZAeOevPrTMjWKtkS2trCJXG5fGo0LVKcTblsweB9nagp99UIK0d+NsMOFGmZzGvQw1eGV0m6ItcRQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568582583170808.8270816455569; Sun, 15 Sep 2019 14:23:03 -0700 (PDT) Received: from localhost ([::1]:57244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9byx-0005Wl-UV for importer@patchew.org; Sun, 15 Sep 2019 17:22:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51297) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9bvz-0003F2-LG for qemu-devel@nongnu.org; Sun, 15 Sep 2019 17:19:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9bvy-0000jt-7d for qemu-devel@nongnu.org; Sun, 15 Sep 2019 17:19:51 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:38911) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9bvv-0000hm-B4; Sun, 15 Sep 2019 17:19:47 -0400 Received: by mail-wm1-x331.google.com with SMTP id o184so7969210wme.3; Sun, 15 Sep 2019 14:19:47 -0700 (PDT) Received: from localhost.localdomain (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id s1sm50271021wrg.80.2019.09.15.14.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Sep 2019 14:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DGAkei/pdxmAWxadGqaNiywfyQsm6bUbjLXzI6Q0mkQ=; b=gqVlhsakY4WwthiZ/4rpLQoe0cQ/w5s2gp2S9VHc2rxxIHPaBlk/2/fJmdnOkxaXV3 HjxN5npoE1vse3v5Di7kU8DC/zf0FZtlwV8aTEmNG9g7a9b9j/N69VxzR6VRfw89ndTz 6b8lhaGJaoxdePXgauZTxJgssBEcihJf5LMVSR/1y/JjImaCySAv9H4wHNJvcWAqZB+/ vfowLZsEK5hC4Vk4WmRTwl0HsslBW8PM9OJmGk2iGUI+MxA7RhAQ9ykQEg5dPdmuYTto 2B/BwXuIfQimiemEz8Goe99aREALVfrXO0Z/g1lDDhH6iiHN5zQfQNVsWLmUWGqhOQC4 iIYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DGAkei/pdxmAWxadGqaNiywfyQsm6bUbjLXzI6Q0mkQ=; b=KBkoBGBze9v/P0me5AGjfNvmOsfSUmDEIGiXdKnRHmHrX7FhjUBYRNDknH4BP50fzl OMZ7VlatJ9IJXx9F7+Gmbh2jXDzzpuIQHUVlflFZbZex9jnZuauDE4Erppcx47NU3sUv wejKrkPTUVWghDqRaobRAqALEXCaDl0vlJmX31RaYfoBhhVSTJZtltFcPbPRt0DDoPPe iYIiHaxk/2/+NBWi5ch2VG3TjSf6imtqegzQs4UcnUO6Z1LALbnNzLz9vE9sbgzZIqVg wrIsjezK/geLCsJi8bc1flV8Csh9FTTJwqVxlkFj3FCmiw9GK9ZKiV/sE72v4+Rhn/ky wtVQ== X-Gm-Message-State: APjAAAXnMcFdzWzZcmrWtmsIkj/Mp0t6mWZBzyP5zqDcHTaMX3J/wrZ7 hh0eKtrGmmw2iIXRGnOHqMUZlOCt X-Google-Smtp-Source: APXvYqxT1oHvcHehO4HnabRoI5CY2Fl1X53OM8eA6FeF9Z0umxT6QwcM87BtOvjn7DHuizNwGAEosQ== X-Received: by 2002:a1c:bcd6:: with SMTP id m205mr11009795wmf.129.1568582385975; Sun, 15 Sep 2019 14:19:45 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Date: Sun, 15 Sep 2019 23:19:35 +0200 Message-Id: <20190915211940.30427-2-f4bug@amsat.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190915211940.30427-1-f4bug@amsat.org> References: <20190915211940.30427-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::331 Subject: [Qemu-devel] [PATCH v2 1/6] tests/acceptance: Add test that runs NetBSD 4.0 installer on PRep/40p X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) As of this commit, NetBSD 4.0 is very old. However it is enough to test the PRep/40p machine. User case from: http://mail-index.netbsd.org/port-prep/2017/04/11/msg000112.html Reviewed-by: Herv=C3=A9 Poussineau Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Artyom Tarasenko --- Installers after 4.0 doesn't work anymore, not sure if this is a problem from the QEMU model or from NetBSD. --- MAINTAINERS | 1 + tests/acceptance/ppc_prep_40p.py | 63 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/acceptance/ppc_prep_40p.py diff --git a/MAINTAINERS b/MAINTAINERS index 50eaf005f4..ce809c7dee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1068,6 +1068,7 @@ F: hw/timer/m48t59-isa.c F: include/hw/isa/pc87312.h F: include/hw/timer/m48t59.h F: pc-bios/ppc_rom.bin +F: tests/acceptance/machine_ppc_prep_40p.py =20 sPAPR M: David Gibson diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_4= 0p.py new file mode 100644 index 0000000000..53f2d2ecf0 --- /dev/null +++ b/tests/acceptance/ppc_prep_40p.py @@ -0,0 +1,63 @@ +# Functional test that boots a PReP/40p machine and checks its serial cons= ole. +# +# 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 logging + +from avocado import skipIf +from avocado_qemu import Test + + +class IbmPrep40pMachine(Test): + + timeout =3D 60 + + # TODO refactor to MachineTest + def wait_for_console_pattern(self, success_message, failure_message=3D= None): + """ + Waits for messages to appear on the console, while logging the con= tent + + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + """ + console =3D self.vm.console_socket.makefile() + console_logger =3D logging.getLogger('console') + while True: + msg =3D console.readline().strip() + if not msg: + continue + console_logger.debug(msg) + if success_message in msg: + break + if failure_message and failure_message in msg: + fail =3D 'Failure message found in console: %s' % failure_= message + self.fail(fail) + + @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') + def test_factory_firmware_and_netbsd(self): + """ + :avocado: tags=3Darch:ppc + :avocado: tags=3Dmachine:40p + :avocado: tags=3Dslowness:high + """ + bios_url =3D ('ftp://ftp.boulder.ibm.com/rs6000/firmware/' + '7020-40p/P12H0456.IMG') + bios_hash =3D '1775face4e6dc27f3a6ed955ef6eb331bf817f03' + bios_path =3D self.fetch_asset(bios_url, asset_hash=3Dbios_hash) + drive_url =3D ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/' + 'NetBSD-4.0/prep/installation/floppy/generic_com0.fs') + drive_hash =3D 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb' + drive_path =3D self.fetch_asset(drive_url, asset_hash=3Ddrive_hash) + + self.vm.set_machine('40p') + self.vm.set_console() + self.vm.add_args('-bios', bios_path, + '-fda', drive_path) + self.vm.launch() + os_banner =3D 'NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:49:40 PST 20= 07' + self.wait_for_console_pattern(os_banner) + self.wait_for_console_pattern('Model: IBM PPS Model 6015') --=20 2.20.1