From mboxrd@z Thu Jan 1 00:00:00 1970 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 58ECDC27C76 for ; Sun, 22 Jan 2023 15:22:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CC08856BA; Sun, 22 Jan 2023 16:21:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eGIApAWm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5299F8569C; Sun, 22 Jan 2023 16:21:43 +0100 (CET) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 E51C1850CC for ; Sun, 22 Jan 2023 16:21:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dsankouski@gmail.com Received: by mail-ed1-x536.google.com with SMTP id s3so11889624edd.4 for ; Sun, 22 Jan 2023 07:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0dqRL5ATWwSZo/TGNhoxG1iSmPjsoh/f//Y5DBgwB+g=; b=eGIApAWmZvaOlcHjVdjSflFuTcHh7MvQc7b3JU7DDdNY9yuWz20mwu4Xmd75SM7aAz X3H0ACcD75RmL8tpYeizz6q3t51RZBvyzlg3VWFTcv5JUwhmTKSKihiO1F9mxVmz8who f+XW6cz/cs73K9S8SiTMA3CzULysxcD5GKy5f6xcb9MXu8yT3N6Q7OdvHCDXksIJMxEl 8WcS3kPLbmWu2ZLPcTJWfWMVomq5rvEBJqW8KJrMPK3c6FgJJNOMOCR6YFsm+905dIty K6JOzZU92F1PvmFrSy98IKIZlQLsV9cdTxRkAMX6YUkl7HkakGV/e5CG/6WrrMxEreDc KuWQ== 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 :subject:date:message-id:reply-to; bh=0dqRL5ATWwSZo/TGNhoxG1iSmPjsoh/f//Y5DBgwB+g=; b=xjvqgGr2vtk5rnCLQYLHnfSfrRmOeIaija834inta5U5YgiNxcpTJVTKMyp1jkAKvQ m61DWtqnvda1KtCeWmnrE6o4dEFA0Z3I4O+Qu/UL0LPig3OWejbOok0gT2Vtm+jkzmKp 8iLEM8IHRHb4eJH1CK1uXGE+Zug6oWDIwSX1ETsZdtfbaSB7m0xVLUgmq99LWqim17ek ZXtf8rWCiGBgQ2q5V3pVXRb8uU9wIWPgu/PZD1exsn2OocrfgRXuj/V6VTDYsGwiUsic BTEJnFFQ1sws1OvdlTTUPWWm63donUazkYx2BD7r+fDN3yI/CJGdbDSsOd6nB4SBxx4c k+Sw== X-Gm-Message-State: AFqh2koBiG3e8tcEbQktZnX2aLVP6z1/lto1beX98gNBTjAyKRl37DYP fWFGyCPmb0qktk8c/HRLbb/KI41LBxQ= X-Google-Smtp-Source: AMrXdXsC6GWKV2as8gG7n3OK5HDStSEZtFLKpQvSV87y90ww+eQKrA5Z44LGarygcxT9TxLgzOrLKA== X-Received: by 2002:a05:6402:3496:b0:48e:9c36:6c39 with SMTP id v22-20020a056402349600b0048e9c366c39mr30612714edc.0.1674400898479; Sun, 22 Jan 2023 07:21:38 -0800 (PST) Received: from localhost.localdomain ([46.216.42.4]) by smtp.googlemail.com with ESMTPSA id a8-20020aa7d908000000b0049dfd6bdc25sm11190075edr.84.2023.01.22.07.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jan 2023 07:21:38 -0800 (PST) From: Dzmitry Sankouski To: u-boot@lists.denx.de Cc: Dzmitry Sankouski , Simon Glass , Sean Anderson , Ramon Fried , Andrew Scull , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Etienne Carriere Subject: [PATCH v3 3/5] test: create dedicated fdt node for ofnode_for_each_prop test Date: Sun, 22 Jan 2023 18:21:23 +0300 Message-Id: <20230122152125.858085-4-dsankouski@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230122152125.858085-1-dsankouski@gmail.com> References: <20230122152125.858085-1-dsankouski@gmail.com> 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 Property count may change in /buttons node, if more button tests added, and this will break ofnode_for_each_prop. Add separate node for mentioned test. Signed-off-by: Dzmitry Sankouski --- Changes for v2: N/A Changes for v3: N/A arch/sandbox/dts/test.dts | 14 ++++++++++++++ test/dm/ofnode.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 2e580f980f..06ad027638 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -1517,6 +1517,20 @@ }; }; + ofnode-foreach { + compatible = "foreach"; + + first { + prop1 = <1>; + prop2 = <2>; + }; + + second { + prop1 = <1>; + prop2 = <2>; + }; + }; + osd { compatible = "sandbox,sandbox_osd"; }; diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index 8077affabb..473a8cef57 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -1046,7 +1046,7 @@ static int dm_test_ofnode_for_each_prop(struct unit_test_state *uts) struct ofprop prop; int count; - node = ofnode_path("/buttons"); + node = ofnode_path("/ofnode-foreach"); count = 0; /* we expect "compatible" for each node */ -- 2.30.2