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 83B74C001DC for ; Fri, 21 Jul 2023 16:08:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B685F867BC; Fri, 21 Jul 2023 18:07:36 +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="jqnrzakz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 97AA5867B2; Fri, 21 Jul 2023 18:07:32 +0200 (CEST) Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (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 56065867B5 for ; Fri, 21 Jul 2023 18:07:28 +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-io1-xd36.google.com with SMTP id ca18e2360f4ac-78363cc070aso91418739f.1 for ; Fri, 21 Jul 2023 09:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689955647; x=1690560447; 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=3TQw1kmjclryaZjQL4LBWrYENzyXIE9BWfHLgcCoU3U=; b=jqnrzakzYFnZ+zlurz9wZnufs8bHU1B2q24HaTTS9IrtPMY1zrMu9sskiLih8v1Z95 TRC9VDIXp+TwMs0blN+ZywSBEHWTRRRo2wQ5c0nWBBym4RC/iIJkbVtqYM6Ox52djaHb +DpFKZQmZuhNNGzM2D0k2NOvcT931JqcVBSx0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689955647; x=1690560447; 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=3TQw1kmjclryaZjQL4LBWrYENzyXIE9BWfHLgcCoU3U=; b=Bn0agYCCjJHqwZk8rN7hviZhawG7ffLNoo80sKWABRQ9lZGDdjlL294VS+r/4mTIeL mH3aySbN8rzfme6oQ1orz/FTeiqfZq58fpLG/1XGDqgG/Zuq76yWoXm/u2MgOs/DXFQ2 WthG8wW6W7AAOYw6W1yrS7v83+RqKygxBn93XW+3Sr2tKUeFMUXA2G/a2u5JePaC7oH1 mqiVgjtb29Lay1/d0r5dPT0EOxKMWALkMCpxoJPaQP6LdGZ2Es3Bu7UOspGUbbKrRr0d KC2FH08ud95mMKvNoQvcxxqrgMMeIGagHWBQT1oK8rT6BAYdCGSfcibaq0myKcWz1X7z OrBA== X-Gm-Message-State: ABy/qLYC+qJSIhXivaxcxgPAGtE/GkjjfDziPxq46AgjIJ1R3efkxAZM aozXsrcDg4JNXvR2OWX9uR0/uM1Jmi/jmCIbqRs= X-Google-Smtp-Source: APBJJlEk+6LKkQKdmd48CF27Nxj1UJitk230zVwvxHpPBDUeoJzXJiqQSnywqHpbtSbrMBP4qr/OOA== X-Received: by 2002:a6b:4f03:0:b0:783:6361:17ea with SMTP id d3-20020a6b4f03000000b00783636117eamr386811iob.8.1689955646864; Fri, 21 Jul 2023 09:07:26 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id r17-20020a6bd911000000b0078680780694sm1158685ioc.34.2023.07.21.09.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 09:07:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Alper Nebi Yasak , Neha Malcom Francis , Stefan Herbrechtsmeier , Philippe Reynes , Peng Fan , Simon Glass , Heinrich Schuchardt Subject: [PATCH 3/6] dtoc: Add some debugging when copying nodes Date: Fri, 21 Jul 2023 10:07:03 -0600 Message-ID: <20230721160710.968748-4-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230721160710.968748-1-sjg@chromium.org> References: <20230721160710.968748-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.8 at phobos.denx.de X-Virus-Status: Clean Show the operations being performed, when debugging is enabled. Convert a mistaken 'print' in test_copy_subnodes_from_phandles() while we are here. Signed-off-by: Simon Glass --- tools/dtoc/fdt.py | 5 +++++ tools/dtoc/test_fdt.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py index 2589be990ae9..a0b92d43e8a1 100644 --- a/tools/dtoc/fdt.py +++ b/tools/dtoc/fdt.py @@ -249,6 +249,7 @@ class Prop: """ if self.dirty: node = self._node + tout.debug(f'sync {node.path}: {self.name}') fdt_obj = node._fdt._fdt_obj node_name = fdt_obj.get_name(node._offset) if node_name and node_name != node.name: @@ -716,9 +717,13 @@ class Node: 'phandle' property is not copied since this might result in two nodes with the same phandle, thus making phandle references ambiguous. """ + tout.debug(f'copy to {self.path}: {src.path}') for name, src_prop in src.props.items(): if name != 'phandle' and name not in self.props: self.props[name] = Prop(self, None, name, src_prop.bytes) + tout.debug(f' {name}') + else: + tout.debug(f' {name} - ignored') def copy_node(self, src): """Copy a node and all its subnodes into this node diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py index 84dcd8b5caa5..f77e48b54eaf 100755 --- a/tools/dtoc/test_fdt.py +++ b/tools/dtoc/test_fdt.py @@ -32,6 +32,7 @@ from dtoc.fdt import Type, BytesToValue import libfdt from u_boot_pylib import test_util from u_boot_pylib import tools +from u_boot_pylib import tout #pylint: disable=protected-access @@ -414,7 +415,7 @@ class TestNode(unittest.TestCase): # Make sure that the phandle for 'over' is not copied over = dst.FindNode('over') - print('keys', over.props.keys()) + tout.debug(f'keys: {over.props.keys()}') self.assertNotIn('phandle', over.props.keys()) # Check the merged properties, first the base ones in '/dest' -- 2.41.0.487.g6d72f3e995-goog