提交 6613ed1e 编写于 作者: P Patrice Chotard 提交者: Simon Glass

test: fdtdec: Add test for new no-map fdtdec_add_reserved_memory() parameter

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: NPatrice Chotard <patrice.chotard@st.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 ccaa5747
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册