All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH 06/11] dtoc: Improve internal error for Refresh()
Date: Sun, 21 Mar 2021 18:24:34 +1300	[thread overview]
Message-ID: <20210321052439.2238169-7-sjg@chromium.org> (raw)
In-Reply-To: <20210321052439.2238169-1-sjg@chromium.org>

Add the node name too so it is easy to see which node failed.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/dtoc/fdt.py      | 4 ++--
 tools/dtoc/test_fdt.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index 25ce5136ebf..f0d1384ccc3 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -339,8 +339,8 @@ class Node:
             p = fdt_obj.get_property_by_offset(poffset)
             prop = self.props.get(p.name)
             if not prop:
-                raise ValueError("Internal error, property '%s' missing, "
-                                 'offset %d' % (p.name, poffset))
+                raise ValueError("Internal error, node '%s' property '%s' missing, "
+                                 'offset %d' % (self.path, p.name, poffset))
             prop.RefreshOffset(poffset)
             poffset = fdt_obj.next_property_offset(poffset, QUIET_NOTFOUND)
 
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index 1c3a8a2ab1e..72095b05434 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -209,7 +209,7 @@ class TestNode(unittest.TestCase):
         del self.node.props['notstring']
         with self.assertRaises(ValueError) as e:
             self.dtb.Refresh()
-        self.assertIn("Internal error, property 'notstring' missing, offset ",
+        self.assertIn("Internal error, node '/spl-test' property 'notstring' missing, offset ",
                       str(e.exception))
 
     def testLookupPhandle(self):
-- 
2.31.0.rc2.261.g7f71774620-goog

  parent reply	other threads:[~2021-03-21  5:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21  5:24 [PATCH 00/11] binman: Enhancements to expanded entries Simon Glass
2021-03-21  5:24 ` [PATCH 01/11] binman: Use a unique number for the symbols test file Simon Glass
2021-03-21  5:24 ` [PATCH 02/11] binman: Allow disabling expanding an entry Simon Glass
2021-03-21  5:24 ` [PATCH 03/11] binman: Add support for a collection of entries Simon Glass
2021-03-21  5:24 ` [PATCH 04/11] binman: Support obtaining section contents immediately Simon Glass
2021-03-21  5:24 ` [PATCH 05/11] binman: Support default alignment for sections Simon Glass
2021-03-21  5:24 ` Simon Glass [this message]
2021-03-21  5:24 ` [PATCH 07/11] dtoc: Tidy up property-offset handling Simon Glass
2021-03-21  5:24 ` [PATCH 08/11] dtoc: Tweak ordering of fdt-offsets refreshing Simon Glass
2021-03-21  5:24 ` [PATCH 09/11] dtoc: Add a subnode test for multiple nodes Simon Glass
2021-03-21  5:24 ` [PATCH 10/11] dtoc: Support adding subnodes alongside existing ones Simon Glass
2021-03-21  5:24 ` [PATCH 11/11] dtoc: Add new check that offsets are correct Simon Glass
2021-03-27  5:19 ` [PATCH 10/11] dtoc: Support adding subnodes alongside existing ones Simon Glass
2021-03-27  5:19 ` [PATCH 11/11] dtoc: Add new check that offsets are correct Simon Glass
2021-03-27  5:19 ` [PATCH 09/11] dtoc: Add a subnode test for multiple nodes Simon Glass
2021-03-27  5:19 ` [PATCH 08/11] dtoc: Tweak ordering of fdt-offsets refreshing Simon Glass
2021-03-27  5:19 ` [PATCH 07/11] dtoc: Tidy up property-offset handling Simon Glass
2021-03-27  5:19 ` [PATCH 06/11] dtoc: Improve internal error for Refresh() Simon Glass
2021-03-27  5:19 ` [PATCH 05/11] binman: Support default alignment for sections Simon Glass
2021-03-27  5:19 ` [PATCH 03/11] binman: Add support for a collection of entries Simon Glass
2021-03-27  5:19 ` [PATCH 04/11] binman: Support obtaining section contents immediately Simon Glass
2021-03-27  5:20 ` [PATCH 02/11] binman: Allow disabling expanding an entry Simon Glass
2021-03-27  5:20 ` [PATCH 01/11] binman: Use a unique number for the symbols test file Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210321052439.2238169-7-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.