From patchwork Thu Mar 4 13:50:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1447331 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=C7at7YLi; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Drsn05xJ6z9sVt for ; Fri, 5 Mar 2021 00:54:44 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 718E082850; Thu, 4 Mar 2021 14:52:39 +0100 (CET) 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="C7at7YLi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98988827BE; Thu, 4 Mar 2021 14:52:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 9502282708 for ; Thu, 4 Mar 2021 14:51:57 +0100 (CET) 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-ot1-x334.google.com with SMTP id v12so26170983ott.10 for ; Thu, 04 Mar 2021 05:51:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LPuzUuTuRWZatBbrnr4ibvomPxw1MF0uxdyjApIfcVk=; b=C7at7YLijT9kJ24KU6T70JBz07JkHj2mK7SiTGIIYK15UByYKDP4uQPT9guwW99QVr y4mk6JWD++50usqQYMPayERvWvPt/eA3NL1GuadVSYhxtQCGhyhQkpAzJWVF+dK9MGpn IkzsKx4WwDLO303sqmVqZIM9XQcrCteGywlwg= 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=LPuzUuTuRWZatBbrnr4ibvomPxw1MF0uxdyjApIfcVk=; b=IyYRIGoCCyGOTbhcH/+JG8TLlxxmC1hw1lBYD/YysWPsD/eKq5geUNnW71WU9arx78 1XI5wyZD0yP61EM8ZpXLIaW5hSr/jxYkn6gIAW+AGoH/tA2z3YxhJkPTuRHuJ2ITBHlC Y7nV/vDlywInBB9zdGm4fYNXsu4THry5GcO/Oem5lx0Kew//X+fpwxGV5E4d6PhKxwpF hZNqbZUJxTKIOPYVON8TqAdyz1RKJJNL2E7lOCSLCfhbepQ5Tj6GSkkR56y3hHqTSBTD p9TJzRYy99tIFnPoClyMCOrbEHhTl7PbiVpzjdUjzuulEgcJ2GvKOtMZjuWGaOwp0Xa7 7mwQ== X-Gm-Message-State: AOAM533ckwhlo8MpDIHeo5bhYKmd6PSZHKadhmz1EDU1iwN6ETaG+jvT dFE5O2HvuEwf7yzIWNq0cfND9K+gjvh2PqMu X-Google-Smtp-Source: ABdhPJz/CsRtZQYEY97mGLu1rkbk4K1f/QmddMRf0maVNx/efdbivZkgcBosG/VGg5bp46h7vmm3tw== X-Received: by 2002:a9d:19a3:: with SMTP id k32mr3505749otk.189.1614865916053; Thu, 04 Mar 2021 05:51:56 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x10sm4029465otp.19.2021.03.04.05.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 05:51:55 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Stephen Warren , Stephen Warren , Simon Glass Subject: [PATCH v4 14/42] test: Move dm_extended_scan() to test_pre_run() Date: Thu, 4 Mar 2021 06:50:50 -0700 Message-Id: <20210304135118.643277-14-sjg@chromium.org> X-Mailer: git-send-email 2.30.1.766.gb4fecdf3b7-goog In-Reply-To: <20210304135118.643277-1-sjg@chromium.org> References: <20210304135118.643277-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean Move this step over to the pre-run function. Signed-off-by: Simon Glass --- (no changes since v1) test/dm/test-dm.c | 3 --- test/test-main.c | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c index 69a0349d04c..4cb0da13b7c 100644 --- a/test/dm/test-dm.c +++ b/test/dm/test-dm.c @@ -93,9 +93,6 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, ut_assertok(dm_scan_plat(false)); if (test->flags & UT_TESTF_PROBE_TEST) ut_assertok(do_autoprobe(uts)); - if (!CONFIG_IS_ENABLED(OF_PLATDATA) && - (test->flags & UT_TESTF_SCAN_FDT)) - ut_assertok(dm_extended_scan(false)); ut_assertok(test_pre_run(uts, test)); diff --git a/test/test-main.c b/test/test-main.c index 9c600094740..a971fe0e9c8 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -6,7 +6,10 @@ #include #include +#include +#include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -16,6 +19,10 @@ int test_pre_run(struct unit_test_state *uts, struct unit_test *test) if (!(test->flags & UT_TESTF_DM)) uts->start = mallinfo(); + if (!CONFIG_IS_ENABLED(OF_PLATDATA) && + (test->flags & UT_TESTF_SCAN_FDT)) + ut_assertok(dm_extended_scan(false)); + if (test->flags & UT_TESTF_CONSOLE_REC) { int ret = console_record_reset_enable();