Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d07ab7e5 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

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
parent 67788ef8
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -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