adb-remount-test: provide additional mount details

For the wipe and remount vendor test, report the df and
mount states to help triage.

Test: adb-remount-test.sh
Bug: 129319403
Change-Id: I4d9a87766d9857a974e601324ab77f69681bfd28
This commit is contained in:
Mark Salyzyn 2019-05-24 09:06:09 -07:00
parent 67788ef8a1
commit d07ab7e544

View file

@ -1509,16 +1509,23 @@ adb_sh grep " /vendor .* rw," /proc/mounts >/dev/null </dev/null &&
die "/vendor is not read-only"
adb_su remount vendor </dev/null ||
die "remount command"
adb_su df -k </dev/null | skip_unrelated_mounts
adb_sh grep " /vendor .* rw," /proc/mounts >/dev/null </dev/null ||
die "/vendor is not read-write"
adb_sh grep " /system .* rw," /proc/mounts >/dev/null </dev/null &&
adb_sh grep " \(/system\|/\) .* rw," /proc/mounts >/dev/null </dev/null &&
die "/system is not read-only"
echo "${GREEN}[ OK ]${NORMAL} remount command works from scratch" >&2
restore
err=${?}
if ! restore; then
restore() {
true
}
die "failed to restore verity after remount from scratch test"
fi
if [ ${err} = 0 ] && ${overlayfs_supported}; then
err=0
if ${overlayfs_supported}; then
echo "${GREEN}[ RUN ]${NORMAL} test 'adb remount -R'" >&2
avc_check
adb_root &&
@ -1541,7 +1548,7 @@ restore() {
}
[ ${err} = 0 ] ||
die "failed to restore verity" >&2
die "failed to restore verity"
echo "${GREEN}[ PASSED ]${NORMAL} adb remount" >&2