devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Bimmermann <benjamin.bimmermann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Subject: coverage test failed
Date: Mon, 5 Dec 2016 22:32:18 +0100	[thread overview]
Message-ID: <83389cab-dad7-5f73-c679-33be7bcee87f@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2261 bytes --]

Hi Simon,

I have created a patch for the test_tree1.dts. If you run "coverage run 
pylibfdt_tests.py" with that patch you see the error:

ERROR: testGetProperty (__main__.PyLibfdtTests)
Check that we can read the details of a property
----------------------------------------------------------------------
Traceback (most recent call last):
   File "pylibfdt_tests.py", line 259, in testGetProperty
     self.fdt.get_property(root, 'wibble')
   File "../pylibfdt/libfdt.py", line 348, in get_property
     if self.string(pdata.nameoff) == name:
   File "../pylibfdt/libfdt.py", line 206, in string
     return fdt_string(self._fdt, fdt32_to_cpu(offset))
   File "../pylibfdt/libfdt.py", line 102, in fdt32_to_cpu
     return struct.unpack("=I", struct.pack(">I", val))[0]
error: integer out of range for 'I' format code

How I have found this issue:
I try to parse a big Xilinx-Device-Tree : 
http://www.wiki.xilinx.com/file/view/zcu102-arm-multi-arch.dts/582977135/zcu102-arm-multi-arch.dts
There at rp_gpio_pmu_intr: rp_gpio_pmu_intr@0 I have got the error two. 
I have tried to extract the problem and have included it in the 
test_tree1.dts.
The Device-Tree-Compiler says that with the patched test_tree1.dts is fine.

I have tried to fix the Problem, but I'm stuck. The problem is that the 
offset is negative.

If you like I can send a patch for a fdtdump python version.

Regards,
Benjamin Bimmmermann



 From 1530238b7070300899789e412bb38c7eec62b9c3 Mon Sep 17 00:00:00 2001
From: Benjamin Bimmermann <b.bimmermann-LWAfsSFWpa4@public.gmane.org>
Date: Mon, 5 Dec 2016 22:14:49 +0100
Subject: [PATCH] ADD | Add a part from the zcu102-arm-multi-arch.dts

---
  tests/test_tree1.dts | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/tests/test_tree1.dts b/tests/test_tree1.dts
index 67ecfd0..2887951 100644
--- a/tests/test_tree1.dts
+++ b/tests/test_tree1.dts
@@ -8,6 +8,12 @@
      prop-int = <0xdeadbeef>;
      prop-int64 = /bits/ 64 <0xdeadbeef01abcdef>;
      prop-str = "hello world";
+        #interrupt-cells = <0x1>;
+        remote-ports = <0x2 0x1>;
+        interrupt-controller;
+        num-gpios = <0x1>;
+        linux,phandle = <0x5b>;
+        phandle = <0x5b>;
      #address-cells = <1>;
      #size-cells = <0>;

-- 
2.5.0


[-- Attachment #2: 0001-ADD-Add-a-part-from-the-zcu102-arm-multi-arch.dts.patch --]
[-- Type: text/x-patch, Size: 790 bytes --]

From 1530238b7070300899789e412bb38c7eec62b9c3 Mon Sep 17 00:00:00 2001
From: Benjamin Bimmermann <b.bimmermann-LWAfsSFWpa4@public.gmane.org>
Date: Mon, 5 Dec 2016 22:14:49 +0100
Subject: [PATCH] ADD | Add a part from the zcu102-arm-multi-arch.dts

---
 tests/test_tree1.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/test_tree1.dts b/tests/test_tree1.dts
index 67ecfd0..2887951 100644
--- a/tests/test_tree1.dts
+++ b/tests/test_tree1.dts
@@ -8,6 +8,12 @@
 	prop-int = <0xdeadbeef>;
 	prop-int64 = /bits/ 64 <0xdeadbeef01abcdef>;
 	prop-str = "hello world";
+		#interrupt-cells = <0x1>;
+		remote-ports = <0x2 0x1>;
+		interrupt-controller;
+		num-gpios = <0x1>;
+		linux,phandle = <0x5b>;
+		phandle = <0x5b>;
 	#address-cells = <1>;
 	#size-cells = <0>;
 
-- 
2.5.0


             reply	other threads:[~2016-12-05 21:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 21:32 Benjamin Bimmermann [this message]
     [not found] ` <83389cab-dad7-5f73-c679-33be7bcee87f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-12-07  3:47   ` coverage test failed 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=83389cab-dad7-5f73-c679-33be7bcee87f@gmail.com \
    --to=benjamin.bimmermann-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).