[PATCH v4 2/3] test: fdtdec: Add test for new no-map fdtdec_add_reserved_memory() parameter
Patrice Chotard
patrice.chotard at st.com
Thu Sep 10 10:50:00 CEST 2020
Add a test to verify that the no-map property is added in reserved-memory
node when fdtdec_add_reserved_memory() no-map parameter is set to true.
Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
(no changes since v2)
Changes in v2:
- Add no-map property test into fdtdec test
test/dm/fdtdec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/dm/fdtdec.c b/test/dm/fdtdec.c
index 4119003041..017157a2ec 100644
--- a/test/dm/fdtdec.c
+++ b/test/dm/fdtdec.c
@@ -101,10 +101,13 @@ static int dm_test_fdtdec_add_reserved_memory(struct unit_test_state *uts)
resv.start = 0x2000;
resv.end = 0x2fff;
ut_assertok(fdtdec_add_reserved_memory(blob, "rsvd_region1",
- &resv, &phandle1, false));
+ &resv, &phandle1, true));
subnode = fdt_path_offset(blob, "/reserved-memory/rsvd_region1");
ut_assert(subnode > 0);
+ /* check that no-map property is present */
+ ut_assert(fdt_getprop(blob, subnode, "no-map", NULL) > 0);
+
/* phandles must be different */
ut_assert(phandle != phandle1);
--
2.17.1
More information about the U-Boot
mailing list