]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - tools/dtoc/test_fdt.py
dtoc: Fix Fdt.GetNode() to handle a missing node
[thirdparty/u-boot.git] / tools / dtoc / test_fdt.py
index e57298dbe7cd4d22e83cf42138bb444462c0985e..9fef8ed5496ec0bcae2ab8732eac531d6265623f 100755 (executable)
@@ -205,6 +205,9 @@ class TestProp(unittest.TestCase):
         self.node = self.dtb.GetNode('/spl-test')
         self.fdt = self.dtb.GetFdtObj()
 
+    def testMissingNode(self):
+        self.assertEqual(None, self.dtb.GetNode('missing'))
+
     def testPhandle(self):
         dtb = fdt.FdtScan('tools/dtoc/dtoc_test_phandle.dts')
         node = dtb.GetNode('/phandle-source')