From nobody Tue Feb 10 16:22:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524157859454350.12000814876274; Thu, 19 Apr 2018 10:10:59 -0700 (PDT) Received: from localhost ([::1]:32912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9D59-000641-Ad for importer@patchew.org; Thu, 19 Apr 2018 13:10:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9CiR-0003Wj-0e for qemu-devel@nongnu.org; Thu, 19 Apr 2018 12:47:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9CiP-0007Y4-Ij for qemu-devel@nongnu.org; Thu, 19 Apr 2018 12:47:23 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:45483) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9CiP-0007Y0-Cp for qemu-devel@nongnu.org; Thu, 19 Apr 2018 12:47:21 -0400 Received: by mail-qt0-x241.google.com with SMTP id b13-v6so6486280qtp.12 for ; Thu, 19 Apr 2018 09:47:21 -0700 (PDT) Received: from x1.local ([138.117.48.212]) by smtp.gmail.com with ESMTPSA id k126sm3040039qkd.34.2018.04.19.09.47.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 09:47:20 -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=PU0K8WfxeChXdFdEAKTDVTT6855GiMFYJU/V1us4HHc=; b=i90h7Ap+eQdh8HmoKjQdZO+dsKq/HgKHgN61GAdKSR5kruU7Bcz0EoWM72sq5zD4e4 EbmHDE1WWw1nRpvBRMTWKakx8e1lgs42c8oVgbBQMjl7oxPj7BdCWMpMrAQssS8+ozjs QdCgTAPsYop8EhfEACPFriqMgD5+FKba/3x3HLi7Y+Ca7pxm2EYmdyZdTR2VkP7QKFBr KkbGKgRi0TCRAr/mUh/aqyEvxq2V0BCuV7BJRfjXCCC008eSq4pTjORRYiePG0ZjLJTQ xwjGBkGLwC0ZfzV7SX4WQnapN0286WX3j/MaPVyuXVoh+Kq08y6miz2UQ3UJCmvJS0lB KMYA== 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=PU0K8WfxeChXdFdEAKTDVTT6855GiMFYJU/V1us4HHc=; b=fJTJYXAwekP5JBg6oMCzRkSb46AkYwAOlc2pXXuSYDL0iNqAyizZa3EMYgS7Fky2oF S2AXfxWJyyWlE4Ddbmp4u+8Yr+Nx3+BC4aXivfEqEYEgKVDP6IjfeBIqISgYwxfkDExX hnxLB0ryKeCODWyQxE5flPrF2GcmW7pSb3FqimT/BksJfC3k+unp1McXJhD9jhxOHa91 S7Z+rfWvTIrbfiaRAJvWwTgpVLRNy/EGUD8SfrIo8Gtpgdue/zQEMfpZvGMS4UbVeHxq ZGoamTrsqlPs4K8gJeyiT7RS8YxLHjSRy9bfCwAapsi10wVfJrKV+2Wh+QFoRg7VpsRI 0MgQ== X-Gm-Message-State: ALQs6tDMPMcUd+vtENYuHXeqNSF1jnacvDgefrBh0Td6XmDBbEifZwp1 72UjZYzUWyhBD/Do6JTAIqU= X-Google-Smtp-Source: AB8JxZoh7LrCfKzu6nMojwaC1WzG5dLo+yFmqrheR45VJNBvNr3VbWmX8JtxbQTDNjHfdadg/KhVNg== X-Received: by 2002:ac8:b0e:: with SMTP id e14-v6mr6742888qti.365.1524156440846; Thu, 19 Apr 2018 09:47:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= , Cleber Rosa , Amador Pahim , Stefan Hajnoczi , Zheng Xiang Date: Thu, 19 Apr 2018 13:46:42 -0300 Message-Id: <20180419164642.9536-8-f4bug@amsat.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180419164642.9536-1-f4bug@amsat.org> References: <20180419164642.9536-1-f4bug@amsat.org> MIME-Version: 1.0 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: 2607:f8b0:400d:c0d::241 Subject: [Qemu-devel] [RFC PATCH 7/7] avocado: Add tests booting the Malta machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Alistair Francis , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/avocado/test_linux-boot-console.py | 92 +++++++++++++++++++ .../parameters.yaml | 2 + 2 files changed, 94 insertions(+) diff --git a/tests/avocado/test_linux-boot-console.py b/tests/avocado/test_= linux-boot-console.py index f54d10dd79..4ae1e3bf37 100644 --- a/tests/avocado/test_linux-boot-console.py +++ b/tests/avocado/test_linux-boot-console.py @@ -86,3 +86,95 @@ class TestAlphaClipperBoot2_6(test.QemuTest): =20 def tearDown(self): os.remove(self.console_path) + + +class TestMips4kcMaltaBoot2_6(test.QemuTest): + """ + :avocado: enable + :avocado: tags=3Darch_mips + """ + ARCH =3D "mips" + + def kernel_url(self): + return 'http://people.debian.org/~aurel32/qemu/mips/vmlinux-2.6.32= -5-4kc-malta' + + def setUp(self): + self.console_path =3D tempfile.mkstemp()[1] + kernel_path =3D cachedfile(self.kernel_url()) + self.vm._args.extend(['-machine', 'malta']) + self.vm._args.extend(['-m', '64']) + self.vm._args.extend(['-kernel', kernel_path]) + self.vm._args.extend(['-append', '"console=3DttyS0 printk.time=3D0= "']) + self.vm._args.extend(['-chardev', 'socket,id=3Duart0,server,nowait= ,path=3D' + self.console_path]) + self.vm._args.extend(['-serial', 'chardev:uart0']) + self.vm._args.extend(['-nographic']) + + def test_boot_console(self): + """ + :avocado: tags=3Duart,printk + """ + if self.params.get('arch') !=3D self.ARCH: + return + + self.vm.launch(self.console_path) + console =3D self.vm.get_console(console_address=3Dself.console_pat= h, login=3DFalse) + # no filesystem provided on purpose, wait for the Kernel panic + bootlog =3D console.read_until_any_line_matches(["Kernel panic - n= ot syncing: VFS: Unable to mount root fs"], timeout=3D6.0)[1] + console.close() + # check Super I/O + self.assertIn(u'ttyS0 at I/O 0x3f8 (irq =3D 4) is a 16550A', bootl= og) + self.assertIn(u'ttyS1 at I/O 0x2f8 (irq =3D 3) is a 16550A', bootl= og) + self.assertIn(u'i8042 KBD port at 0x60,0x64 irq 1', bootlog) + self.assertIn(u'i8042 AUX port at 0x60,0x64 irq 12', bootlog) + # check PCI (network interface) + self.assertIn(u'registered as PCnet/PCI II 79C970A', bootlog) + self.vm.shutdown() + + def tearDown(self): + os.remove(self.console_path) + +# FIXME this is a copy of TestMips4kcMaltaBoot2_6 with a different the ker= nel url +class TestMips4kcMaltaBoot3_2(test.QemuTest): + """ + :avocado: enable + :avocado: tags=3Darch_mips + """ + ARCH =3D "mips" + + def kernel_url(self): + return 'http://people.debian.org/~aurel32/qemu/mips/vmlinux-3.2.0-= 4-4kc-malta' + + def setUp(self): + self.console_path =3D tempfile.mkstemp()[1] + kernel_path =3D cachedfile(self.kernel_url()) + self.vm._args.extend(['-machine', 'malta']) + self.vm._args.extend(['-m', '64']) + self.vm._args.extend(['-kernel', kernel_path]) + self.vm._args.extend(['-append', '"console=3DttyS0 printk.time=3D0= "']) + self.vm._args.extend(['-chardev', 'socket,id=3Duart0,server,nowait= ,path=3D' + self.console_path]) + self.vm._args.extend(['-serial', 'chardev:uart0']) + self.vm._args.extend(['-nographic']) + + def test_boot_console(self): + """ + :avocado: tags=3Duart,printk + """ + if self.params.get('arch') !=3D self.ARCH: + return + + self.vm.launch(self.console_path) + console =3D self.vm.get_console(console_address=3Dself.console_pat= h, login=3DFalse) + # no filesystem provided on purpose, wait for the Kernel panic + bootlog =3D console.read_until_any_line_matches(["Kernel panic - n= ot syncing: VFS: Unable to mount root fs"], timeout=3D6.0)[1] + console.close() + # check Super I/O + self.assertIn(u'ttyS0 at I/O 0x3f8 (irq =3D 4) is a 16550A', bootl= og) + self.assertIn(u'ttyS1 at I/O 0x2f8 (irq =3D 3) is a 16550A', bootl= og) + self.assertIn(u'i8042 KBD port at 0x60,0x64 irq 1', bootlog) + self.assertIn(u'i8042 AUX port at 0x60,0x64 irq 12', bootlog) + # check PCI (network interface) + self.assertIn(u'registered as PCnet/PCI II 79C970A', bootlog) + self.vm.shutdown() + + def tearDown(self): + os.remove(self.console_path) diff --git a/tests/avocado/test_linux-boot-console.py.data/parameters.yaml = b/tests/avocado/test_linux-boot-console.py.data/parameters.yaml index ed8c08058c..156f271a73 100644 --- a/tests/avocado/test_linux-boot-console.py.data/parameters.yaml +++ b/tests/avocado/test_linux-boot-console.py.data/parameters.yaml @@ -1,3 +1,5 @@ architecture: !mux alpha: arch: alpha + mips: + arch: mips --=20 2.17.0