devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] pylibfdt: Add a test for use of uint32_t
@ 2017-08-19 17:17 Simon Glass
       [not found] ` <20170819171803.195806-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Simon Glass @ 2017-08-19 17:17 UTC (permalink / raw)
  To: Devicetree Compiler; +Cc: David Gibson, Simon Glass

Using the libfdt function without going through the Python Fdt class
requires use of the uint32_t type. Add a test that this works correctly.

Signed-off-by: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---

 tests/pylibfdt_tests.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/pylibfdt_tests.py b/tests/pylibfdt_tests.py
index ae392bb..e8a4582 100644
--- a/tests/pylibfdt_tests.py
+++ b/tests/pylibfdt_tests.py
@@ -283,6 +283,11 @@ class PyLibfdtTests(unittest.TestCase):
         self.assertEquals(-libfdt.BADPATH,
                           self.fdt.path_offset('missing', QUIET_ALL))
 
+    def testIntegers(self):
+        """Check that integers can be passed and returned"""
+        self.assertEquals(0, libfdt.fdt_get_phandle(self.fdt._fdt, 0))
+        node2 = self.fdt.path_offset('/subnode@2')
+        self.assertEquals(0x2000, libfdt.fdt_get_phandle(self.fdt._fdt, node2))
 
 if __name__ == "__main__":
     unittest.main()
-- 
2.14.1.480.gb18f417b89-goog

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-08-23  0:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-19 17:17 [PATCH 01/10] pylibfdt: Add a test for use of uint32_t Simon Glass
     [not found] ` <20170819171803.195806-1-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2017-08-19 17:17   ` [PATCH 02/10] pylibfdt: Use local pylibfdt module Simon Glass
2017-08-19 17:17   ` [PATCH 03/10] tests: Return a failure code when any tests fail Simon Glass
2017-08-19 17:17   ` [PATCH 04/10] pylibfdt: Add support for fdt_get_phandle() Simon Glass
2017-08-19 17:17   ` [PATCH 05/10] pylibfdt: Add support for fdt_parent_offset() Simon Glass
2017-08-19 17:17   ` [PATCH 06/10] pylibfdt: Add support for fdt_node_offset_by_phandle() Simon Glass
2017-08-19 17:18   ` [PATCH 07/10] pylibfdt: Add a method to access the device tree directly Simon Glass
     [not found]     ` <20170819171803.195806-7-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2017-08-21  0:17       ` David Gibson
     [not found]         ` <20170821001714.GC12356-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-21  3:04           ` Simon Glass
2017-08-19 17:18   ` [PATCH 08/10] pylibfdt: Add support for fdt_subnode_offset() Simon Glass
2017-08-19 17:18   ` [PATCH 09/10] README: Add a note about test_tree1.dts Simon Glass
     [not found]     ` <20170819171803.195806-9-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2017-08-21  0:25       ` David Gibson
     [not found]         ` <20170821002557.GD12356-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-08-22 13:39           ` Simon Glass
     [not found]             ` <CAPnjgZ05qhg5hLAtRGS89qEcrPyfYXtJSjQTzaR0y8z4YOUvQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-23  0:36               ` David Gibson
2017-08-19 17:18   ` [PATCH 10/10] pylibfdt: Allow reading integer values from properties Simon Glass

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).