Re: coverage test failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Benjamin,

On 5 December 2016 at 16:32, Benjamin Bimmermann
<benjamin.bimmermann@xxxxxxxxx> wrote:
> 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.

The string() function does a byteswap. I wonder if that is causing
problems? It should be done by the caller, as David pointed out in the
next version.

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

Sounds good!

- Simon
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux