Skip to content

Test settings persistence (complete the existing PR) #104488

@dsseng

Description

@dsseng

Summary

Add a test (or improve the existing unmerged one) that ensures settings are persistent as the device reboots. I really wanted this test when working with the PSA backend, which uses deferred writes, so I drafted a PoC which worked well enough to validate my work on the PSA backend. I couldn't, however, finalize it to be upstreamable

Describe the solution you'd like

A test in the settings suite has to populate some settings, reboot the device, and ensure the key can be still read.

Challenges which have implications on where should this test be enabled:

  1. The device can reboot itself (some cannot)
  2. The device has to preserve a flag somewhere, ideally in some retained memory (maybe flash, but not ideal)

This test could certainly work with a platform allowlist, but contributors are welcome to find out a wider filters

Alternatives

Do not test settings persistence and trust the settings backend to not lose everything by the next boot. Rely on manual testing by developers working on the code in this area

Additional Context

The draft is here, feel free to build on top of it: #100233

The code is has been tested with the PSA backend on AN521 QEMU (ns), that's what I can say. Generally care has to be taken about where to run this test to make sure it doesn't reboot endlessly or break in other ways

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementChanges/Updates/Additions to existing featuresarea: SettingsSettings subsystempriority: lowLow impact/importance bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions