test: cmd: fdt: Test fdt mknode
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 2 Mar 2023 03:08:37 +0000 (04:08 +0100)
committerSimon Glass <sjg@chromium.org>
Wed, 8 Mar 2023 21:14:29 +0000 (13:14 -0800)
commit6c28594bf6472ec693336be23ac041a4eae47df9
treea5c925f632cac0e5d8d6c3d7eb0d80aeaf6a548d
parent8bd49a87d912b585bade35e96afd29634dab605f
test: cmd: fdt: Test fdt mknode

Add 'fdt mknode' test which works as follows:
- Create fuller FDT, map it to sysmem
- Create node either in / or subnode
- Attempt to create node over existing node, which fails
- Attempt to create subnodes in non-existing nodes or aliases
- Verify created nodes using fdt list command

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