Message ID | 20210208041807.4079084-4-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) 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=YYh952he; 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 4DYt9q4p4yz9sVJ for <incoming@patchwork.ozlabs.org>; Mon, 8 Feb 2021 15:20:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B64D78287F; Mon, 8 Feb 2021 05:19: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=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="YYh952he"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B5F5082870; Mon, 8 Feb 2021 05:18:30 +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.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 C6E6482854 for <u-boot@lists.denx.de>; Mon, 8 Feb 2021 05:18:25 +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-io1-xd31.google.com with SMTP id j5so13566826iog.11 for <u-boot@lists.denx.de>; Sun, 07 Feb 2021 20:18:25 -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=KbWk2Rd0FuTJNJda1NYE9YaMTpRKpUeLJDH/LSaG3rY=; b=YYh952he+MGFlfL+5WLDGsouqEk7IMr4FFfKQwn89rqyxN7KRhJ3bmPByxOaZ40Hxg 2FZtLPWZzvZhdKEoPSB2SGy+LPvzyuFeOsTqEXLqPLF1ezHUWqBUXqO03pseKW+1qxMm qkraKBetzSJnY29CflGq8uUO+AKWzulapRVs8= 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=KbWk2Rd0FuTJNJda1NYE9YaMTpRKpUeLJDH/LSaG3rY=; b=nrXDlRlPYUGg1RG24D+xBJVh100Ew6K3w7ufhbo7c8dKv1nYzuTMf+aillvTmyt3LF c5jxRvUKDlEvPzDPzSThzqvwHV6UAZ1Db2JVvW9yGfqGAXh7K/gNfYeGSebIhs7BtmEo TUXuCXGafnQTfsYD+R7DDUvMpts1KF6ZHjFqkAhneatuc4xOHqQnHO2ZqjhRBtShLtEU JpT5R3XJkH+UBxnsBsZrNTA0gd0AhVWzSFl+HDQbA/nW4HUfjNKdCVWJeJA3SeBmoXoH Tl6HSQSk+M+pH5n2b6yJnFen2adnCKvDs45osOzePC3+lfx82A5cWCkJSRFFQJYNeMYy M9Ig== X-Gm-Message-State: AOAM531tqFHiI5J7xmaaBaYRGZPmtCRWBMrSffQ3+kT7ROmYKkW0BdM8 ejHIsS1H/mFovzDF7zPnwqztsvW0u/eAfOHs X-Google-Smtp-Source: ABdhPJw/a9Y5DTl4adIlUpWztctgi9hBpNCrII8GDkmgf/FZL3Q2z/kmBb7jtl/JO4Gb9VDZRHu88g== X-Received: by 2002:a05:6638:3c6:: with SMTP id r6mr15705547jaq.115.1612757904434; Sun, 07 Feb 2021 20:18:24 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id h10sm8214994ils.10.2021.02.07.20.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 20:18:23 -0800 (PST) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Tom Rini <trini@konsulko.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Marek Vasut <marex@denx.de>, Walter Lozano <walter.lozano@collabora.com>, Bin Meng <bmeng.cn@gmail.com>, Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>, Simon Glass <sjg@chromium.org>, Pavel Herrmann <morpheus.ibis@gmail.com> Subject: [PATCH v3 11/42] dm: test: Avoid destroying uclasses with of-platdata-inst Date: Sun, 7 Feb 2021 21:17:36 -0700 Message-Id: <20210208041807.4079084-4-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog In-Reply-To: <20210208041807.4079084-1-sjg@chromium.org> References: <20210208041807.4079084-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
dm: Implement OF_PLATDATA_INST in driver model (part E)
|
expand
|
diff --git a/test/test-main.c b/test/test-main.c index e1b49e091ab..46a0c2ee2f6 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -62,17 +62,25 @@ static int dm_test_post_run(struct unit_test_state *uts) { int id; - for (id = 0; id < UCLASS_COUNT; id++) { - struct uclass *uc; - - /* - * If the uclass doesn't exist we don't want to create it. So - * check that here before we call uclass_find_device(). - */ - uc = uclass_find(id); - if (!uc) - continue; - ut_assertok(uclass_destroy(uc)); + /* + * With of-platdata-inst the uclasses are created at build time. If we + * destroy them we cannot get them back since uclass_add() is not + * supported. So skip this. + */ + if (!CONFIG_IS_ENABLED(OF_PLATDATA_INST)) { + for (id = 0; id < UCLASS_COUNT; id++) { + struct uclass *uc; + + /* + * If the uclass doesn't exist we don't want to create + * it. So check that here before we call + * uclass_find_device(). + */ + uc = uclass_find(id); + if (!uc) + continue; + ut_assertok(uclass_destroy(uc)); + } } return 0;
It is not possible to destroy the uclasses when they are created at build time. Skip this step so that SPL test can complete successfully. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v2) Changes in v2: - Update to deal with test refactoring series test/test-main.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-)