Skip to contentSkip to conversation

of: unittest: unflatten device tree on UML when testing

PATCH In review Brendan Higgins 2 participants 2 messages Feb 19, 2019 – Feb 20, 2019 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 of: unittest: unflatten device tree on UML when testing

UML supports enabling OF, and is useful for running the device tree tests, so add support for unflattening device tree blobs so we can actually use it.

---
 drivers/of/unittest.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/of/unittest.c +4 -0
index 84427384654d5..98f0dfc91c2a3 100644
@@ -2514,6 +2514,10 @@ static int __init of_unittest(void)
 	int res;
 
 	/* adding data for unittest */
+
+	if (IS_ENABLED(CONFIG_UML))
+		unittest_unflatten_overlay_base();
+
 	res = unittest_data_add();
 	if (res)
 		return res;
Signature · 1 line
2.21.0.rc0.258.g878e2cd30e-goog
Reviewed-by on v3 1/1
#1 lore raw
Quoted 15 lines · Brendan Higgins

UML supports enabling OF, and is useful for running the device tree tests, so add support for unflattening device tree blobs so we can actually use it.

---
 drivers/of/unittest.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/of/unittest.c +0 -0
index 84427384654d5..98f0dfc91c2a3 100644

drivers/of/unittest.c static int __init of_unittest(void) · line 2523

Quoted 10 lines
drivers/of/unittest.c +4 -0
@@ -2514,6 +2514,10 @@ static int __init of_unittest(void)
 	int res;
 
 	/* adding data for unittest */
+
+	if (IS_ENABLED(CONFIG_UML))
+		unittest_unflatten_overlay_base();
+
 	res = unittest_data_add();
 	if (res)
 		return res;