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
Test: atest libcutils_test:libcutils_test.SchedPolicy#set_sched_policy -- --abi arm64-v8a
Change-Id: Ia77ace7513c48b1a14290c6ecc0222b46d6bf927
Signed-off-by: Edward Liaw <edliaw@google.com>
This commit is contained in:
Edward Liaw 2023-02-01 03:01:23 +00:00
parent 06a150b9f5
commit d5ffbdfc56

View file

@ -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);
}