mirror of
https://xff.cz/git/u-boot/
synced 2025-10-22 10:31:56 +02:00
dtoc: Support adding new nodes
Add a way to add new nodes and sync them back to the blob. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -355,6 +355,14 @@ class TestProp(unittest.TestCase):
|
||||
|
||||
def testAddNode(self):
|
||||
self.fdt.pack()
|
||||
self.node.AddSubnode('subnode')
|
||||
with self.assertRaises(libfdt.FdtException) as e:
|
||||
self.dtb.Sync(auto_resize=False)
|
||||
self.assertIn('FDT_ERR_NOSPACE', str(e.exception))
|
||||
|
||||
self.dtb.Sync(auto_resize=True)
|
||||
offset = self.fdt.path_offset('/spl-test/subnode')
|
||||
self.assertTrue(offset > 0)
|
||||
|
||||
|
||||
class TestFdtUtil(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user