[PATCH 01/10] pylibfdt: Add a test for use of uint32_t

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



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@xxxxxxxxxxxx>
---

 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

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