From nobody Thu Nov 6 06:17:04 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 1539444133490140.88377887918796; Sat, 13 Oct 2018 08:22:13 -0700 (PDT) Received: from localhost ([::1]:45332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLk4-0001wl-Ec for importer@patchew.org; Sat, 13 Oct 2018 11:22:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLe4-0006Tk-Cm 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 1gBLe3-0004SM-FZ for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:16:00 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36674) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBLe3-0004RQ-8M for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:59 -0400 Received: by mail-wr1-x42e.google.com with SMTP id y16so16451624wrw.3 for ; Sat, 13 Oct 2018 08:15:59 -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.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 08:15:57 -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=EEVKXMTYAAlT8gcbU3eNzwhIhM0TDrTQkNqXY3wAlhY=; b=XIXKRSvb49O3Gvss5nXJChkaSlrQ6FLu0K5cEr7odfmTrYXgacSQcEuhy7PLEx1zB5 JLbp6yZcF+Denh9tZ5A0z/izOZmf+JTDCGp/cLAlQ82G6vIREM+OiEj18+Ukc297dXoY 6QjwDp9WffALcjyKuM29DXNkagsgaqaDwvQHxo0SUyoq1VBRY6X25paNVJozgp/qtWQU 6AO4gN2naMlo9w60prHN5cO4KeLwk9tXbs4x4e7JB0U9CHEY5pzGu2MxlkfNopZLochH yDihzd0a9f2Pv+l7vmOs6E+/83EQSOSnZaWBIJR1Zz1EiZztJtsbcvZhgYZwmMhx6HTr J7WA== 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=EEVKXMTYAAlT8gcbU3eNzwhIhM0TDrTQkNqXY3wAlhY=; b=Xs/T4kExj3b/v/7rwBNcV3h9SXwVPPTW8M/A8kQ2TbosZzYuetVGFR0PCkQcVXkuoU vBvaIgxkJ+wFhVPszacg7gmUftX8GBNrA3eVg/lx+vfrHKn9q+rAiJOAP77JnQLlI5Mk CMsRyaTvGnTOQBlEbN2lGde2kicTvgkZYnqHrnblwgg9JZQMbxl8n4kW175d/PjwdJt8 73rXjjpa950qvymm9HxORBsrrqrqo0V65II4UVQurKEdh41hSd8KZGv1WDTZ1hqk4P/N RZAeXkB55rKnohYXqn91RcaXYuuxrU7OLnHLY18UTJdfrPK9RLnIRPH/zfzEViGAl4CT CLwA== X-Gm-Message-State: ABuFfoiiy5KElG1BdFSqrBZ1MTfFQfcTUCBBHIUIPpZjG8PxHNObbsFO scy1Oc4MlBMQ6zvST+aVkWk= X-Google-Smtp-Source: ACcGV63at72dhsnrD3cLYEBZuW/jcru9oQWJ9J55O61MJVDYPH/6n7PM99Fw6No9L9x3LOG2vyDl5g== X-Received: by 2002:adf:bc84:: with SMTP id g4-v6mr9315264wrh.250.1539443758189; Sat, 13 Oct 2018 08:15:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Eduardo Habkost Date: Sat, 13 Oct 2018 17:15:43 +0200 Message-Id: <20181013151545.3731-5-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::42e Subject: [Qemu-devel] [PATCH v3 4/6] tests/acceptance: Add test_mipsel_5kc_malta 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 Malta board (MIPS 5Kc 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. $ avocado run -p arch=3Dmips64el tests/acceptance/boot_linux_console.py JOB ID : 6450db71ca27757f53e13809625fc5107d0e6e4e JOB LOG : /home/phil/avocado/job-results/job-2018-10-13T13.34-6450db7/= job.log (1/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_x86_6= 4_pc: CANCEL: Currently specific to the x86_64 target arch (0.00 s) (2/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_mips_= 4kc_malta: CANCEL: Currently specific to the mips target arch (0.00 s) (3/3) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_mipse= l_5kc_malta: PASS (0.78 s) RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | = CANCEL 2 JOB TIME : 0.97 s Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 81c96fc338..e4a60297bf 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -93,3 +93,47 @@ class BootLinuxConsole(Test): break if 'Kernel panic - not syncing' in msg: self.fail("Kernel panic reached") + + def test_mipsel_5kc_malta(self): + """ + This test requires the dpkg-deb tool (apt/dnf install dpkg) to ext= ract + the kernel from the Debian package. + + 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-48/#linux-= source-2.6.32_2.6.32-48 + + :avocado: tags=3Darch:mips64el + """ + if self.arch !=3D 'mips64el': + self.cancel('Currently specific to the %s target arch' % self.= arch) + + deb_url =3D ('http://snapshot.debian.org/archive/debian/20130217T0= 32700Z/' + 'pool/main/l/linux-2.6/' + 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb') + deb_hash =3D '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5' + 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/vmlinux-2.6.32-5-5kc-malta' + + self.vm.set_arch(self.arch) + self.vm.set_machine('malta') + self.vm.set_console("") # XXX + kernel_command_line =3D 'console=3DttyS0 printk.time=3D0' + self.vm.add_args('-m', "64", + '-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