test_bootstage
Test the bootstage command.
It is used for checking the boot progress and timing by printing the bootstage report, stashes the data into memory and unstashes the data from memory.
Note: This test relies on boardenv_* containing configuration values to define the data size, memory address, and bootstage magic address (defined in common/bootstage.c). Without this, bootstage stash and unstash tests will be automatically skipped.
For example:
env__bootstage_cmd_file = {
'addr': 0x200000,
'size': 0x1000,
'bootstage_magic_addr': 0xb00757a3,
}
- test_bootstage.test_bootstage_report(ubman)
Test the bootstage report subcommand
This will run the ‘bootstage report’ subcommand and ensure that we are reporting:
A timer summary in microseconds
The accumulated time
That at least the phrase ‘dm_r’ is in the output
Note that the time values are not checked.
- test_bootstage.test_bootstage_stash_and_unstash(ubman)
Test the bootstage stash and unstash subcommands
After checking that we have configured an environment file to use, we will use the stash subcommand to save information. Then we will use the md command to verify the contents in memory. Finally we confirm the unstash subcommand runs successfully.