diff options
author | 2022-07-25 23:29:56 +0100 | |
---|---|---|
committer | 2022-07-29 14:08:26 +0000 | |
commit | 15f888e4a5fef5fd9e3213673ced74d7ba5f6089 (patch) | |
tree | 3d8baa68ffd8b454cd5a43a95c107fa0f2a4f506 | |
parent | a8761fd281b54b6971d22c18e33d0156847b0d0f (diff) |
Mount /dev/cpuctl in ART chroot test.
This directory is needed by ArtExecTest#SetTaskProfiles.
Bug: 229268202
Test: art/tools/run-gtests.sh \
/apex/com.android.art/bin/art/x86_64/art_libarttools_tests
Change-Id: Id05ad398dd0fbbe66a4bcacc9408245d505464b1
Merged-In: Id05ad398dd0fbbe66a4bcacc9408245d505464b1
(cherry picked from commit bfeb47a98a0cf5fef0bc7bf09acb210cd4ab6d43)
-rwxr-xr-x | tools/buildbot-setup-device.sh | 2 | ||||
-rwxr-xr-x | tools/buildbot-teardown-device.sh | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/buildbot-setup-device.sh b/tools/buildbot-setup-device.sh index ad2c59cea5..d2dd6449bb 100755 --- a/tools/buildbot-setup-device.sh +++ b/tools/buildbot-setup-device.sh @@ -173,6 +173,8 @@ if [[ -n "$ART_TEST_CHROOT" ]]; then || adb shell mount -o bind /dev "$ART_TEST_CHROOT/dev" adb shell mount | grep -q "^devpts on $ART_TEST_CHROOT/dev/pts type devpts " \ || adb shell mount -o bind /dev/pts "$ART_TEST_CHROOT/dev/pts" + adb shell mount | grep -q " on $ART_TEST_CHROOT/dev/cpuctl type cgroup " \ + || adb shell mount -o bind /dev/cpuctl "$ART_TEST_CHROOT/dev/cpuctl" # Create /apex directory in chroot. adb shell mkdir -p "$ART_TEST_CHROOT/apex" diff --git a/tools/buildbot-teardown-device.sh b/tools/buildbot-teardown-device.sh index 927e3c5421..1c82bbaaa3 100755 --- a/tools/buildbot-teardown-device.sh +++ b/tools/buildbot-teardown-device.sh @@ -79,7 +79,7 @@ if [[ -n "$ART_TEST_CHROOT" ]]; then local remove_dir=$3 local dir="$ART_TEST_CHROOT/$dir_in_chroot" adb shell test -d "$dir" \ - && adb shell mount | grep -q "^$fstype on $dir type $fstype " \ + && adb shell mount | grep -q " on $dir type $fstype " \ && if adb shell umount "$dir"; then $remove_dir && adb shell rmdir "$dir" else @@ -95,6 +95,7 @@ if [[ -n "$ART_TEST_CHROOT" ]]; then adb shell rm -rf "$ART_TEST_CHROOT/apex" # Remove /dev from chroot. + remove_filesystem_from_chroot dev/cpuctl cgroup false remove_filesystem_from_chroot dev/pts devpts false remove_filesystem_from_chroot dev tmpfs true |