aboutsummaryrefslogtreecommitdiff
path: root/tools/dtoc/test_dtoc.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-07-15 11:06:24 -0400
committerTom Rini <trini@konsulko.com>2021-07-15 11:06:24 -0400
commitd3fc3da9a4fb98104d004b025149ec6dadccc2cd (patch)
treedfe357a19bc480ea1bd5c9732bc82b3c7441790c /tools/dtoc/test_dtoc.py
parent18e7ebf7555203e26066c6264b2275c34e03632d (diff)
parent2f91fc40039d2ef6f433d5c56c4f4701975f510f (diff)
Merge https://source.denx.de/u-boot/custodians/u-boot-x86
- x86: various improvements made in getting Chromium OS verified boot running on top of coreboot, booting into U-Boot.
Diffstat (limited to 'tools/dtoc/test_dtoc.py')
-rwxr-xr-xtools/dtoc/test_dtoc.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py
index 0b2805feed..863ede90b7 100755
--- a/tools/dtoc/test_dtoc.py
+++ b/tools/dtoc/test_dtoc.py
@@ -1830,3 +1830,13 @@ U_BOOT_DRVINFO(spl_test2) = {
dtb_file = get_dtb_file('dtoc_test_single_reg.dts')
output = tools.GetOutputFilename('output')
self.run_test(['struct'], dtb_file, output)
+
+ def test_missing_parent(self):
+ """Test detection of a parent node with no properties"""
+ dtb_file = get_dtb_file('dtoc_test_noparent.dts', capture_stderr=True)
+ output = tools.GetOutputFilename('output')
+ with self.assertRaises(ValueError) as exc:
+ self.run_test(['device'], dtb_file, output, instantiate=True)
+ self.assertIn("Node '/i2c@0/spl-test/pmic@9' requires parent node "
+ "'/i2c@0/spl-test' but it is not in the valid list",
+ str(exc.exception))