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)
diff --git a/tools/buildbot-setup-device.sh b/tools/buildbot-setup-device.sh
index ad2c59c..d2dd644 100755
--- a/tools/buildbot-setup-device.sh
+++ b/tools/buildbot-setup-device.sh
@@ -173,6 +173,8 @@
|| 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 927e3c5..1c82bba 100755
--- a/tools/buildbot-teardown-device.sh
+++ b/tools/buildbot-teardown-device.sh
@@ -79,7 +79,7 @@
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 @@
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