mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
pylibfdt: add size_hint parameter for get_path
This also enables us to test the -NOSPACE condition by adding a test setting size_hint=1 so this path is taken. Message-Id: <20230201181112.1644842-1-luca@z3ntu.xyz> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
abbd523bae
commit
3f29d6d85c
2 changed files with 5 additions and 4 deletions
|
@ -354,6 +354,7 @@ class PyLibfdtBasicTests(unittest.TestCase):
|
|||
node2 = self.fdt.path_offset('/subnode@1/subsubnode')
|
||||
self.assertEqual("/subnode@1", self.fdt.get_path(node))
|
||||
self.assertEqual("/subnode@1/subsubnode", self.fdt.get_path(node2))
|
||||
self.assertEqual("/subnode@1/subsubnode", self.fdt.get_path(node2, size_hint=1))
|
||||
|
||||
with self.assertRaises(FdtException) as e:
|
||||
self.fdt.get_path(-1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue