On 2026-05-14T12:49:13, Harsimran Singh Tungal <[email protected]> wrote: > efi: selftest: add runtime variable tests with non-volatile storage > > Extend runtime variable tests for persistent storage > > Runtime variable selftests already cover the volatile-store path in a > single run, but non-volatile storage needs state to survive a reboot. > Make that flow explicit by keeping the existing "variables at runtime" > test for CONFIG_EFI_RT_VOLATILE_STORE=y and adding on-request > "variables at runtime setup" and "variables at runtime verify" tests > for the non-volatile case. > > The setup phase runs QueryVariableInfo(), exercises create/delete of a > runtime variable, prepares the persistent test state, and prompts the > user to reboot and run the verify test. If an old test variable is > already present, reuse it only when it matches the expected > half-payload; otherwise delete it and recreate clean state. The setup > path also performs a best-effort cleanup if a later check fails. > > The verify phase checks the prepared value, appends the remaining > payload, validates the full contents, deletes the test variable, and > [...] > > lib/efi_selftest/efi_selftest_variables_runtime.c | 713 +++++++++++++++------- > 1 file changed, 481 insertions(+), 232 deletions(-)
Lots of subtle things here, but if it works it seems good to me. Reviewed-by: Simon Glass <[email protected]>

