From d5ffbdfc56a7c2510a3f1bdca9fd714f30a19434 Mon Sep 17 00:00:00 2001 From: Edward Liaw Date: Wed, 1 Feb 2023 03:01:23 +0000 Subject: [PATCH] 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 --- libcutils/sched_policy_test.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); }