Fix ArtExecTest#SetTaskProfiles.
Before this change, the test relied on the `Dex2oatPerformance` profile,
which varies from device to device. After this change, the test relies
on the `ProcessCapacityHigh` profile, which is more consistent across
devices.
Bug: 240930874
Test: atest art_standalone_libarttools_tests
Test: art/tools/run-gtests.sh \
/apex/com.android.art/bin/art/arm64/art_libarttools_tests
Test: atest ArtGtestsTargetChroot:ArtExecTest
Ignore-AOSP-First: ART Services.
Change-Id: I6649ac6925d627152998dfcf648a9576543acfb3
diff --git a/libarttools/tools/art_exec_test.cc b/libarttools/tools/art_exec_test.cc
index ca55393..37a1070 100644
--- a/libarttools/tools/art_exec_test.cc
+++ b/libarttools/tools/art_exec_test.cc
@@ -136,7 +136,7 @@
ASSERT_GE(scratch_file.GetFd(), 0);
std::vector<std::string> args{art_exec_bin_,
- "--set-task-profile=Dex2oatPerformance",
+ "--set-task-profile=ProcessCapacityHigh",
"--",
GetBin("sh"),
"-c",
@@ -144,7 +144,7 @@
auto [pid, scope_guard] = ScopedExecAndWait(args);
std::string cgroup;
ASSERT_TRUE(android::base::ReadFileToString(filename, &cgroup));
- EXPECT_THAT(cgroup, HasSubstr(":cpu:/dex2oat\n"));
+ EXPECT_THAT(cgroup, HasSubstr(":cpuset:/foreground\n"));
}
TEST_F(ArtExecTest, SetPriority) {