u-boot/doc/develop
Simon Glass 0e4b697f88 test: Make a copy of the device tree before running a test
When the flat device tree changes it can mess up the live tree since that
uses the flat tree for its strings. This affects only a few sandbox tests
which modify the device tree, but the number will grow as ofnode support
for writing improves.

While the control FDT is not intended to change while U-Boot is running,
some tests do so. For example, the ofnode interface only supports
modifying properties in the control FDT, so tests must use that.

To solve this problem, keep a copy of the FDT and restore it as needed
when the test is finished. The copy only happens on sandbox (except SPL
builds), to reduce memory usage and because these tests are not useful on
other boards. For other boards, a checksum is taken to ensure that nothing
changes.

It would be possible to always checksum the FDT on sandbox and only
restore it if needed, but this is slightly slower than restoring it every
time, at least with crc8.

Move the code which checks for success to the very end, for clarity.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-29 16:09:56 -04:00
..
devicetree introduce CONFIG_DEVICE_TREE_INCLUDES 2022-01-25 12:35:57 -07:00
driver-model test: Make a copy of the device tree before running a test 2022-09-29 16:09:56 -04:00
package binman: Add documentation for bintools 2022-01-25 12:36:11 -07:00
statistics doc: Add in the historical release statistics found on the wiki 2022-07-14 14:14:47 -04:00
uefi blk: Switch over to using uclass IDs 2022-09-16 11:05:16 -04:00
bloblist.rst bloblist: Describe the design goals 2022-06-28 03:09:51 +01:00
bootstd.rst Rename disto_[pxe_]getfile to distro_[pxe_]getfile 2022-08-26 16:33:48 -06:00
checkpatch.rst scripts/checkpatch.pl: Resync with v5.16 2022-02-03 12:16:00 -05:00
ci_testing.rst doc: Add basic information about running CI tests 2021-08-04 15:58:31 -04:00
coccinelle.rst doc: Coccinelle: move to HTML doc 2020-07-17 08:45:29 -04:00
codingstyle.rst doc: Drop a reference to Travis 2022-08-13 11:09:49 +02:00
commands.rst linker_lists: Rename sections to remove . prefix 2022-06-23 12:58:18 -04:00
config_binding.rst doc: Add mention of the /config binding 2021-09-25 12:30:54 +02:00
crash_dumps.rst doc: crash_dumps.rst missing documentation link 2022-08-13 11:09:49 +02:00
cyclic.rst cyclic: Add documentation 2022-09-13 16:01:44 -04:00
designprinciples.rst designprinciples.rst: Perform minor cleanups 2022-07-14 14:13:50 -04:00
distro.rst bootstd: doc: Add documentation 2022-04-25 10:00:04 -04:00
environment.rst doc: Improve environment documentation further 2021-11-16 14:35:08 -05:00
event.rst Merge branch 'next' 2022-04-04 10:48:44 -04:00
global_data.rst nds32: Remove the architecture 2022-04-25 16:04:05 -04:00
index.rst Merge branch 'master' into next 2022-09-19 16:07:12 -04:00
logging.rst log: force DEBUG when LOG_DEBUG is activated 2022-07-26 02:30:56 -06:00
makefiles.rst doc: Bring in Makefile documentation 2021-07-24 10:49:51 +02:00
menus.rst doc: move README.menu to HTML documentation 2021-01-23 09:53:46 -05:00
moveconfig.rst Revert "Revert "global: Remove CONFIG_SYS_EXTRA_OPTIONS support"" 2022-08-05 11:47:56 -04:00
patman.rst patman: Add documentation to doc/ 2022-08-13 11:09:49 +02:00
printf.rst doc: printf() codes 2022-01-19 16:18:09 +01:00
process.rst doc: process, sending_patches: Update and correct the old "Patches" content 2022-09-01 07:26:28 +02:00
py_testing.rst Makefile: Add a pcheck option to run tests in parallel 2022-09-12 18:06:36 -04:00
python_cq.rst patman: Correct pylint errors 2022-03-02 10:28:12 -05:00
release_cycle.rst Prepare v2022.10-rc5 2022-09-19 12:17:04 -04:00
sending_patches.rst doc: process, sending_patches: Update and correct the old "Patches" content 2022-09-01 07:26:28 +02:00
smbios.rst doc: describe generation of SMBIOS table 2022-02-26 07:37:00 +01:00
spl.rst Introduce Verifying Program Loader (VPL) 2022-05-02 09:58:13 -04:00
system_configuration.rst doc: develop: Describe system configuration 2022-07-29 18:59:47 +02:00
testing.rst Makefile: Add a pcheck option to run tests in parallel 2022-09-12 18:06:36 -04:00
tests_sandbox.rst test: Allow running tests multiple times 2022-09-02 16:21:44 -04:00
tests_writing.rst doc: Explain briefly how to write new tests 2021-03-12 09:57:31 -05:00
trace.rst trace: sandbox: Use only the Kconfig options 2021-12-05 09:23:15 -07:00
vbe.rst vbe: Add some documentation 2022-08-12 08:14:23 -04:00
version.rst acpi: Use U-Boot version for OEM_REVISION 2021-10-06 09:15:14 -04:00