Merge "fs_mgr: Harden adb-remount-test.sh by ERR trap handler"
This commit is contained in:
commit
df33cb98ef
1 changed files with 6 additions and 3 deletions
|
@ -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 &&
|
||||
|
|
Loading…
Reference in a new issue