From 3f29d6d85c244ad3a74f3b516075d52c0ff35ea6 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Wed, 1 Feb 2023 19:11:13 +0100 Subject: 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 Signed-off-by: David Gibson --- tests/pylibfdt_tests.py | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/pylibfdt_tests.py') diff --git a/tests/pylibfdt_tests.py b/tests/pylibfdt_tests.py index 68d6aaa..34c2764 100644 --- a/tests/pylibfdt_tests.py +++ b/tests/pylibfdt_tests.py @@ -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) -- cgit v1.2.3-59-g8ed1b