From patchwork Tue Aug 11 00:46:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Havard Skinnemoen X-Patchwork-Id: 276766 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-25.6 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 052CCC433E0 for ; Tue, 11 Aug 2020 00:54:42 +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 C26CE206C3 for ; Tue, 11 Aug 2020 00:54:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cMPxpqeS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C26CE206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5IYr-0003hS-0i for qemu-devel@archiver.kernel.org; Mon, 10 Aug 2020 20:54:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3a-oxXwsKCggp0sqvvmuwmvowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--hskinnemoen.bounces.google.com>) id 1k5IR5-0007XS-5y for qemu-devel@nongnu.org; Mon, 10 Aug 2020 20:46:39 -0400 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]:56580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3a-oxXwsKCggp0sqvvmuwmvowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--hskinnemoen.bounces.google.com>) id 1k5IR3-0004l9-9t for qemu-devel@nongnu.org; Mon, 10 Aug 2020 20:46:38 -0400 Received: by mail-yb1-xb4a.google.com with SMTP id w11so14790067ybi.23 for ; Mon, 10 Aug 2020 17:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=0UcimtGeCCXoNUS6I6jShi3xFp1h7udGR+4azPU9LSI=; b=cMPxpqeSksrU5hfY8e9DvT8q377Ae2Glu2DwRMvMlBBC+6BCdJYmbqwPDa/YvjPUZS ZFGhWQoibEiKlgrK8CN8g/UP+geKPowNL1pNnjmA4bAmM9PCdSjDxmnPzE19Kbzi49Xv Sup1FwqR8c6gD6JznOLuxOP7EW94OHGw7aLqow4Paz7aDcl8OndFtVUQoSoXYUvN1sZC lvh2pMtQGszZU8OV0iUEmeiIcs5jZ0VU+61Dgc8eTW7z41GT5RsRPYv9LP2lS7LH5jT1 TJWPH6VlGiVLzxHrUPKKSDXyVHnfhMnnpIdHmpfGsZ7sB62/k1w/q29c88OxsBxGOJpW n9YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=0UcimtGeCCXoNUS6I6jShi3xFp1h7udGR+4azPU9LSI=; b=qlZf+8vStLqttu1U4qyqwO+YWsHOW/1wmeqZnN40BLr+gd6XmSYZRrfoKA29M77u7c goxAN1IspKNJulq+KAvgA03425d3jEXqgEcglPeB52iN6KMy4eXVsJBIek5q2djeRqey kXDRXIHIM0vpOAIVl2RgE3mmsLq0A7xRtm82Ai8qEMPNJtkN23Z7b4G3vLR5DJgzrJRR OnvVOstJuiyov+HttKElNru3aa+dgJnP9aZk+MmDR9IQEXfLo3m9OYSOVAB4Y81xYIbP DNQUmmikqTHHcCZhckJn827V93XYjobLUo9K3CHGn+qyHM/LMNXmWSRsebJZZYcspJnx aSZg== X-Gm-Message-State: AOAM533cMXBClYhI843lKXzgGZfqRW8MM2W8uOBPURWaCm3CeHlJpOKW cq2AxHG1DordQMelhpZCkPmNotSqnEwYdtZULQ== X-Google-Smtp-Source: ABdhPJx2pFjIbkbVBm9iaHMclL3QIoFNh5gtYMSZNDoMj/o+kkHFm11apy57SgS6imN8zGQDsv2s45DijBtpuhQiBA== X-Received: by 2002:a25:ed6:: with SMTP id 205mr44310045ybo.315.1597106795269; Mon, 10 Aug 2020 17:46:35 -0700 (PDT) Date: Tue, 11 Aug 2020 00:46:07 +0000 In-Reply-To: <20200811004607.2133149-1-hskinnemoen@google.com> Message-Id: <20200811004607.2133149-14-hskinnemoen@google.com> Mime-Version: 1.0 References: <20200811004607.2133149-1-hskinnemoen@google.com> X-Mailer: git-send-email 2.28.0.236.gb10cc79966-goog Subject: [PATCH v7 13/13] tests/acceptance: console boot tests for quanta-gsj From: Havard Skinnemoen To: peter.maydell@linaro.org, f4bug@amsat.org, clg@kaod.org, joel@jms.id.au Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, Avi.Fishman@nuvoton.com, kfting@nuvoton.com, Havard Skinnemoen Received-SPF: pass client-ip=2607:f8b0:4864:20::b4a; envelope-from=3a-oxXwsKCggp0sqvvmuwmvowwotm.kwuymu2-lm3mtvwvov2.wzo@flex--hskinnemoen.bounces.google.com; helo=mail-yb1-xb4a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -105 X-Spam_score: -10.6 X-Spam_bar: ---------- X-Spam_report: (-10.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-1, 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, USER_IN_DEF_DKIM_WL=-7.5 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This adds two acceptance tests for the quanta-gsj machine. One test downloads a lightly patched openbmc flash image from github and verifies that it boots all the way to the login prompt. The other test downloads a kernel, initrd and dtb built from the same openbmc source and verifies that the kernel detects all CPUs and boots to the point where it can't find the root filesystem (because we have no flash image in this case). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Havard Skinnemoen --- tests/acceptance/boot_linux_console.py | 65 ++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 73cc69c499..8592f33a41 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -569,6 +569,71 @@ class BootLinuxConsole(LinuxKernelTest): 'sda') # cubieboard's reboot is not functioning; omit reboot test. + def test_arm_quanta_gsj(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:quanta-gsj + """ + # 25 MiB compressed, 32 MiB uncompressed. + image_url = ( + 'https://github.com/hskinnemoen/openbmc/releases/download/' + '20200711-gsj-qemu-0/obmc-phosphor-image-gsj.static.mtd.gz') + image_hash = '14895e634923345cb5c8776037ff7876df96f6b1' + image_path_gz = self.fetch_asset(image_url, asset_hash=image_hash) + image_name = 'obmc.mtd' + image_path = os.path.join(self.workdir, image_name) + archive.gzip_uncompress(image_path_gz, image_path) + + self.vm.set_console() + drive_args = 'file=' + image_path + ',if=mtd,bus=0,unit=0' + self.vm.add_args('-drive', drive_args) + self.vm.launch() + + self.wait_for_console_pattern('> BootBlock by Nuvoton') + self.wait_for_console_pattern('>Device: Poleg BMC NPCM730') + self.wait_for_console_pattern('>Skip DDR init.') + self.wait_for_console_pattern('U-Boot ') + self.wait_for_console_pattern('Booting Linux on physical CPU 0x0') + self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0') + self.wait_for_console_pattern('OpenBMC Project Reference Distro') + self.wait_for_console_pattern('gsj login:') + + def test_arm_quanta_gsj_initrd(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:quanta-gsj + """ + initrd_url = ( + 'https://github.com/hskinnemoen/openbmc/releases/download/' + '20200711-gsj-qemu-0/obmc-phosphor-initramfs-gsj.cpio.xz') + initrd_hash = '98fefe5d7e56727b1eb17d5c00311b1b5c945300' + initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + kernel_url = ( + 'https://github.com/hskinnemoen/openbmc/releases/download/' + '20200711-gsj-qemu-0/uImage-gsj.bin') + kernel_hash = 'fa67b2f141d56d39b3c54305c0e8a899c99eb2c7' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + dtb_url = ( + 'https://github.com/hskinnemoen/openbmc/releases/download/' + '20200711-gsj-qemu-0/nuvoton-npcm730-gsj.dtb') + dtb_hash = '18315f7006d7b688d8312d5c727eecd819aa36a4' + dtb_path = self.fetch_asset(dtb_url, asset_hash=dtb_hash) + + self.vm.set_console() + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'console=ttyS0,115200n8 ' + 'earlycon=uart8250,mmio32,0xf0001000') + self.vm.add_args('-kernel', kernel_path, + '-initrd', initrd_path, + '-dtb', dtb_path, + '-append', kernel_command_line) + self.vm.launch() + + self.wait_for_console_pattern('Booting Linux on physical CPU 0x0') + self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0') + self.wait_for_console_pattern( + 'Give root password for system maintenance') + def test_arm_orangepi(self): """ :avocado: tags=arch:arm