]> git.baikalelectronics.ru Git - uboot.git/commit
test: cmd: fdt: Test fdt get name
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 2 Mar 2023 03:08:33 +0000 (04:08 +0100)
committerSimon Glass <sjg@chromium.org>
Wed, 8 Mar 2023 21:14:28 +0000 (13:14 -0800)
commit18649452fba57dd0f0563b7e71754be72eed8e8a
tree6f02ce760cad6a7c93eea488a499380da34a91d1
parentecf87bf601b0b2ea83f5c05df3c32cd3452e2e72
test: cmd: fdt: Test fdt get name

Add 'fdt get name' test which works as follows:
- Create fuller FDT, map it to sysmem
- Get name of / node 0, 1 and /clk-test node 0
- Compare output and validate the node name
- Get name of / node 2 and /clk-test node 1
- Compare output and validate the node is not present
- Get name of / node -1 and /clk-test node -1
- Compare output and validate the node name equals node 0 name
- Check nonexistent node, verify the command errors out

The test case can be triggered using:
"
./u-boot -Dc 'ut fdt'
"
To dump the full output from commands used during test, add '-v' flag.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
test/cmd/fdt.c