From patchwork Wed Jan 8 20:00:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Niek Linnenbank X-Patchwork-Id: 11324535 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FBC913A0 for ; Wed, 8 Jan 2020 20:07:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3648C2073A for ; Wed, 8 Jan 2020 20:07:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I2fE1rPW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3648C2073A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipHbh-0000pW-Cq for patchwork-qemu-devel@patchwork.kernel.org; Wed, 08 Jan 2020 15:07:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35709) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipHVf-0001VC-HW for qemu-devel@nongnu.org; Wed, 08 Jan 2020 15:00:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipHVc-0002jL-N7 for qemu-devel@nongnu.org; Wed, 08 Jan 2020 15:00:55 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:38895) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ipHVc-0002hu-EN; Wed, 08 Jan 2020 15:00:52 -0500 Received: by mail-wm1-x341.google.com with SMTP id u2so216605wmc.3; Wed, 08 Jan 2020 12:00:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=abuJiz5zWdyJ/CxH78fn4z3ySkdVr9/Q8yCzhfi86YQ=; b=I2fE1rPW3S7z7nR945NS6ioIxTUgLlg2rgkZqmqCWrsz3CrF19sl89zVrvGGpvXF2G FrPLgootpR4McDaX51gzzH/q/n3zzSDBU1NwVE9M8zAX6c0PQluTaIhsMeosz/BJw++q YXZycPS0iT7ImVUTsZ4TOlD81AtEYyCPcStrJxv3HVvsXsUtAEqbJqW9X7SSE9J5wrzq XvnHTjWNV3ZVbIAMS72wPrWunc1ZbEiwzQFv7NM0dHAp9gdhsAnh0Dq+PWwYKpC/jJ6/ 1kvMxLmI5TnuCKCX5CYueguWW8oo48PXbBY/7x3qi4F6DJnE6jnbHMz19S6UHjM7LuVF ZAug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=abuJiz5zWdyJ/CxH78fn4z3ySkdVr9/Q8yCzhfi86YQ=; b=FbHRYEiMJ8Kg5scrZ+zzWQKMCYhkSmJ8vRPbuxcct4smEaiOEIuy2CHiIvd/UV8QiN bKLwDv1JR/TjJXGi1WX7/XSjgv23XF8OYhHemgYuTZTKAT2nOsFTbFWCDz2gFvDDhuhK FW/VMCs2z/GiPDM/vYFP6JLwNAVFbxKB2hNzhbmuI6SpopYB459RPmgrCfb6w/QEygss EKgUAPifftcUiZT87s4Qdzx73GJSUKVEF3RyGANvf/g8551KIRj1KvRCP0K6Rb6Oz0Qg PzXOx9DG1/n0mxdEc7W3B5/CbQ+CGdjiLxROCqvI5uBPtTnGFdiiQy/lsoaw8lMuXj0C MMVA== X-Gm-Message-State: APjAAAXCszRMn7xI7+i4V7pHEZbgAfRUWQfRFGKjK5kydTiqiL7/s0Ta EIdG0kzeO2NTnBZrxcAYBX5fxpfq X-Google-Smtp-Source: APXvYqxxsx42BDNzIdi8HCWiY8PapnUsDGWamyiO9WYgw417TSeAk88JgJNaUNVvou505CSklTXxTw== X-Received: by 2002:a7b:c934:: with SMTP id h20mr316573wml.103.1578513651172; Wed, 08 Jan 2020 12:00:51 -0800 (PST) Received: from pavilion.home ([2a02:a456:6be8:1:8edc:d4ff:fe8b:18b7]) by smtp.gmail.com with ESMTPSA id u18sm4970099wrt.26.2020.01.08.12.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 12:00:50 -0800 (PST) From: Niek Linnenbank To: qemu-devel@nongnu.org Subject: [PATCH v3 16/17] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC Date: Wed, 8 Jan 2020 21:00:19 +0100 Message-Id: <20200108200020.4745-17-nieklinnenbank@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200108200020.4745-1-nieklinnenbank@gmail.com> References: <20200108200020.4745-1-nieklinnenbank@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Niek Linnenbank , qemu-arm@nongnu.org, philmd@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé This test boots Ubuntu Bionic on a OrangePi PC board. As it requires 1GB of storage, and is slow, this test is disabled on automatic CI testing. It is useful for workstation testing. Currently Avocado timeouts too quickly, so we can't run userland commands. The kernel image and DeviceTree blob are built by the Armbian project (based on Debian): https://www.armbian.com/orange-pi-pc/ The Ubuntu image is downloaded from: https://dl.armbian.com/orangepipc/Bionic_current This test can be run using: $ AVOCADO_ALLOW_LARGE_STORAGE=yes \ avocado --show=app,console run -t machine:orangepi-pc \ tests/acceptance/boot_linux_console.py console: U-Boot SPL 2019.04-armbian (Nov 18 2019 - 23:08:35 +0100) console: DRAM: 1024 MiB console: Failed to set core voltage! Can't set CPU frequency console: Trying to boot from MMC1 console: U-Boot 2019.04-armbian (Nov 18 2019 - 23:08:35 +0100) Allwinner Technology console: CPU: Allwinner H3 (SUN8I 0000) console: Model: Xunlong Orange Pi PC console: DRAM: 1 GiB console: MMC: mmc@1c0f000: 0 [...] console: Uncompressing Linux... done, booting the kernel. console: Booting Linux on physical CPU 0x0 console: Linux version 5.3.9-sunxi (root@builder) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #19.11.3 SMP Mon Nov 18 18:49:43 CET 2019 console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d console: CPU: div instructions available: patching division code console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache console: OF: fdt: Machine model: Xunlong Orange Pi PC [...] console: EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null) console: done. console: Begin: Running /scripts/local-bottom ... done. console: Begin: Running /scripts/init-bottom ... done. console: systemd[1]: systemd 237 running in system mode. (...) console: systemd[1]: Detected architecture arm. console: Welcome to Ubuntu 18.04.3 LTS! console: systemd[1]: Set hostname to . Signed-off-by: Philippe Mathieu-Daudé [NL: rename in commit message Raspbian to Armbian] [NL: changed test to boot from SD card via BootROM] Signed-off-by: Niek Linnenbank --- tests/acceptance/boot_linux_console.py | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index d663106694..55d0b8b036 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -509,6 +509,48 @@ class BootLinuxConsole(Test): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system') + @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited') + def test_arm_orangepi_bionic(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:orangepi-pc + """ + + # This test download a 196MB compressed image and expand it to 932MB... + image_url = ('https://dl.armbian.com/orangepipc/archive/' + 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z') + image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e' + image_path_7z = self.fetch_asset(image_url, asset_hash=image_hash) + image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img' + image_path = os.path.join(self.workdir, image_name) + process.run("7z e -o%s %s" % (self.workdir, image_path_7z)) + + self.vm.set_machine('orangepi-pc') + self.vm.set_console() + self.vm.add_args('-drive', 'file=' + image_path + ',if=sd,format=raw', + '-nic', 'user', + '-no-reboot') + self.vm.launch() + + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'console=ttyS0,115200 ' + 'loglevel=7 ' + 'nosmp ' + 'systemd.default_timeout_start_sec=9000 ' + 'systemd.mask=armbian-zram-config.service ' + 'systemd.mask=armbian-ramlog.service') + + self.wait_for_console_pattern('U-Boot SPL') + self.wait_for_console_pattern('Autoboot in ') + exec_command_and_wait_for_pattern(self, ' ', '=>') + exec_command_and_wait_for_pattern(self, "setenv extraargs '" + + kernel_command_line + "'", '=>') + exec_command_and_wait_for_pattern(self, 'boot', 'Starting kernel ...'); + + self.wait_for_console_pattern('systemd[1]: Set hostname ' + + 'to ') + self.wait_for_console_pattern('Starting Load Kernel Modules...') + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=arch:s390x