From patchwork Fri Jan 13 14:10:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 641977 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp251990pvb; Fri, 13 Jan 2023 07:03:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXtf8yhohwXy4YB/ndrCZoEBTL4yGGMFseE7Hqrv9NfHkdjs/IZKLw8JN2dG+Y+OSR/NEpfH X-Received: by 2002:a05:6000:1707:b0:2ae:d9e2:7c80 with SMTP id n7-20020a056000170700b002aed9e27c80mr27244235wrc.8.1673622236141; Fri, 13 Jan 2023 07:03:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673622236; cv=none; d=google.com; s=arc-20160816; b=PgvhFdZRpsedaKcASAT5LoR7kZp2dcV1SYZF66fgGIkqGvbNE6/iXVthwa+UMsXODM 7t3K7FqlZSA9PoBJAXH1FPA3LiPhsh09Tk3dhFI31STu7P8qtQJLTYL0m7vjZkMXLb8T f2w4MDy1qlprmkvCwMGwYQxPdS0ySh5Y2kwkZpwatAI4xvgC3f5nZBomxcd4t9ouXWbf rSoYLw6OnAiAXXckVaZ3Tkc4T73J0pewPH8UI+zCXYMiFFIFR/13l+7qG3reQfIN/tmX 55zdlvptBOMee32rVx1CB5z0TS13nwC7SbGYsCcGe3t952E+3TS7LmL3Z8+hzWuq1NOZ ReKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=iMMN6nvJLFr/G4zXkqeXauiYOdLOH+OhtPL6bqIWzyk=; b=uszJTKcXlHWPWf9z10caY52FfZHGUHf0EF3yGTM8fOd7sXYHduEy6LfUSRcqs8BEDw DmL4C4oB8ZMhY3zVEDd3nijRRmBAeMZoOVgdTRJ/YIv47kvBYzEBpWaNRZLZ+zmY+hkA 2XrqGp6BXWu0IEoodekl2iQgwHMXFZMDeWfisQxIy7JiZelxTEaFWKmAM8/RT23WETWJ Gs58/rcl0YgNRvSQGo5D+98qxYp3UN8QLKdnBFUsu8aw5tDNsP8tNJDkkn2qeWtIUaTl PL8EWu6SwgcbLMcExRusEbkNXM6kju1JOBmlGFF9RGFUXe2A6g82MuTwlcQ8ZYIZAycv Qylw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nLQihLgI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b2-20020a056000054200b0023658172048si15730681wrf.207.2023.01.13.07.03.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jan 2023 07:03:56 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nLQihLgI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGKmZ-0000tC-84; Fri, 13 Jan 2023 09:11:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGKmU-0000s2-7V for qemu-devel@nongnu.org; Fri, 13 Jan 2023 09:11:43 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGKmP-0003fQ-VT for qemu-devel@nongnu.org; Fri, 13 Jan 2023 09:11:40 -0500 Received: by mail-wm1-x334.google.com with SMTP id bi26-20020a05600c3d9a00b003d3404a89faso862982wmb.1 for ; Fri, 13 Jan 2023 06:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=iMMN6nvJLFr/G4zXkqeXauiYOdLOH+OhtPL6bqIWzyk=; b=nLQihLgIvsLLVp6YpGPAOHUMDytEsusHCcymmpHOxtmGUyrgj95ajPeyc8jm+lLJBt LEU3rIFfPcxledjLzg4md4uHJHEpULr9it9heuPQP/irx/CwUMBVU0yGL80BeSHBkoaP PtXsrm8gtE0avv7jfr7XQnSkre5PXYNiP7MjXkFeyDG0boMt/f6U1gjMt1oEkXaEqYLu GzKIt3VZEX3/uGtpccjoANvzJT22RgbXu2NzOCmWHY88Mp/uH1+8LmWmZNFAJn05xaOd 7kuW2X+QIr3Qw/QDiaJUYwlMjUGBkFpKHzi5onFGnK/g3HMDqrGak9+/w9uzhek7YPl3 P5vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iMMN6nvJLFr/G4zXkqeXauiYOdLOH+OhtPL6bqIWzyk=; b=SON/pqvQUuw+bvo5FPW60VkI2H/X9IUQKkoa4YAb1etil3Z+DA/G8G7TUckWByzfKv mJjw1h6BjPFjWAQlnKOVJPxaohW9zHSZA3FoZkFevAtclUIHs4s/r1ogb1Lo3MAknRal VtG+eiTeK3kNUI2oSRrmSCtH/ybnO8EVbNfQ3AImsh4r81DVx/lO9WHR5VJ6+VKVdX6o DoXIIp2QqfK7xefNDhB7Fe6Od7W/c2Q2g7wW0R0Zmz1VHmZD1n/P0lrgqwTEZY9JmhsX 1gASygUzh6OPM5qj8s42tIOqcRnMm9dcCQj88zf9KZsol3Mn4PD4MPVqe48MIYsoQyHI bkyg== X-Gm-Message-State: AFqh2kqyumB1MnWWpOhzWfysZyveRSqeFjML9N3hLcCTw+bFhZjz16La rnnlZ9RdLDoNYonmJfy+AzuEErYHGrxpCqkn X-Received: by 2002:a05:600c:1c9d:b0:3d1:f3eb:c718 with SMTP id k29-20020a05600c1c9d00b003d1f3ebc718mr69726435wms.19.1673619095951; Fri, 13 Jan 2023 06:11:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n36-20020a05600c502400b003da0b75de94sm5334464wmr.8.2023.01.13.06.11.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 06:11:35 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/38] tests/avocado: Add SD boot test to Cubieboard Date: Fri, 13 Jan 2023 14:10:57 +0000 Message-Id: <20230113141126.535646-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230113141126.535646-1-peter.maydell@linaro.org> References: <20230113141126.535646-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Strahinja Jankovic Cubieboard now can boot directly from SD card, without the need to pass `-kernel` parameter. Update Avocado tests to cover this functionality. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank Tested-by: Niek Linnenbank Message-id: 20221226220303.14420-8-strahinja.p.jankovic@gmail.com Signed-off-by: Peter Maydell --- tests/avocado/boot_linux_console.py | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index ec07c64291d..8c1d9815861 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -620,6 +620,53 @@ def test_arm_cubieboard_sata(self): 'sda') # cubieboard's reboot is not functioning; omit reboot test. + @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited') + def test_arm_cubieboard_openwrt_22_03_2(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:cubieboard + :avocado: tags=device:sd + """ + + # This test download a 7.5 MiB compressed image and expand it + # to 126 MiB. + image_url = ('https://downloads.openwrt.org/releases/22.03.2/targets/' + 'sunxi/cortexa8/openwrt-22.03.2-sunxi-cortexa8-' + 'cubietech_a10-cubieboard-ext4-sdcard.img.gz') + image_hash = ('94b5ecbfbc0b3b56276e5146b899eafa' + '2ac5dc2d08733d6705af9f144f39f554') + image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash, + algorithm='sha256') + image_path = archive.extract(image_path_gz, self.workdir) + image_pow2ceil_expand(image_path) + + 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 + + 'usbcore.nousb ' + 'noreboot') + + self.wait_for_console_pattern('U-Boot SPL') + + interrupt_interactive_console_until_pattern( + self, 'Hit any key to stop autoboot:', '=>') + 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( + 'Please press Enter to activate this console.') + + exec_command_and_wait_for_pattern(self, ' ', 'root@') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'Allwinner sun4i/sun5i') + # cubieboard's reboot is not functioning; omit reboot test. + @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') def test_arm_quanta_gsj(self): """