From ad3a57bdbaa05fd531a05373a07f0435a9d5dc33 Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Mon, 31 May 2021 17:40:49 +0800 Subject: [PATCH] adb-remount-test: Make awk scripts mawk-v1.3.3-compatible Our CI is failing because the host machine is using mawk instead of gawk. mawk v1.3.3 cannot parse regex such as '/[/]/', while mawk v1.3.4 and gawk can. Change regex of '[/]' to '\/' so that our test script is as backward compatible as possible. Bug: 188862155 Test: Run adb-remount-test.sh on CI Change-Id: Ia4fbce58a61325a5e5280ede0d5b7760832d8ec1 --- fs_mgr/tests/adb-remount-test.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs_mgr/tests/adb-remount-test.sh b/fs_mgr/tests/adb-remount-test.sh index 0c5fe3d65..9542bc167 100755 --- a/fs_mgr/tests/adb-remount-test.sh +++ b/fs_mgr/tests/adb-remount-test.sh @@ -762,15 +762,15 @@ skip_administrative_mounts() { "ramdumpfs" "binder" "securityfs" "functionfs" "rootfs" ) local exclude_devices=( - "[/]sys[/]kernel[/]debug" "[/]data[/]media" "[/]dev[/]block[/]loop[0-9]*" + "\/sys\/kernel\/debug" "\/data\/media" "\/dev\/block\/loop[0-9]*" "${exclude_filesystems[@]}" ) local exclude_mount_points=( - "[/]cache" "[/]mnt[/]scratch" "[/]mnt[/]vendor[/]persist" "[/]persist" - "[/]metadata" + "\/cache" "\/mnt\/scratch" "\/mnt\/vendor\/persist" "\/persist" + "\/metadata" ) if [ "data" = "${1}" ]; then - exclude_mount_points+=("[/]data") + exclude_mount_points+=("\/data") fi awk '$1 !~ /^('"$(join_with "|" "${exclude_devices[@]}")"')$/ && $2 !~ /^('"$(join_with "|" "${exclude_mount_points[@]}")"')$/ && @@ -934,7 +934,7 @@ ACTIVE_SLOT=`get_active_slot` PARTITIONS=`adb_su cat /vendor/etc/fstab*