fs_mgr: overlayfs: test: skip apex mounts
Strip out /dev/block/loop* devices to filter out apex mounts. Deal with scale of skip_administrative_mounts function to make for easier maintenance. Test: adb-remount-test.sh Bug: 109821005 Bug: 112455435 Change-Id: Ic7382a613db8f3ac7cdc10721194042378d136b9
This commit is contained in:
parent
5729cff611
commit
0733a86990
|
@ -176,11 +176,15 @@ check_eq() {
|
|||
die "${@}"
|
||||
}
|
||||
|
||||
[ "USAGE: skip_administrative_mounts
|
||||
[ "USAGE: skip_administrative_mounts < /proc/mounts
|
||||
|
||||
Filters out all administrative (eg: sysfs) mounts" ]
|
||||
Filters out all administrative (eg: sysfs) mounts uninteresting to the test" ]
|
||||
skip_administrative_mounts() {
|
||||
grep -v -e "^\(overlay\|tmpfs\|none\|sysfs\|proc\|selinuxfs\|debugfs\|bpf\|cg2_bpf\|pstore\|tracefs\|adb\|mtp\|ptp\|devpts\|/data/media\) " -e " /\(cache\|mnt/scratch\|mnt/vendor/persist\|metadata\|data\) "
|
||||
grep -v \
|
||||
-e "^\(overlay\|tmpfs\|none\|sysfs\|proc\|selinuxfs\|debugfs\) " \
|
||||
-e "^\(bpf\|cg2_bpf\|pstore\|tracefs\|adb\|mtp\|ptp\|devpts\) " \
|
||||
-e "^\(/data/media\|/dev/block/loop[0-9]*\) " \
|
||||
-e " /\(cache\|mnt/scratch\|mnt/vendor/persist\|metadata\|data\) "
|
||||
}
|
||||
|
||||
if [ X"-s" = X"${1}" -a -n "${2}" ]; then
|
||||
|
|
Loading…
Reference in New Issue