On 11/14/22 09:30, Heinrich Schuchardt wrote:
On 11/13/22 21:45, Marek Vasut wrote:
Add test case for 'fdt get value' sub command.
The test case can be triggered using:
"
./u-boot -d u-boot.dtb -c 'ut fdt'
"
Signed-off-by: Marek Vasut <ma...@denx.de>
---
Cc: Heinrich Schuchardt <heinrich.schucha...@canonical.com>
Cc: Simon Glass <s...@chromium.org>
Cc: Tom Rini <tr...@konsulko.com>
---
test/cmd/fdt.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
index ba9eaa42c14..7974c88c0d6 100644
--- a/test/cmd/fdt.c
+++ b/test/cmd/fdt.c
@@ -142,6 +142,59 @@ static int fdt_test_resize(struct unit_test_state
*uts)
}
FDT_TEST(fdt_test_resize, UT_TESTF_CONSOLE_REC);
+/* Test 'fdt get' reading an fdt */
+static int fdt_test_get(struct unit_test_state *uts)
+{
+ ulong addr;
+
+ addr = map_to_sysmem(gd->fdt_blob);
+ set_working_fdt_addr(addr);
+
+ /* Test getting default element of /clk-test node clock-names
property */
+ ut_assertok(console_record_reset_enable());
+ ut_assertok(run_command("fdt get value fdflt /clk-test
clock-names", 0));
The command 'fdt get value' is missing in doc/usage/cmd/fdt.rst.
Ugh ... the entire 'fdt' command documentation except for 'fdt addr' is
missing in that file.