diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-10 03:39:44 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-07-20 20:37:47 +0300 |
commit | 1f238bd5bdc35d996751ed4b8faf8b4c4e69f68d (patch) | |
tree | 3f91a2a77479ecce99921cb616ebc3eea2604295 /tools/dtoc/test_fdt.py | |
parent | 4c63d21754a2583df1d85d3af6f0a5bf5c300d20 (diff) | |
download | u-boot-1f238bd5bdc35d996751ed4b8faf8b4c4e69f68d.tar.xz |
dtoc: Allow adding variable-sized data to a dtb
Add a method for adding a property containing arbitrary bytes. Make sure
that the tree can expand as needed in this case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/test_fdt.py')
-rwxr-xr-x | tools/dtoc/test_fdt.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py index 375e906424..b4f9b7f498 100755 --- a/tools/dtoc/test_fdt.py +++ b/tools/dtoc/test_fdt.py @@ -417,6 +417,10 @@ class TestProp(unittest.TestCase): self.node.SetData('empty', b'123') self.assertEqual(b'123', prop.bytes) + # Trying adding a lot of data at once + self.node.AddData('data', tools.GetBytes(65, 20000)) + self.dtb.Sync(auto_resize=True) + def testFromData(self): dtb2 = fdt.Fdt.FromData(self.dtb.GetContents()) self.assertEqual(dtb2.GetContents(), self.dtb.GetContents()) |