From fe52f3946168c858098ad39cc413b4883a36188d Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Tue, 9 Jan 2024 17:21:35 +0800 Subject: [PATCH] adb-remount-test: Only test mounts that are remounted by us Right now we assume all RW mounts (minus /data & special FS) are remounted by us and we apply the remount/overlayfs related checks on them unconditionally. This would generate false positives when a partition was RW but not remounted by us. The test should instead check mounts that were remounted by us (transitioned from RO to RW after adb-remount), and ignore partitions that were already RW before running adb-remount. Bug: 313609600 Test: adb-remount-test Change-Id: I94e8a35775271f557790a458781657eb3b24a6f5 --- fs_mgr/tests/adb-remount-test.sh | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/fs_mgr/tests/adb-remount-test.sh b/fs_mgr/tests/adb-remount-test.sh index c87e564c4..7ac7a1642 100755 --- a/fs_mgr/tests/adb-remount-test.sh +++ b/fs_mgr/tests/adb-remount-test.sh @@ -1233,6 +1233,12 @@ adb_sh grep -qE " (/system|/) [^ ]* rw," /proc/mounts &2 || die -t "${T}" "adb remount" @@ -1241,6 +1247,12 @@ adb_sh grep -qE " (/system|/) [^ ]* rw," /proc/mounts RW +RW=$(adb_sh grep " rw," /proc/mounts &2 for d in ${D}; do if adb_sh tune2fs -l "${d}" &1 | grep -q "Filesystem features:.*shared_blocks" || @@ -1319,6 +1323,10 @@ else is_overlayfs_mounted && die -t "${T}" "unexpected overlay takeover" fi +echo -n "${RW}" | + grep -v noatime && + die "mounts (rw) are not noatime" + LOG OK "adb remount RW" ################################################################################