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 250F8C19F2A for ; Sat, 30 Jul 2022 21:54:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CC5684377; Sat, 30 Jul 2022 23:53:30 +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="nnrt7cNp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0FB5484208; Sat, 30 Jul 2022 23:53:20 +0200 (CEST) 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 EC90B841D5 for ; Sat, 30 Jul 2022 23:53:13 +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-ot1-x331.google.com with SMTP id g20-20020a9d6a14000000b0061c84e679f5so5664597otn.2 for ; Sat, 30 Jul 2022 14:53:13 -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; bh=R2gBSUHlcMs81gIFPcksJWXoxM77bRheb0he0CploRY=; b=nnrt7cNpYRn3VZKVNFo6YepsAzoQL6M3bVr/6be1halvsGCpwGhM5No9AMtSQabz3b FmpzyRF4wXSobC212Exxcl9/XYGRjN9rMZ3PlX4JOxDcY4rD1dr1pV2Wi1hHCumh3DyK yd5aeECinfheV1pKKYTJSe51rMebIMq+sxk3Q= 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; bh=R2gBSUHlcMs81gIFPcksJWXoxM77bRheb0he0CploRY=; b=O+87kjoL8D9dzUQnnPt/oMKdxBtTYgQNZVdpJbmlw/zvcoz+RZvBbKC48HmiYoAO1q AcgNrFwBlHCfOOcqegMOswNETyApIQ56i3tcKSRf/jMJPhkhUFMeUTvqqonyM/2iQnPZ p8KqYYvrT2B1HN6AsFY5LQ2L8bVRzdgwhIXbnjnyMGKSsK3no0c0CkM1UDr5Q4Zz0/Ne gMlgSTiRvARK6SJnoRLf5E9NvpG/rphRS6MrFAQq90N8+CcGPakSWz0XMTLGHUomZ46o 6InEum2XhpaX0efACpE0wfCn9hypD8l3N3xcUKf7XVOHu5AyZN+/8SV+ipdHfPhLAEmx f+Fg== X-Gm-Message-State: AJIora8GZXofCxjd6mDDfqmJMymOD/LEji3cHyMaoCIECOMgeg3ICtxi YJDz1e7bU/DzKnmJGSyLQZKUruJFfPWK2L9E X-Google-Smtp-Source: AGRyM1smqsY2IkLjqaPQrSbXPeoJZ0lcQ0xuQxbss3rQql5a0qL/vxjLlBEX+ZCQMjn26tR30MZnMw== X-Received: by 2002:a9d:7b4d:0:b0:61c:d27d:cf3b with SMTP id f13-20020a9d7b4d000000b0061cd27dcf3bmr3855281oto.49.1659217992487; Sat, 30 Jul 2022 14:53:12 -0700 (PDT) Received: from sjg1.lan (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id 19-20020a544193000000b0032f75714af1sm1699656oiy.18.2022.07.30.14.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 14:53:12 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Bin Meng , Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH v2 09/35] dm: core: Tidy up ofnode-writing test Date: Sat, 30 Jul 2022 15:52:11 -0600 Message-Id: <20220730215237.818368-8-sjg@chromium.org> X-Mailer: git-send-email 2.37.1.455.g008518b4e5-goog In-Reply-To: <20220730215237.818368-1-sjg@chromium.org> References: <20220730215237.818368-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 Update this test to use the livetree flag so that special check can be avoided. Also drop a few blank lines. Signed-off-by: Simon Glass --- (no changes since v1) test/dm/ofnode.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index 0aeaaeb7f8c..ce96f9d1ee2 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -546,13 +546,7 @@ static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts) struct udevice *dev; ofnode node; - if (!of_live_active()) { - printf("Live tree not active; ignore test\n"); - return 0; - } - /* Test enabling devices */ - node = ofnode_path("/usb@2"); ut_assert(!of_device_is_available(ofnode_to_np(node))); @@ -564,7 +558,6 @@ static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts) ut_assertok(uclass_find_device_by_seq(UCLASS_USB, 2, &dev)); /* Test string property setting */ - ut_assert(device_is_compatible(dev, "sandbox,usb")); ofnode_write_string(node, "compatible", "gdsys,super-usb"); ut_assert(device_is_compatible(dev, "gdsys,super-usb")); @@ -581,7 +574,6 @@ static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts) ut_asserteq(0x42, dev_read_addr(dev)); /* Test disabling devices */ - device_remove(dev, DM_REMOVE_NORMAL); device_unbind(dev); @@ -591,4 +583,5 @@ static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_livetree_writing, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); +DM_TEST(dm_test_ofnode_livetree_writing, + UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT | UT_TESTF_LIVE_TREE); -- 2.37.1.455.g008518b4e5-goog