From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A29CC54EE9 for ; Sun, 25 Sep 2022 15:09:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C22AA84DA2; Sun, 25 Sep 2022 17:04:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="T+TKdnkG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DBCDF84C63; Sun, 25 Sep 2022 17:03:57 +0200 (CEST) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C586E84C5F for ; Sun, 25 Sep 2022 17:03:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd33.google.com with SMTP id v128so3406102ioe.12 for ; Sun, 25 Sep 2022 08:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=d0DIr0N1DdQmEIq7FRCR4/JOYkdoPOdw6QMLYV5hlL4=; b=T+TKdnkGXHeLJMX1cdeCBs8ctvpOtkfD1SqfvjvcafCxmJRwhKxHV2OozHaJcF2p0f g3K48XFSpz4WQFL/z5Dzutggse1CPYAZYMmtUyUN9SpoepJWD51ntYl6MGFQr81JgVCQ dinsMWr6BGRip11LqDwbUp1yr2p7rjM1K1r1Q= 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=d0DIr0N1DdQmEIq7FRCR4/JOYkdoPOdw6QMLYV5hlL4=; b=O1O/IJ0vvH6/c6NA14+CwC0xt1Tw86p+Gmnni2SliH2u2vbRDHArOBPqYsZa4/N7MQ Q4R+CeEuVzHmjBNsykGMMtyK/oGEE3zNilRF/T3tMWunAsAMd+LlXJIAKZk4Ts6aDzZF rkzvlBoZpQkvd/c7yDPmHUSbHNRbPivf3LBoPxvcWJ016rpojhZaOTW0XV6HW7hktjtp fyAKvC8eBGyf6BqJO3jnyUtEaoHqJumHz2xxzDH0i7vWFevoZWhF4x9xFbrplItkXARv mKzaYNCnFMwb/m6vwef8K6KcZFrXvGJsUpW4PT93Ofil/vqn6CfTCF6X8HC8NWFmqyAl pVyw== X-Gm-Message-State: ACrzQf1jbkV3U2MiTaJJyg/JQVLdUD0puuCzmg3YQFm7vC+t/14BA1Zz K/3Yk6TXsd1sMrHTZzj9St0qmiN0WOnxZQ== X-Google-Smtp-Source: AMsMyM6klYBbwAlDe+i595nxyXXNkMEZKrdAxZEyEX7tlZyU5S41xy4Ak94RUwIlEN4nVFCrkZ9wkA== X-Received: by 2002:a6b:cd0c:0:b0:68b:35ce:333a with SMTP id d12-20020a6bcd0c000000b0068b35ce333amr7819149iog.193.1664118233972; Sun, 25 Sep 2022 08:03:53 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id u19-20020a926013000000b002f19d9838c6sm5360578ilb.25.2022.09.25.08.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 08:03:53 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 41/45] vbe: Use a manual test Date: Sun, 25 Sep 2022 09:02:44 -0600 Message-Id: <20220925150248.2524421-42-sjg@chromium.org> X-Mailer: git-send-email 2.37.3.998.g577e59143f-goog In-Reply-To: <20220925150248.2524421-1-sjg@chromium.org> References: <20220925150248.2524421-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Use a manual test for the VBE test, so we can make the pytest and the C unit test work together properly. Signed-off-by: Simon Glass --- test/boot/vbe_fixup.c | 19 ++++++++----------- test/py/tests/test_vbe.py | 7 ++----- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/test/boot/vbe_fixup.c b/test/boot/vbe_fixup.c index 7f0f809499a..eba5c4ebe6c 100644 --- a/test/boot/vbe_fixup.c +++ b/test/boot/vbe_fixup.c @@ -13,21 +13,18 @@ #include #include "bootstd_common.h" -/* Basic test of reading nvdata and updating a fwupd node in the device tree */ -static int vbe_test_fixup(struct unit_test_state *uts) +/* + * Basic test of reading nvdata and updating a fwupd node in the device tree + * This test works when called from test_vbe.py and it must use the flat tree, + * since device tree fix-ups do not yet support live tree. + */ +static int vbe_test_fixup_norun(struct unit_test_state *uts) { ofnode chosen, node; const char *data; oftree tree; int size; - /* - * This test works when called from test_vbe.py and it must use the - * flat tree, since device tree fix-ups do not yet support live tree. - */ - if (!working_fdt) - return -EAGAIN; - tree = oftree_from_fdt(working_fdt); ut_assert(oftree_valid(tree)); @@ -55,5 +52,5 @@ static int vbe_test_fixup(struct unit_test_state *uts) return 0; } -BOOTSTD_TEST(vbe_test_fixup, - UT_TESTF_DM | UT_TESTF_SCAN_FDT | UT_TESTF_FLAT_TREE); +BOOTSTD_TEST(vbe_test_fixup_norun, UT_TESTF_DM | UT_TESTF_SCAN_FDT | + UT_TESTF_FLAT_TREE | UT_TESTF_MANUAL); diff --git a/test/py/tests/test_vbe.py b/test/py/tests/test_vbe.py index a39cf0b31c6..8b74bfde096 100644 --- a/test/py/tests/test_vbe.py +++ b/test/py/tests/test_vbe.py @@ -88,7 +88,7 @@ bootm loados bootm prep fdt addr fdt print -ut bootstd vbe_test_fixup +ut bootstd -f vbe_test_fixup_norun ''' @pytest.mark.boardspec('sandbox_flattree') @@ -121,7 +121,4 @@ def test_vbe(u_boot_console): with cons.log.section('Kernel load'): output = cons.run_command_list(cmd.splitlines()) - # This is a little wonky since there are two tests running in CI. The final - # one is the 'ut bootstd' command above - failures = [line for line in output if 'Failures' in line] - assert len(failures) >= 1 and 'Failures: 0' in failures[-1] + assert 'Failures: 0' in output[-1] -- 2.37.3.998.g577e59143f-goog