Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a178a73a authored by Connor O'Brien's avatar Connor O'Brien Committed by Steven Moreland
Browse files

libtimeinstate: add more tests



Check reported values to confirm that getUidCpuFreqTimes() and
getUidsCpuFreqTimes() are behaving reasonably.

Also revise RemoveUid test to create and then delete map entries for
an unused UID rather than UID 0. getUidCpuFreqTimes() is only meant to
be called when an app is uninstalled, and calling it with a UID that
has running tasks creates data inconsistencies that can cause the new
tests to fail. Since the revised test needs to directly manipulate the
BPF map in order to add a fake entry, move some definitions from
cputimeinstate.cpp into a header file to make them available for the
test.

Test: libtimeinstate_test passes
Bug: 78498733
Change-Id: I1587b1c7db870343ff863f2156b2a810d8ace915
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
(cherry picked from commit ff7bf701)
Merged-In: I1587b1c7db870343ff863f2156b2a810d8ace915
parent f03b6ae7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment