From nobody Mon Apr 29 02:01:21 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1558667897; cv=none; d=zoho.com; s=zohoarc; b=fQS6bg8xIWUsq+7dwp0HW3uZfpfgqwgQNosv7im9rAtyigWYQ4essVPdgVkGXgUsyb52qhyNGnDNRYsJu8dWnrT2LWDhJwcuPCcmTfbAn8nc+WtYnx4T6RH0LAE3GSErfjum1fkNoZRsJN5Ra5DBMgw6/mqY0Maqx5k40HtPpIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558667897; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=PG4FAiq5fqypNIHzKwV+MQbrRaZAlRnakvPm+gx1m6k=; b=VpkgS8RlC5tMQtkq5vcWDeU4Qsr3HPdc14IjzYhInJXEJqmYJD/se64cu5Rmf94uM/qA3P7JFVwr4zwniN+0WhfwZCf6oawukohVW/iqQUar9ZkEvTr9tkbWQcGPlm+TEBlHcVGIe7YuPSgRE6CnGu+ckSeyu8XYXw1jpdqjyIA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) 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 155866789767814.06329987696654; Thu, 23 May 2019 20:18:17 -0700 (PDT) Received: from localhost ([127.0.0.1]:46700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hU0iV-00057b-GP for importer@patchew.org; Thu, 23 May 2019 23:17:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hU0hi-0004kq-3m for qemu-devel@nongnu.org; Thu, 23 May 2019 23:17:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hU0hg-0008Kf-OL for qemu-devel@nongnu.org; Thu, 23 May 2019 23:17:10 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:35962) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hU0hg-0008Jt-DA for qemu-devel@nongnu.org; Thu, 23 May 2019 23:17:08 -0400 Received: by mail-wr1-x442.google.com with SMTP id s17so8367428wru.3 for ; Thu, 23 May 2019 20:17:08 -0700 (PDT) Received: from x1.local (228.red-83-52-173.dynamicip.rima-tde.net. [83.52.173.228]) by smtp.gmail.com with ESMTPSA id c207sm1141456wme.47.2019.05.23.20.17.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 20:17:05 -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:mime-version :content-transfer-encoding; bh=PG4FAiq5fqypNIHzKwV+MQbrRaZAlRnakvPm+gx1m6k=; b=FI32ZwNhPlVPrDB/ERy/rSK+rOrEOipSXfn9H0f7c18rpWaUS996GZ37lQ1ocPVRLU ClGrYsNFa943f9DeawCc8ECznQ5Kc8uijRZLCVt8BmUilz/iiSF+ohIV1e8+TjH3tKNw bK4Dmi7z0GOOuYRDljvUZuwuS/nH7v5Hle8IOjTxfAR87OgDUCwdDGdXv9j0HhrZAWJr GDx5oXAMk7SnI7berYsnxtNH3pqLv84cRNKhdBY+RcUJVe3gv1XSnVx9I5v2szkGB6Nk AF2dC6QtrALkuWndpXEe2k8NdgYM2Y9Wb1gjrKaz4I0A1n0tWMmnMqNNtkQ/eS7qnhFu ITqQ== 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 :mime-version:content-transfer-encoding; bh=PG4FAiq5fqypNIHzKwV+MQbrRaZAlRnakvPm+gx1m6k=; b=rAtVDUpZMamUrYGUq/K1QmnDPyy8GJ5cb+aBChJ/cqEvxtOGwcyUYfoHg8qnwBDGEK GG9L/EyTxYrnXY0SyFlUOPHcB55gScqq78SBRPdd8cjv1zp7QJCihVBkfPTRi+AooudT JQqIDR2OHEZ0llmnLWSAEQNH5JXeF6O5zMAuH3w2L+F8K2hTqG2HWjl4svgfUi7ASGkK 5vLSkjnQPlv169D9WShFkR/2AeqsMmoMFPZCS6qMjw/8eWeG3Jg4KEmqJdtLLq8xddJ5 YjL/Sp4mm0bJSPNpMTbWQtec3RiH0URuX6YOuRUnOBnmcmGyK5hUYcYYIAKnqvjB4lGu 3sJA== X-Gm-Message-State: APjAAAVg3cgBZcaD5L8oXqeJSVkA6GGgwpNWYnXdpag7wOJkqe6oGqPf b3dYAFueh8EXFOjMvDa8ez0b0EQtwXs= X-Google-Smtp-Source: APXvYqw9JwTOF5Tdz9j4OIoSOgXhRUfXH017K5rXBwwAPecmEotZdZFf3D076y7YTdzIHfmMM3gRBg== X-Received: by 2002:adf:c188:: with SMTP id x8mr4033408wre.256.1558667826711; Thu, 23 May 2019 20:17:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 24 May 2019 05:17:04 +0200 Message-Id: <20190524031704.24200-1-f4bug@amsat.org> X-Mailer: git-send-email 2.19.1 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::442 Subject: [Qemu-devel] [PATCH] BootLinuxConsoleTest: Test the RX-Virt 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Eduardo Habkost , Yoshinori Sato , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Add two tests for the rx-virt machine, based on the recommended test setup from Yoshinori Sato: https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg03586.html - U-Boot prompt - Linux kernel with Sash shell These are very quick tests: $ avocado run -t arch:rx tests/acceptance/boot_linux_console.py JOB ID : 84a6ef01c0b87975ecbfcb31a920afd735753ace JOB LOG : /home/phil/avocado/job-results/job-2019-05-24T05.02-84a6ef0/= job.log (1/2) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_rx_ub= oot: PASS (0.11 s) (2/2) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_rx_li= nux: PASS (0.45 s) RESULTS : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | = CANCEL 0 Tests can also be run with: $ avocado --show=3Dconsole run -t arch:rx tests/acceptance/boot_linux_con= sole.py console: U-Boot 2016.05-rc3-23705-ga1ef3c71cb-dirty (Feb 05 2019 - 21:56:= 06 +0900) console: Linux version 4.19.0+ (yo-satoh@yo-satoh-debian) (gcc version 9.= 0.0 20181105 (experimental) (GCC)) #137 Wed Feb 20 23:20:02 JST 2019 console: Built 1 zonelists, mobility grouping on. Total pages: 8128 ... console: SuperH (H)SCI(F) driver initialized console: 88240.serial: ttySC0 at MMIO 0x88240 (irq =3D 215, base_baud =3D= 0) is a sci console: console [ttySC0] enabled console: 88248.serial: ttySC1 at MMIO 0x88248 (irq =3D 219, base_baud =3D= 0) is a sci Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Based-on: 20190517045136.3509-1-richard.henderson@linaro.org "RX architecture support" --- tests/acceptance/boot_linux_console.py | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index d5c500ea30..f68aab1df8 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -45,6 +45,11 @@ class BootLinuxConsole(Test): fail =3D 'Failure message found in console: %s' % failure_= message self.fail(fail) =20 + def exec_command_and_wait_for_pattern(self, command, success_message): + command +=3D '\n' + self.vm.console_socket.sendall(command.encode()) + self.wait_for_console_pattern(success_message) + def extract_from_deb(self, deb, path): """ Extracts a file from a deb package into the test workdir @@ -217,3 +222,49 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_rx_uboot(self): + """ + :avocado: tags=3Darch:rx + :avocado: tags=3Dmachine:rx-virt + :avocado: tags=3Dendian:little + """ + uboot_url =3D ('https://acc.dl.osdn.jp/users/23/23888/u-boot.bin.g= z') + uboot_hash =3D '9b78dbd43b40b2526848c0b1ce9de02c24f4dcdb' + uboot_path =3D self.fetch_asset(uboot_url, asset_hash=3Duboot_hash) + uboot_path =3D archive.uncompress(uboot_path, self.workdir) + + self.vm.set_machine('rx-virt') + self.vm.set_console() + self.vm.add_args('-bios', uboot_path, + '-no-reboot') + self.vm.launch() + uboot_version =3D 'U-Boot 2016.05-rc3-23705-ga1ef3c71cb-dirty' + self.wait_for_console_pattern(uboot_version) + gcc_version =3D 'rx-unknown-linux-gcc (GCC) 9.0.0 20181105 (experi= mental)' + # FIXME limit baudrate on chardev, else we type too fast + #self.exec_command_and_wait_for_pattern('version', gcc_version) + + def test_rx_linux(self): + """ + :avocado: tags=3Darch:rx + :avocado: tags=3Dmachine:rx-virt + :avocado: tags=3Dendian:little + """ + dtb_url =3D ('https://acc.dl.osdn.jp/users/23/23887/rx-qemu.dtb') + dtb_hash =3D '7b4e4e2c71905da44e86ce47adee2210b026ac18' + dtb_path =3D self.fetch_asset(dtb_url, asset_hash=3Ddtb_hash) + kernel_url =3D ('http://acc.dl.osdn.jp/users/23/23845/zImage') + kernel_hash =3D '39a81067f8d72faad90866ddfefa19165d68fc99' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + self.vm.set_machine('rx-virt') + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'earlyco= n' + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-no-reboot') + self.vm.launch() + self.wait_for_console_pattern('Sash command shell (version 1.1.1)') + self.exec_command_and_wait_for_pattern('printenv', + 'TERM=3Dlinux') --=20 2.19.1