From nobody Thu Nov 6 06:17:54 2025 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153944400291171.40959387133842; Sat, 13 Oct 2018 08:20:02 -0700 (PDT) Received: from localhost ([::1]:45319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLhx-0000Rb-MZ for importer@patchew.org; Sat, 13 Oct 2018 11:20:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLe5-0006UG-Jz for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:16:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBLe4-0004TP-Og for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:16:01 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:33953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBLe4-0004Sj-I1 for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:16:00 -0400 Received: by mail-wm1-x331.google.com with SMTP id z25-v6so19939367wmf.1 for ; Sat, 13 Oct 2018 08:16:00 -0700 (PDT) Received: from x1.local (62.red-88-24-165.staticip.rima-tde.net. [88.24.165.62]) by smtp.gmail.com with ESMTPSA id g3-v6sm2470446wrw.81.2018.10.13.08.15.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 08:15:58 -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=MXrAi/36zEDw4cStIBWXJgk5jVvBMejI2jXwU/19uj4=; b=b76gcJCxQm8HepSaLKCSw19ccM59TkFeIj8WnIW3qd3m4KsYkHMvpUJuv6NWuxyYlk lyhC8YdJ9UJB6zfxncSNrHy2CQFSsUNjRHL4gR1i8zxuaN/tSOgqlGMxqv9Ry6c0wOdZ qzL0XXnwNfyM0L0ydxyXQG3WQvGc/LKdKKB+F//nnQNpAjCEZUn6uTBy83g4qBOctFlf nu54SaOSnbydR+QnQ3x+tmA9h4v1mFx9CZenMHd/408AILDFbqnowj6wcxZlEAbdofoZ qw0usGxgaY1hueJ7U+t7PTl4Nxc2ILhFADBYptpzU9O/y+lZhp623eHqRULHlScx46fU jPFw== 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=MXrAi/36zEDw4cStIBWXJgk5jVvBMejI2jXwU/19uj4=; b=F565E5copAVz5XgBUQpTbbo5mfNLbIlPQ1HgrxBEvW9Y4aKsqN86a2ACplzAsLz0PA /oxP+P94sRWSwYMT8ujVwYhqBBOKqY3KZuq7gYWi4/Gji6o/GUP5lQ2HinLrXXCH1/cm po1Ch+3Dc+5dgBumOzJjRvoXUHJfLrYr4dRy7UGSfQheC7+S/plSF0zaiU0rNXwzmFca 0WfGlVndo8Av47ksuzIOIBC/lAQuAbIiqAbN8DPwhwlEtjomUw8o5wXfOt6Vwv8b7QwL qQR0ZONXeluliDoYl5185NMiz+iYr59fkDxpzpCKstwIpO38pGO1xcsdT90X0k7G9j5H RT/g== X-Gm-Message-State: ABuFfoi6v9FlDdYshMdEXliz4HqEL2E/BJV9JUUOd1bsRpRqb/USuFUc cWrDFYTI+qCiVId94HB+Te8= X-Google-Smtp-Source: ACcGV62UXyuFZ0Gp2Vv3sdcinBDxqBRvjeshSkjAyRuvcJFzbO2MUYJ4GkkaBr33UXbQKxHOPUclkQ== X-Received: by 2002:a1c:6744:: with SMTP id b65-v6mr8394997wmc.98.1539443759558; Sat, 13 Oct 2018 08:15:59 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Eduardo Habkost , BALATON Zoltan , Magnus Damm Date: Sat, 13 Oct 2018 17:15:44 +0200 Message-Id: <20181013151545.3731-6-f4bug@amsat.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181013151545.3731-1-f4bug@amsat.org> References: <20181013151545.3731-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: 2a00:1450:4864:20::331 Subject: [Qemu-devel] [PATCH v3 5/6] tests/acceptance: Add test_sh4_r2d in BootLinuxConsole 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: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= , Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org 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 Similar to the test_x86_64_pc test, this boots a Linux kernel on a R2D board (SH4 little-endian) and verify the serial is working. This test requires the dpkg-deb tool (apt/dnf install dpkg) to extract the kernel from the Debian package. Note, due to a problem with the serial on this machine, this test is currently disabled. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index e4a60297bf..8f99cc0d7c 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -11,6 +11,7 @@ import logging import subprocess =20 +from avocado import skip from avocado_qemu import Test =20 =20 @@ -137,3 +138,50 @@ class BootLinuxConsole(Test): break if 'Kernel panic - not syncing' in msg: self.fail("Kernel panic reached") + + @skip("console not working on r2d machine") + def test_sh4_r2d(self): + """ + This test requires the dpkg-deb tool (apt/dnf install dpkg) to ext= ract + the kernel from the Debian package. + This test also requires the QEMU binary to be compiled with: + + $ configure ... --enable-trace-backends=3Dlog + + The kernel can be rebuilt using this Debian kernel source [1] and + following the instructions on [2]. + + [1] https://kernel-team.pages.debian.net/kernel-handbook/ch-common= -tasks.html#s-common-official + [2] http://snapshot.debian.org/package/linux-2.6/2.6.32-30/#linux-= source-2.6.32_2.6.32-30 + + :avocado: tags=3Darch:sh4 + """ + if self.arch !=3D 'sh4': + self.cancel('Currently specific to the %s target arch' % self.= arch) + + deb_url =3D ('http://snapshot.debian.org/archive/' + 'debian-ports/20110116T065852Z/pool-sh4/main/l/' + 'linux-2.6/linux-image-2.6.32-5-sh7751r_2.6.32-30_sh4.d= eb') + deb_hash =3D '8025e503319dc8ad786756e3afaa8eb868e9ef59' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + subprocess.check_call(['dpkg-deb', '--extract', deb_path, self.wor= kdir]) + kernel_path =3D self.workdir + '/boot/vmlinuz-2.6.32-5-sh7751r' + + self.vm.set_arch(self.arch) + self.vm.set_machine('r2d') + self.vm.set_console("") # XXX + kernel_command_line =3D 'console=3DttyS0 printk.time=3D0 noiotrap' + self.vm.add_args('-serial', "chardev:console", + '-kernel', kernel_path, + '-append', kernel_command_line) + + self.vm.launch() + console =3D self.vm.console_socket.makefile() + console_logger =3D logging.getLogger('console') + while True: + msg =3D console.readline() + console_logger.debug(msg.strip()) + if 'Kernel command line: %s' % kernel_command_line in msg: + break + if 'Kernel panic - not syncing' in msg: + self.fail("Kernel panic reached") --=20 2.19.1