diff options
author | Edward Liaw <edliaw@google.com> | 2023-02-01 03:01:23 +0000 |
---|---|---|
committer | Edward Liaw <edliaw@google.com> | 2024-01-24 00:10:23 +0000 |
commit | 7e5925ef02309f85ece04087cf6f7d6048efeee2 (patch) | |
tree | 239c82659b0247b7f01569c7beb255437ed9021e | |
parent | 2520bfb0d94b051a8aa391aba1d89a37a75af405 (diff) | |
download | core-7e5925ef02309f85ece04087cf6f7d6048efeee2.tar.gz |
sched_policy_test: set_sched_policy also set the cpuset policy as fallback
get_sched_policy uses the cpuset policy as fallback if the cpu cgroup
is not recognized. Pixel is currently not using the cpu cgroup for
background policy due to b/208895940.
Bug: 265852986
Bug: 287704782
Test: atest libcutils_test:libcutils_test.SchedPolicy#set_sched_policy -- --abi arm64-v8a
Signed-off-by: Edward Liaw <edliaw@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:d5ffbdfc56a7c2510a3f1bdca9fd714f30a19434)
Merged-In: Ia77ace7513c48b1a14290c6ecc0222b46d6bf927
Change-Id: Ia77ace7513c48b1a14290c6ecc0222b46d6bf927
-rw-r--r-- | libcutils/sched_policy_test.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcutils/sched_policy_test.cpp b/libcutils/sched_policy_test.cpp index b9e28321b..50bd6d0b8 100644 --- a/libcutils/sched_policy_test.cpp +++ b/libcutils/sched_policy_test.cpp @@ -75,9 +75,11 @@ TEST(SchedPolicy, set_sched_policy) { } ASSERT_EQ(0, set_sched_policy(0, SP_BACKGROUND)); + ASSERT_EQ(0, set_cpuset_policy(0, SP_BACKGROUND)); AssertPolicy(SP_BACKGROUND); ASSERT_EQ(0, set_sched_policy(0, SP_FOREGROUND)); + ASSERT_EQ(0, set_cpuset_policy(0, SP_FOREGROUND)); AssertPolicy(SP_FOREGROUND); } |