diff options
| author | Yifan Hong <elsk@google.com> | 2020-02-20 19:51:05 -0800 |
|---|---|---|
| committer | Yifan Hong <elsk@google.com> | 2020-03-05 08:41:44 -0800 |
| commit | 7c5ae0a12ef22f9dba005da9db13a8f37945f1a9 (patch) | |
| tree | aa3333966b2b529ed85017b4bd01638a1f571a97 /libpackagelistparser/packagelistparser_test.cpp | |
| parent | ae2558d900d5eafe2a511f8debe72a8564f5f966 (diff) | |
libsnapshot: remove snapshots properly after flashing
If updated then immediately flashed target slot at unverified
stage, update_engine attempts to call RemoveAllSnapshots, but
it used to fail because unmapping fails. In reality, these devices
are dm-linear targets, so unmapping them is optional.
- Introduce a GetSnapshotFlashingStatus function that expose more
information than AreAllSnapshotsCancelled. We can use the returned
map<string, bool> to determine whether a partition is flashed or
not.
- Introduce ShouldUnmapDeleteSnapshot which determines whether
unmapping / deleteting a snapshot is needed in RemoveAllSnapshots.
Test: apply OTA, flash target slot, then inspect logs
Bug: 147696014
Change-Id: I0853d1e213566af2a3401e46fac7d9586cee7aaf
Merged-In: I0853d1e213566af2a3401e46fac7d9586cee7aaf
Diffstat (limited to 'libpackagelistparser/packagelistparser_test.cpp')
0 files changed, 0 insertions, 0 deletions
