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 05430C43334 for ; Wed, 20 Jul 2022 17:01:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C2218410A; Wed, 20 Jul 2022 19:00:47 +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="BzJ6YnEt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B3B7840FB; Wed, 20 Jul 2022 19:00:31 +0200 (CEST) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 8181B840E6 for ; Wed, 20 Jul 2022 19:00:21 +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-wm1-x32a.google.com with SMTP id b21-20020a05600c4e1500b003a32bc8612fso1161311wmq.3 for ; Wed, 20 Jul 2022 10:00:21 -0700 (PDT) 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=S+CvzRt1imli0AEtJozRn1db+MYnj8eUHig/bX6K3MM=; b=BzJ6YnEtsGOnuAsEZx0MHbFmwkLmM/bvHBY5Wlqrga+P8tq8zGZ1QUZXbiPLEP9pMh ttMzcspRcp8lQuxPsX4bNUNJiI2+z1/qUF6Xpr1KInXfSmvgkMaeimmxZZuiYD2FQ1O2 hYW97/auj+7uxGLBEmtiL2EWg5IMJeQLDycPE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S+CvzRt1imli0AEtJozRn1db+MYnj8eUHig/bX6K3MM=; b=aik47UjbhOMyvIYQ7wHBp0znqGfSeeZ8DFbw3seQ3ZOeJ8qwpx/twAp4meVmfgPaMU Y37FAXI4SA+uviEs6pIQ+pUr9uJJCiyknanlTpWYwwJVwDor+1VSG4kl4UbetT/HkR+Z v9FP4mtDSdNTqNxNRpo1c1kqrJYo+jiA4jGke+BIrtAXgK1IwGdvAKhozm52EwK1Ek60 6D8qahoMAp5Wi2yrc0ZHJ5OtOu63QY3BJq52MTJbpwFHjt5kAc2GcARTLZ6XBnERRza5 2j85lNdYhOWv2rzWplBltXPdfjpCEBp8eLNYi2HPdGmI+dsyjWmyHMl8+o4zkfO36/A/ p03Q== X-Gm-Message-State: AJIora++cplw2L7j1GVXM3s4Yfo1QPe5XuVMzmHDnDBbRKT5Y8Np5bkU 29KSgymm0iYwItVwG18S7Xa+JyU6HBMVxDnA X-Google-Smtp-Source: AGRyM1u8Z1i4GujnB7/cbuA/D0AkgGfPa160N/nKLjsTIQmfh51iminr/BU33yYxpDXUMujexel60Q== X-Received: by 2002:a1c:a382:0:b0:3a3:2644:664f with SMTP id m124-20020a1ca382000000b003a32644664fmr4854899wme.41.1658336420642; Wed, 20 Jul 2022 10:00:20 -0700 (PDT) Received: from sjg1.roam.corp.google.com ([62.48.169.138]) by smtp.gmail.com with ESMTPSA id u16-20020a05600c00d000b003a31c4f6f74sm3690906wmm.32.2022.07.20.10.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 10:00:20 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH 08/19] dm: core: Tidy up ofnode-writing test Date: Wed, 20 Jul 2022 10:59:36 -0600 Message-Id: <20220720165947.12728-9-sjg@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220720165947.12728-1-sjg@chromium.org> References: <20220720165947.12728-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 --- 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.0.170.g444d1eabd0-goog