This is the public interface of SnapshotManager.
SnapshotManager then inherits from it.
Test: compiles
Test: vts_libsnapshot_test
Test: update_engine_unittests
Bug: 148956645
Bug: 153555889
Change-Id: Ib19c038f9bb41dd8d27f72ff6a24c231cd4c5a76
libsnapshot* uses update_metadata-protos. This
used to be optimized out, but now that SnapshotManager is
virtual, CreateUpdateSnapshots can no longer be optimized out.
Bug: 148956645
Test: compiles
Change-Id: Ib67cafd156308bf5a477996ec32eb786f8e896db
ImageManagerTest had been temporarily disabled because flaky.
This test looks stable now, re-enable it.
Bug: 148889015
Test: atest vts_libsnapshot_test [-- --abi x86]
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I858661fed7f58d1e2857ed88f5d8e0f5220bf8c2
This test is pretty straight forward: create two large files, then merge
one into the other while injecting kernel crashes. At the end,
block-by-block validation is performed against both the snapshot-merge target
and the file written to disk.
Bug: 139092356
Test: instructions in PowerTest.md
Change-Id: I28cc88160cf824039966abff4e61382090a354c5
Some of the test cases in CtsInitTestCases and CtsFsMgrTestCases require
root. This CL makes it possible to run such tests cases on userdebug
builds, which in turn means that they will be run on presubmit.
New option was implemented in
https://android-review.googlesource.com/c/platform/tools/tradefederation/+/1283834
Test: atest CtsInitTestCases
Test: atest CtsFsMgrTestCases
Change-Id: I3d29789ddd7ac549e40ac193c58d986670c49285
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL moves all tests in vts-core to vts.
It won't change test logic or behavior.
Change-Id: I24779951257ce37fc18929f214d3cf5f76c23a19
Merged-In: I24779951257ce37fc18929f214d3cf5f76c23a19
Use realpath as a canonical representation of block devices. This makes
it easier to reason about block devices. This also fixes a bug, in which
fs_mgr_get_mounted_entry_for_userdata didn't properly work on devices
that don't support metadata encryption.
Test: atest CtsFsMgrTestCases
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 153363818
Change-Id: I139c2be46336a632bbaee86667019c075d7de814
To make it easier to support disk formats created using old versions
of dm-default-key with new kernels, stop checking the kernel module
version; instead, the caller decides whether to use the old or new
options format.
Bug: 150761030
Test: crosshatch and cuttlefish boot normally; cuttlefish
fails with "default-key: Not enough arguments" as expected when
option is set to 1
Change-Id: I810bb7e085b9b8648858de1a02165162d1fd163e
Add VTS10 variant of vts_libsnapshot_test so that
it can be added to vts-kernel test.
Bug: 142513589
Test: vts10-tradefed run vts-kernel -m VtsLibnsapshotTest
Change-Id: I4e2516b94d84acb16f595aab87dd3c0cadad6166
If the value of androidboot.boot_devices has a comma in its path, it'll
get split and /dev/block/by-name symlinks won't work. As a workaround,
add "androidboot.boot_device" as a valid command-line parameter. It can
be repeated multiple times to retain multiple-boot-device semantics.
Bug: 153024538
Test: device boots with androidboot.boot_device= set
Change-Id: I1be5aeec287ba198768c3452b1930d59b2f13463
Vendors may add additional functionfs mounts. Since these
will never be remounted, we can safely filter these out.
Bug: 153008210
Test: Test device with previously unfiltered entries.
Change-Id: I7f384b8a0ce93dd6701fe3c4d9dd2557370b31e1
The tests are only needed in vts10 suite.
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL removes vts10 tests from vts suite.
It won't change test logic or behavior.
Change-Id: I4d468be075b54213b56c7e1aa94af94f2bdce9ff
If forward merge indicator exists at unverified state during FDR,
we are allowed to initiate merge and finish it before wiping userdata.
Test: downgrades
Test: update with data wipe
Test: vts_libsnapshot_test
Bug: 152094219
Change-Id: I151f1af4aca446cc52e669c5c3ea2b2e55acb468
If the device applies a package with FDR, place forward merge indicator
so that on FDR, the snapshots aren't abandoned, and we forward merge
the update.
Test: apply downgrade
Test: apply update with data wipe
Test: vts_libsnapshot_test
Bug: 152094219
Change-Id: Id32aeca380db797cd777321837f146333ae6b33c
The indicator signals that on factory data reset, initiating
merge is allowed.
Test: vts_libsnapshot_test
Test: apply downgrade update
Test: apply update with FDR
Bug: 152094219
Change-Id: Ieecddd198136571dd652ca62c27fe65a12b7b15f
This is to prepare renaming vts to vts10.
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL adds all tests in vts to a new
suite vts10. vts10 will be the new name of existing vts suite. This CL
won't change test logic or behavior.
Change-Id: I3c7ccef142de30f02a59046cecba121480f6e436
In case of GSI on DSU, /data is mounted on the following stack:
userdata -> userdata_gsi -> actual block device, and fstab returned from
ReadDefaultFstab() function will say that /data should be
mounted onto userdata_gsi. This configuration wasn't supported.
To support it, fs_mgr_get_mounted_entry_for_userdata now unwinds the
dm-device stack /data is mounted onto, and for each entry in fstab
resolves corresponding block device (in case of logical partitions by
asking DeviceMapper to resolve name -> path, and for other cases by
reading a symlink), and then checking whenever resolved block device
belongs to the unwinded stack.
Test: on both normal boot & DSU
Test: atest CtsUserspaceRebootHostSideTestCases
Test: atest CtsFsMgrTestCases
Bug: 148612148
Change-Id: I1bb3e64ae92d56de905b4f7f1997b7499b101b0f
Merged-In: I1bb3e64ae92d56de905b4f7f1997b7499b101b0f
(cherry picked from commit f495fe798b)
... so that an operation can be skipped partially. For example, if
an operation contains blocks:
563412 -> 123456
... then optimized operation is:
5612 -> 1256
Test: update_engine_unittests
Test: apply incremental OTA
Bug: 148623880
In an experiment, this reduces CoW size of an incremental update
package by 200MB (out of 700MB).
Change-Id: I86ca23fd589ddbc84c81318283b5f4e71782a759
GetGsiService() is defined in libgsid, let libfs_mgr_binder link to
libgsid instead of duplicating the logic.
Test: Build and boot
Change-Id: I28d0c92b432a53770a3bdc5f4c5cd91e3466151c
This reverts commit faa49d1d00.
Reason for revert: Callstack should not be logged.
Test: none
Bug: 148818798
Change-Id: Ie5506ae0c7408e255a464b2f403d0a47d272229e