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

Commit c9376a4e authored by Yo Chiang's avatar Yo Chiang Committed by Automerger Merge Worker
Browse files

Merge "fs_mgr: Harden adb-remount-test.sh by ERR trap handler" am: df33cb98

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1564958

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I526c307e47eb69c11bc63d37b00e7248c48b8ed1
parents a753206a df33cb98
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -851,6 +851,9 @@ if ! ${color}; then
  NORMAL=""
fi

# Set an ERR trap handler to report any unhandled error
trap 'die "line ${LINENO}: unhandled error"' ERR

if ${print_time}; then
  echo "${BLUE}[     INFO ]${NORMAL}" start `date` >&2
fi
@@ -1178,7 +1181,7 @@ echo "${GREEN}[ RUN ]${NORMAL} remount" >&2

# Feed log with selinux denials as baseline before overlays
adb_unroot
adb_sh find ${MOUNTS} </dev/null >/dev/null 2>/dev/null
adb_sh find ${MOUNTS} </dev/null >/dev/null 2>/dev/null || true
adb_root

D=`adb remount 2>&1`
@@ -1365,7 +1368,7 @@ if ${enforcing}; then
  echo "${GREEN}[       OK ]${NORMAL} /vendor content correct MAC after reboot" >&2
  # Feed unprivileged log with selinux denials as a result of overlays
  wait_for_screen
  adb_sh find ${MOUNTS} </dev/null >/dev/null 2>/dev/null
  adb_sh find ${MOUNTS} </dev/null >/dev/null 2>/dev/null || true
fi
# If overlayfs has a nested security problem, this will fail.
B="`adb_ls /system/`" ||
@@ -1392,7 +1395,7 @@ check_eq "${BASE_VENDOR_DEVT}" "`adb_sh stat --format=%D /vendor/bin/stat </dev/
check_eq "${BASE_SYSTEM_DEVT}" "`adb_sh stat --format=%D /system/xbin/su </dev/null`" --warning devt for su after reboot

# Feed log with selinux denials as a result of overlays
adb_sh find ${MOUNTS} </dev/null >/dev/null 2>/dev/null
adb_sh find ${MOUNTS} </dev/null >/dev/null 2>/dev/null || true

# Check if the updated libc.so is persistent after reboot.
adb_root &&