From patchwork Thu Mar 4 13:51:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1447346 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=n7ZLlyJ2; 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 4Drsr46J7Rz9sRf for ; Fri, 5 Mar 2021 00:57:24 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19520828D3; Thu, 4 Mar 2021 14:53:30 +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="n7ZLlyJ2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CAEA98284C; Thu, 4 Mar 2021 14:52:29 +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-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) (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 5BA6F827BF for ; Thu, 4 Mar 2021 14:52:13 +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-oo1-xc2d.google.com with SMTP id z22so6587371oop.0 for ; Thu, 04 Mar 2021 05:52:13 -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=Nc2gzDZybu9uORBJuPMy3uHYK2P/DiNyt+1qjMpNLa8=; b=n7ZLlyJ2epp+jurUFGVrnQq6kKfXMsK4YsDj0iDJqRNCMp/9Q4u3Y5dqQ5yqXRySY0 /ncK3Y11cxVkg2m2yEoKi2ge8hox0IkbECNcLdZUHntRgjiKLETO2WEgXg9+DgAgxBiL CWQk1iwRnGggLN6M+MOR7Ylh0WB2t+OXCFyzw= 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=Nc2gzDZybu9uORBJuPMy3uHYK2P/DiNyt+1qjMpNLa8=; b=C72LVroDyGvsMoVyCV6ZFkMeY1InW5rYPUMVaIm9a7DlBXk0ux1poDNX8mOcKDjZjO 7MEZnBoidRKTy9rW34cNVxlfMKKSj3Jn3g5G1B837dWsSctdV0QuCvj4tFrlhfYg0i7p xvtuknai3nHSBSFBKJl51T/huEDYi5+/b5dSVmS9CQXZ7uS9/hhVHDZiIw6pBVdkVTkv YMNabexGwolbQJ+xaMqOfEu6e52t622ZkvQ3g/zYunO4SU59yBfr9bHGN98Rq9UhUnUz iwF2zx3yrsobyAgp8JO9hw4XQEH1wXc5au1YNDaDeM4516lPsamql4R/QXfN7OeyTI+o UYhw== X-Gm-Message-State: AOAM531Hhd29ESpSkj6gcQF6ZN+93CvshOA6pCISNOhqiSusrvx0l+wh cshWByhpOe+4yJIskIIOOuMN46DpaDVB1/Tq X-Google-Smtp-Source: ABdhPJzJqTxzC6Rzw5Dp18cjwg5rXssdSLxXzqnwG6VJPDEUW8p1ju/JDIVBui5iZKTjLJIpb+pAow== X-Received: by 2002:a4a:e1e4:: with SMTP id u4mr3375589ood.41.1614865927798; Thu, 04 Mar 2021 05:52:07 -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.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 05:52:07 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Stephen Warren , Stephen Warren , Simon Glass Subject: [PATCH v4 26/42] test: Drop dm_do_test() Date: Thu, 4 Mar 2021 06:51:02 -0700 Message-Id: <20210304135118.643277-26-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 In an effort to make use of a common test runner, use ut_run_test() directly to run driver model tests. Signed-off-by: Simon Glass --- (no changes since v1) test/dm/test-dm.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c index b01123c7409..de41fc09db0 100644 --- a/test/dm/test-dm.c +++ b/test/dm/test-dm.c @@ -22,15 +22,6 @@ DECLARE_GLOBAL_DATA_PTR; struct unit_test_state global_dm_test_state; -static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, - bool of_live) -{ - uts->of_live = of_live; - ut_assertok(ut_run_test(uts, test, test->name)); - - return 0; -} - /** * dm_test_run_on_flattree() - Check if we should run a test with flat DT * @@ -103,7 +94,8 @@ int dm_test_run(const char *test_name) runs = 0; if (CONFIG_IS_ENABLED(OF_LIVE)) { if (!(test->flags & UT_TESTF_FLAT_TREE)) { - ut_assertok(dm_do_test(uts, test, true)); + uts->of_live = true; + ut_assertok(ut_run_test(uts, test, test->name)); runs++; } } @@ -114,7 +106,8 @@ int dm_test_run(const char *test_name) */ if (!(test->flags & UT_TESTF_LIVE_TREE) && (!runs || dm_test_run_on_flattree(test))) { - ut_assertok(dm_do_test(uts, test, false)); + uts->of_live = false; + ut_assertok(ut_run_test(uts, test, test->name)); runs++; } found++;