android_system_core/fs_mgr/tests
Nikita Ioffe 5110628a12 Fix logic to figure out what /data fstab entry was mounted
Now the logic is handled by following API:
GetMountedEntryForUserdata(Fstab* fstab).

Behind the scenes it does the following:
1. Reads /proc/mounts and gets block device /data is actually mounted on.
2. In case of it's a dm-device, recursively goes into it's slaves until
finds the underlying block device.
3. Optimistically assumes that corresponding block device is a symlink
and tries to read it.
4. Reads all the entries corresponding to /data from fstab.
5. For each of them, optimistically tries to readlink block_device.
6. If it matches the resolved block devices, we found our fstab entry!

Also added a test to CtsFsMgrTestCases asserting that /data was mounted
from one of entries in default fstab.

Test: on blueline & taimen, with & without checkpointing:
Test: atest CtsFsMgrTestCases
Test: adb reboot userspace

Bug: 135984674
Change-Id: Ic70daeeb18096c7b134004334cc674dacc6e36f3
2019-11-22 13:34:59 +00:00
..
src/com/android/tests/vendoroverlay Add presubmit test for vendor overlay 2019-02-16 08:24:35 +09:00
adb-remount-sh.xml Increase adb-remount timeout 2019-04-03 08:27:29 -07:00
adb-remount-test.sh fs_mgr: overlayfs: fsck scratch filesystem 2019-10-02 13:30:07 -07:00
Android.bp Add fs_mgr_unit_test to CTS 2019-10-28 16:28:02 +00:00
AndroidTest.xml Add fs_mgr_unit_test to CTS 2019-10-28 16:28:02 +00:00
file_wait_test.cpp Introduce inotify-based replacements for fs_mgr_wait_for_file. 2019-06-18 15:27:09 -07:00
fs_mgr_test.cpp Fix logic to figure out what /data fstab entry was mounted 2019-11-22 13:34:59 +00:00
vendor-overlay-test.xml Add presubmit test for vendor overlay 2019-02-16 08:24:35 +09:00