From patchwork Thu Mar 4 13:50:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1447332 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=85.214.62.61; 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=dUwtCbJB; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DrsnB6Jb5z9sSC for ; Fri, 5 Mar 2021 00:54:54 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A61482861; Thu, 4 Mar 2021 14:52:42 +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="dUwtCbJB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 79A73827C3; 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-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) (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 825E38279C for ; Thu, 4 Mar 2021 14:51:59 +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-x331.google.com with SMTP id h10so16616398otm.1 for ; Thu, 04 Mar 2021 05:51:59 -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=UoC/8qj20jVCDa95uSARZipULHAHynYl4NFHT4Y5clg=; b=dUwtCbJBMXqyMLqLp3e3Lfta2s7stUT+qJu8CbAU3zaKlyt8sZbWZBjTeEndsfiHpY HHjhXB/4HyEVJ2roASg6L6Zy/M3BtYPwDBBaiQokd9luvF9TaV4om0MbsyCKHgN7vOjG 4jGajgMzYrcP7ckjg1JOTBsZsK/+TfElrBZcE= 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=UoC/8qj20jVCDa95uSARZipULHAHynYl4NFHT4Y5clg=; b=kFgTe+ukrxmlTeU5phU1wX2SCyoMv8oNWFN4HwR7H4QyYTHkdZ4as/GTlfpBWKr/Ba 1eGXw2zvXwLw8V7ZDtHOgPW42VDPioNlPG0hicE8+6BcaHwqAtEIVVPikby2xiGRv8Iu vsfV3EBCZ8yZytezVATOzBcL5oufbIeefCoQl6m9gdhjBKN54bHdnbelGDjFimjfhbtD eDP/UnTQVLSrH3sUcVEazu/HOcPV1nW3KAESXQ+1oDmV8qBp1ukRKYfgt5CoHfmfH2nE tg9u0CXUfXkUMPggt9MDRF4ec/k6EHPhx+TGTaaqKJe1Krh0EeUlJ2ZO3NADLG3ki2UE IoOQ== X-Gm-Message-State: AOAM533RxpJQ9lJHhGCH9mpSeMAqacsTQgUhCuvZM2F6M7zC7bNz+msp CrxNGA7hK8s5TSgeXVBvCyUWMTxX7Vs0bRIP X-Google-Smtp-Source: ABdhPJx3fXNqkRRwlZo73Lz2gl7arP9XFyIfijzGgWrrBvGmpZyEbO/jk/mrO3NW4YcgSKFpDRhCVw== X-Received: by 2002:a9d:335:: with SMTP id 50mr3383791otv.44.1614865917786; Thu, 04 Mar 2021 05:51:57 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 05:51:57 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Stephen Warren , Stephen Warren , Simon Glass Subject: [PATCH v4 16/42] test: Move dm_scan_plat() to test_pre_run() Date: Thu, 4 Mar 2021 06:50:52 -0700 Message-Id: <20210304135118.643277-16-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 | 2 -- test/test-main.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c index c2e1a1b9207..18877c7ae56 100644 --- a/test/dm/test-dm.c +++ b/test/dm/test-dm.c @@ -74,8 +74,6 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, ut_assertok(dm_test_init(uts, of_live)); uts->start = mallinfo(); - if (test->flags & UT_TESTF_SCAN_PDATA) - ut_assertok(dm_scan_plat(false)); ut_assertok(test_pre_run(uts, test)); diff --git a/test/test-main.c b/test/test-main.c index bd2f08a2b42..fe96d739dc4 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -34,6 +34,9 @@ int test_pre_run(struct unit_test_state *uts, struct unit_test *test) if (!(test->flags & UT_TESTF_DM)) uts->start = mallinfo(); + if (test->flags & UT_TESTF_SCAN_PDATA) + ut_assertok(dm_scan_plat(false)); + if (test->flags & UT_TESTF_PROBE_TEST) ut_assertok(do_autoprobe(uts));