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:Connor O'Brien <connoro@google.com> (cherry picked from commit ff7bf701) Merged-In: I1587b1c7db870343ff863f2156b2a810d8ace915
Loading
Please register or sign in to comment