diff --git a/fs_mgr/tests/adb-remount-test.sh b/fs_mgr/tests/adb-remount-test.sh index 0df8cf081..ec732533f 100755 --- a/fs_mgr/tests/adb-remount-test.sh +++ b/fs_mgr/tests/adb-remount-test.sh @@ -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 2>/dev/null +adb_sh find ${MOUNTS} /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 2>/dev/null + adb_sh find ${MOUNTS} /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/null 2>/dev/null +adb_sh find ${MOUNTS} /dev/null 2>/dev/null || true # Check if the updated libc.so is persistent after reboot. adb_root &&