From nobody Thu Nov 6 03:26:11 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 1539443873720904.9295488771869; Sat, 13 Oct 2018 08:17:53 -0700 (PDT) Received: from localhost ([::1]:45310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLfo-0007ML-55 for importer@patchew.org; Sat, 13 Oct 2018 11:17:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLe1-0006Rr-BU for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBLdz-0004Nw-IT for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:57 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:55876) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBLdz-0004ND-B1 for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:55 -0400 Received: by mail-wm1-x342.google.com with SMTP id 206-v6so14887082wmb.5 for ; Sat, 13 Oct 2018 08:15:55 -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.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 08:15:53 -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=fcHsqmBqxeF59dxc0XAlCoPnFs2wTYm/xsXas3EYxT8=; b=C4HtTVKCRpJ1+wPhY4nVe8+RENyObUY/N7PztkRIfa2lUd10tt2hlyAqH0GN3fwfGv I7I85FiRwCVtuuHsumdjt7CG/rLY0cry5PQSrbJfmYNN+ATH7V5mQ11gQlPAoovkawFv 5QAnuftrbsw7hGg3Qy/am0I2tqI3WwrdvZMTHvfPWLBDNHIMpw3V92thQ0tAPbn+kNW2 WWSra4MYxakY7vKNVzWethPI2td23U7caKHdYwoqjG49v4fjJdpAHaR4puLB+jOdyDVA m444ruMAtmXS4PXNy6eKObbsfacXPHTxM5HfMyZCYg0vpmSC1phaUpSoQUzu3gi8YiBz k24Q== 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=fcHsqmBqxeF59dxc0XAlCoPnFs2wTYm/xsXas3EYxT8=; b=fpzvYnA9TDzhqtMZKNdq2habSuIP8q1x/HaJs8w/bTQ3NURfipplm6D93ESB04tTP+ XNXiF4l3FVm1OoA4ZlRLDTyfF5Z5gSN3oTUbftXoCzXvFWAcralc35z3iey4XVdgbcU+ kfu0M7fNZHOls7ffGTYOovi1C7j0J6yZe/3kDRYEeXV7LJXdzMPXv5kOiuWM+4v+jPPc 9r69jfYtc2Z8Vz75eeoqhIeOD6011YxSvhWJrhKyn6Z7dNbGywG94xpoSvdLF6ZtVUAU v0HZ1fLhTIgtz3GM0N1IsnTTkszAXA/aMOwUPvqsrRiv3K1pdQ1uOyFpbS+ajYDXZ1YN pDOg== X-Gm-Message-State: ABuFfohIclpAed4qROQrXdodQfLLqWyz+2RlT1qOQIbXuBCybzWVcZRf RYFnBnyEQaUrxBOAsAPS1Ao= X-Google-Smtp-Source: ACcGV60gX6eV+sJX6loFfDUFIpIRxNXqBc9RlPL7ry8DaWarYujx/cxAjeOsycjBitFQUsMMorsO5Q== X-Received: by 2002:a1c:58f:: with SMTP id 137-v6mr8408423wmf.37.1539443754247; Sat, 13 Oct 2018 08:15:54 -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:40 +0200 Message-Id: <20181013151545.3731-2-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::342 Subject: [Qemu-devel] [PATCH v3 1/6] tests/acceptance: Rename the generic BootLinuxConsole test as test_x86_64_pc 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index ba3ac036da..3aa4dbe5f9 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -15,7 +15,7 @@ from avocado_qemu import Test =20 class BootLinuxConsole(Test): """ - Boots a x86_64 Linux kernel and checks that the console is operational + Boots a Linux kernel and checks that the console is operational and the kernel command line is properly passed from QEMU to the kernel =20 :avocado: enable @@ -23,7 +23,7 @@ class BootLinuxConsole(Test): =20 timeout =3D 60 =20 - def test(self): + def test_x86_64_pc(self): if self.arch !=3D 'x86_64': self.cancel('Currently specific to the x86_64 target arch') kernel_url =3D ('https://mirrors.kernel.org/fedora/releases/28/' --=20 2.19.1 From nobody Thu Nov 6 03:26:11 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 1539443938959998.2363031655597; Sat, 13 Oct 2018 08:18:58 -0700 (PDT) Received: from localhost ([::1]:45312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLgs-0008A0-OK for importer@patchew.org; Sat, 13 Oct 2018 11:18:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLe1-0006Rx-Dv for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBLe0-0004PP-Ow for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:57 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:39405) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBLe0-0004OW-IU for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:56 -0400 Received: by mail-wr1-x444.google.com with SMTP id 61-v6so16444471wrb.6 for ; Sat, 13 Oct 2018 08:15:56 -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.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 08:15:54 -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=Xqm7/TOdDXCG+IMBkGsN3SG3RpvtGn6x5C0VnhYBC0o=; b=FL5rnrRva7x/GdVyALG3UwB0cuS9VynXI0KodgsCrZNF95pRokUsYbABbZKqxwN9+6 ygD06XjhGEWgsw9ZXXBb8mbwnY9YIjjLaGZydXRGVaDEdTeqONeshaLruBN/QZh3KDjg J+Ogt+26dkJw3cWp54kdD/DlkEFamgx04ADbQXE9Yz4HdUJyg5BTTRI739VXdE33KEMy BEY0jK9YW1O+gcGRF/N5msBGppmaZqGkLyF/4c4/GFpOTRiKG78os34RCz1IoeqmhYYG xEV19fsc4ccdMBURNjQeXFS7FtafI7S6+0aHdTOe/k/AvdNG+vhVvzfL5Z03vsEzO5Uj yLrg== 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=Xqm7/TOdDXCG+IMBkGsN3SG3RpvtGn6x5C0VnhYBC0o=; b=GGCBUTbPRxWWrE7/FfAfG+9psOMVuSJGj3ZqyUj5zR8scclmWx38Zi6D/T1F9BpvNQ JLwcuOPZHGoW9gRpQXQbJYc9mN3PjgHbntcUZAOpljOQuayKh5WNFWdLDSXBbcE8hBrs qlOnSDOmd0+FK81sf+Qhmyrv8HygyzCLJ6yCld8p20DspfxTG4kDh6Ec4UDXHBE7s6jp pKeG+L3w9VdsIZDEzJlrPbUO0Tz9VM0qGkH/gUIOJjUc8z/CmhpzyxwLjk9Hnb6tBfXb Yx6s1CwR3f1lyPR8EPHK0We8PUV3VxmF+TSFH45TsOXkwB+Rr/crlHKqOUC0+RKw2KSS Mr+A== X-Gm-Message-State: ABuFfogPVuT9zYD77xqmdS+elR30HRZnAFr0vF04xJTzYEY+8f0/ATiA 0w9w9LGom/pWcTdQLUmTS4E= X-Google-Smtp-Source: ACcGV605Ms2UCMIhBMhzSzD6iamvBiUd3hrEmX/rWczfRNA2jEAxPIen+rkVHl/hbjaNzZ5JVQ7fGQ== X-Received: by 2002:adf:8483:: with SMTP id 3-v6mr9622947wrg.34.1539443755520; Sat, 13 Oct 2018 08:15:55 -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:41 +0200 Message-Id: <20181013151545.3731-3-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::444 Subject: [Qemu-devel] [RFC PATCH v3 2/6] tests/acceptance: Add a kludge to not use the default console 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 The board already instantiate the proper devices, we don't want to add extra devices but connect the chardev to one of the serial already available. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- scripts/qemu.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index fca9b76990..7e779954e6 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -221,8 +221,10 @@ class QEMUMachine(object): self._name + "-console.so= ck") chardev =3D ('socket,id=3Dconsole,path=3D%s,server,nowait' % self._console_address) - device =3D '%s,chardev=3Dconsole' % self._console_device_type - args.extend(['-chardev', chardev, '-device', device]) + args.extend(['-chardev', chardev]) + if len(self._console_device_type): + device =3D '%s,chardev=3Dconsole' % self._console_device_t= ype + args.extend(['-device', device]) return args =20 def _pre_launch(self): --=20 2.19.1 From nobody Thu Nov 6 03:26:11 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 1539443874181172.43920204721906; Sat, 13 Oct 2018 08:17:54 -0700 (PDT) Received: from localhost ([::1]:45311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLfs-0007N3-Mj for importer@patchew.org; Sat, 13 Oct 2018 11:17:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLe3-0006T1-BS for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBLe2-0004RC-9M for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:59 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:55877) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBLe2-0004QB-0y for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:15:58 -0400 Received: by mail-wm1-x343.google.com with SMTP id 206-v6so14887143wmb.5 for ; Sat, 13 Oct 2018 08:15:57 -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.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 08:15:56 -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=gzSJBTPc9yjGwMq73xy8wJZLQv8t7efa86ZEfod9bAw=; b=JUrz4NOjyxJT5TYzQjiBtRXeESmjefK74u9T/AA176I81xxJZgrFF9ZcP60pOjJkCw AWaufu4vKsZvryaBMARDXk9mH94R+gRypMrxR7ernIB2YyIG0zcdE72PkXyHpk8qYJhB MPG8cfrgcmGAPWYwSVhyz0Ejrg0jjNSX8NWUTihBGWwg9eKd0jyeUTdvhrjRKp+0+pJC B6dflDPYrannOISOtYYkRRUAVt4/rtmOUdUhF2KqcsmpzviUwQ6E7CFbtOqh7VyotQ5Z wP5nHWLvSJocm3T780Jnjunq9LLmGVwtaHNUFGtR3Dnlkla+EusJ2bc44FgppAVu3o7k OoLw== 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=gzSJBTPc9yjGwMq73xy8wJZLQv8t7efa86ZEfod9bAw=; b=gFYZhyc4/vrqO0s4b1wvSp27Mn5VT+PDhLTckQj9Q5IqlwYuDllvHGfWAjWuZTmuzF dZ9v8WqVXoH+x9p03n0qg2PCyqU6yY9DuYEBI8QAMuWoAP8eYTKxAhL372qwydnpeTP0 UGmsS1GwmWj8LGyW0F3prRUKXKGXgApmRYpikMbgnXqs3LOJitxLnzR1wXvmkKQgOFOL uP/5EpxgiTNC5n/ad2kHFtOpaBa39pwdjQMW1Xh3woDhS9hMC+GWoOtNAFRhYyf0mk7E Nn6S23XFVljvBqTSDV3KxYFxr6WZlwD6ldKA+5TKvhezJteJxD1nXcaRNbpRRIzLAKdL SW9g== X-Gm-Message-State: ABuFfojco0fxGYQMQe/Dh6iIiF3PXZD4FBxhRGZnynmPZk7R5SAIsJTN HoMT71I33d4KIp92wpYeSxs= X-Google-Smtp-Source: ACcGV63uxYnkIStq0a9u2x0dvoj7YpwaOV4rTy8ep3QsnNlTMIdxl2+y00HzLqX5JoO5HIf5kC3rxg== X-Received: by 2002:a1c:1c13:: with SMTP id c19-v6mr7720127wmc.85.1539443756924; Sat, 13 Oct 2018 08:15:56 -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:42 +0200 Message-Id: <20181013151545.3731-4-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::343 Subject: [Qemu-devel] [PATCH v3 3/6] tests/acceptance: Add test_mips_4kc_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 4Kc big-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 --show=3Dconsole run -p arch=3Dmips tests/acceptance/boot_linux= _console.py console: [ 0.000000] Initializing cgroup subsys cpuset console: [ 0.000000] Initializing cgroup subsys cpu console: [ 0.000000] Linux version 2.6.32-5-4kc-malta (Debian 2.6.32-4= 8) (ben@decadent.org.uk) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 Sat Feb 1= 6 12:43:42 UTC 2013 console: [ 0.000000] console: [ 0.000000] LINUX started... console: [ 0.000000] bootconsole [early0] enabled console: [ 0.000000] CPU revision is: 00019300 (MIPS 24Kc) console: [ 0.000000] FPU revision is: 00739300 console: [ 0.000000] Determined physical RAM map: console: [ 0.000000] memory: 00001000 @ 00000000 (reserved) console: [ 0.000000] memory: 000ef000 @ 00001000 (ROM data) console: [ 0.000000] memory: 005b7000 @ 000f0000 (reserved) console: [ 0.000000] memory: 03958000 @ 006a7000 (usable) console: [ 0.000000] Wasting 54496 bytes for tracking 1703 unused pages console: [ 0.000000] Initrd not found or empty - disabling initrd console: [ 0.000000] Zone PFN ranges: console: [ 0.000000] DMA 0x00000000 -> 0x00001000 console: [ 0.000000] Normal 0x00001000 -> 0x00003fff console: [ 0.000000] Movable zone start PFN for each node console: [ 0.000000] early_node_map[1] active PFN ranges console: [ 0.000000] 0: 0x00000000 -> 0x00003fff console: [ 0.000000] Built 1 zonelists in Zone order, mobility groupin= g on. Total pages: 16255 console: [ 0.000000] Kernel command line: console=3DttyS0 printk.time= =3D0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 3aa4dbe5f9..81c96fc338 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -9,6 +9,7 @@ # later. See the COPYING file in the top-level directory. =20 import logging +import subprocess =20 from avocado_qemu import Test =20 @@ -47,3 +48,48 @@ class BootLinuxConsole(Test): break if 'Kernel panic - not syncing' in msg: self.fail("Kernel panic reached") + + def test_mips_4kc_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:mips + """ + if self.arch !=3D 'mips': # FIXME use 'arch' tag in parent class? + 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-4kc-malta_2.6.32-48_mips.deb') + deb_hash =3D 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + subprocess.check_call(['dpkg-deb', '--extract', deb_path, self.wor= kdir]) # FIXME move to avocado ... + kernel_path =3D self.workdir + '/boot/vmlinux-2.6.32-5-4kc-malta' = # FIXME ... and use from assets? + + self.vm.set_arch(self.arch) + self.vm.set_machine('malta') + self.vm.set_console("") # XXX this disable isa-serial to use -seri= al ... + kernel_command_line =3D 'console=3DttyS0 printk.time=3D0' + self.vm.add_args('-m', "64", + '-serial', "chardev:console", # XXX ... here. + '-kernel', kernel_path, + '-append', kernel_command_line) + + # FIXME below to parent class? + 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 From nobody Thu Nov 6 03:26:11 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 From nobody Thu Nov 6 03:26:11 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 From nobody Thu Nov 6 03:26:11 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 1539444209403952.5873410323512; Sat, 13 Oct 2018 08:23:29 -0700 (PDT) Received: from localhost ([::1]:45336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLlI-0002mU-8d for importer@patchew.org; Sat, 13 Oct 2018 11:23:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBLe7-0006Uo-Cs for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBLe6-0004Um-6j for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:16:03 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:45980) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBLe5-0004Tq-UU for qemu-devel@nongnu.org; Sat, 13 Oct 2018 11:16:02 -0400 Received: by mail-wr1-x42e.google.com with SMTP id q5-v6so16446547wrw.12 for ; Sat, 13 Oct 2018 08:16:01 -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.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 08:16:00 -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=B29ROZh5iCjOAxsncmr1hPq6+PXLf8L+u9zpA6n4iVE=; b=V6BDspuLrilKWK3pYFMFCF0r7V1YQ6OphOc+HYNVqcM/irKaGo7GSDTeOmRnkteFL3 QqG0sPG8ZJgsyMRphhdrVVJ+Si/BcZL7zW3Mvo/DtKxlyDoXc9m+ckYl4/4r9whmWvZJ 3HO+NemOuHHtheAAJKRSJgmoDMm2LG/3FzF7FhHoLOwzOpIHXOVHQb5sF8jCmiU9X4vg UibVuLHue8hrezlTSvWPfZg+ic0iC32YSaAeuGYIBttbCk46JbDyBzLrNFLbELvhVAdl oIMIDyeMhCpbmeBf7tMRcn9Y1Noy65YnzYCzMOrsBvyiHuzxR604IwLt4v2UHHwy6S7/ vb5g== 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=B29ROZh5iCjOAxsncmr1hPq6+PXLf8L+u9zpA6n4iVE=; b=XdRZ/+qfv+y3Ix+P1s6CgALuntkrbWXWb0SXS3iY4JRZQK7sblE4gx58bdk6Q6vGaL 3b9nLr7T7MZ76x/Yw54Xuf4BgwIHBhX7jKYa4gdU2trQ6MecIm5WX19s2iO3JRH8UEvN H8kJQ0EF9dBGdeVGFQ0ER10sTIi0DrTwAYDOgU5VfMJ38nx22jQaFpKcgunE7RmyFDu8 EaH8TzarL6klXg++KXeaQsR/GLyihJ1YdObkFIw0vizEFC2riuy5N5fk1dSjjton5goG eUpLBE5WhTnecSYxTriZfV9C8/xiuitlx/dK1MPLmA2Xv/Vjq/hwMdtHjxp0Futabhwh afRQ== X-Gm-Message-State: ABuFfohVZ1Nw0e77+HLa2n0nd78HeztkXYE4mXbZnb548KUsYJSj/DTg 5yGjEpMYAhxTinkQnbA4nRA= X-Google-Smtp-Source: ACcGV63zJatNsWajvr1DerP8yF8sggUk7GFHcxipdDnpm9wkhAh+3g+B7uLkgt9e1KDktJ4/5+JTuQ== X-Received: by 2002:adf:9dc9:: with SMTP id q9-v6mr8293137wre.12.1539443760914; Sat, 13 Oct 2018 08:16:00 -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:45 +0200 Message-Id: <20181013151545.3731-7-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] [RFC PATCH v3 6/6] tests/acceptance: Add test_sh4_r2d in BootLinuxTracing 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 usb is working by looking at the usb trace events. Thus this test requires the QEMU binary to be compiled with: $ configure ... --enable-trace-backends=3Dlog This test also requires the dpkg-deb tool (apt/dnf install dpkg) to extract the kernel from the Debian package. $ avocado --show=3Dapp,trace run -p arch=3Dsh4 tests/acceptance/boot_linu= x_console.py JOB ID : dc45be27f5d1edb8289a1ede139e107bbc55b045 JOB LOG : /home/phil/avocado/job-results/job-2018-10-13T14.46-dc45be2/= job.log (1/5) 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/5) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_mips_= 4kc_malta: CANCEL: Currently specific to the sh4 target arch (0.00 s) (3/5) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_mipse= l_5kc_malta: CANCEL: Currently specific to the sh4 target arch (0.00 s) (4/5) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_sh4_r= 2d: SKIP: console not working on r2d machine (5/5) tests/acceptance/boot_linux_console.py:BootLinuxTracing.test_sh4_r= 2d: / trace: 22770@1539434809.450006:usb_ohci_init_time usb_bit_time=3D1000000 = usb_frame_time=3D83 trace: 22770@1539434809.453017:usb_ohci_port_attach port #0 trace: 22770@1539434809.454827:usb_ohci_reset sysbus-ohci trace: 22770@1539434809.454833:usb_ohci_stop sysbus-ohci: USB Suspended trace: 22770@1539434809.454835:usb_ohci_stop sysbus-ohci: USB Suspended trace: 22770@1539434809.454837:usb_ohci_port_detach port #0 trace: 22770@1539434809.454839:usb_ohci_port_attach port #0 trace: 22770@1539434811.588702:usb_ohci_reset sysbus-ohci trace: 22770@1539434811.588711:usb_ohci_stop sysbus-ohci: USB Suspended trace: 22770@1539434811.589062:usb_ohci_set_ctl sysbus-ohci: new state 0x= 80 trace: 22770@1539434811.589067:usb_ohci_start sysbus-ohci: USB Operational trace: 22770@1539434811.589253:usb_ohci_hub_power_up powered up all ports PASS (2.43 s) RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | = CANCEL 3 JOB TIME : 2.67 s Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 8f99cc0d7c..e11993bf98 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -8,11 +8,22 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 +import os import logging import subprocess =20 from avocado import skip from avocado_qemu import Test +from avocado.utils.wait import wait_for + + +def read_stream_for_string(stream, expected_string, logger=3DNone): + msg =3D stream.readline() + if len(msg) =3D=3D 0: + return False + if logger: + logger.debug(msg.strip()) + return expected_string in msg =20 =20 class BootLinuxConsole(Test): @@ -185,3 +196,56 @@ class BootLinuxConsole(Test): break if 'Kernel panic - not syncing' in msg: self.fail("Kernel panic reached") + +class BootLinuxTracing(Test): + """ + Boots a Linux kernel and checks that via the Tracing framework that + a specific trace events occured, demostrating the kernel is operationa= l. + + :avocado: enable + """ + + timeout =3D 60 + + 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' + trace_path =3D os.path.join(self.workdir, 'trace.log') + trace_logger =3D logging.getLogger('trace') + + self.vm.set_arch(self.arch) + self.vm.set_machine('r2d') + kernel_command_line =3D 'noiotrap' + self.vm.add_args('-trace', "enable=3Dusb_ohci_*,file=3D" + trace_p= ath, + '-kernel', kernel_path, + '-append', kernel_command_line) + + self.vm.launch() + if not wait_for(read_stream_for_string, timeout=3D15, step=3D0, + args=3D(open(trace_path), + 'usb_ohci_hub_power_up powered up all ports', + trace_logger)): + self.fail("Machine failed to boot") --=20 2.19.1