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

Add 'fdt set' test which works as follows:
- Create fuller FDT, map it to sysmem
- Set either existing property to overwrite it, or new property
- Test setting both single properties as well as string and integer arrays
- Test setting to non-existent nodes and aliases
- Verify set values using 'fdt get value'

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