summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorAnnie Meng <anniemeng@google.com>2018-12-11 18:24:03 +0000
committerAnnie Meng <anniemeng@google.com>2018-12-17 22:00:51 +0000
commit6a93c233fe851c5629aedf388d485c752d5a6ffe (patch)
tree87795b9bad8da680e7497b8ee6e502afe0dad4cc /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parentfeb504cb6626aab7b957ddee1c13f9cbadd7314c (diff)
[Multi-user] Decouple UserBMS and BMS creation
The BMS constructor is now only responsible for setting up the system service. User registration logic is moved to its own helper that Trampoline calls during a user unlock callback. ** Logic ** All IBackupManager methods that BMS implements now use bookkeeping to get the UserBMS instance to act on. Currently the system user instance is hardcoded in most methods as we don't pass in the user id parameter (except for a few added in ag/5667585). If these methods are called on a non-registered user, we log and return a default value. ** Tests ** Each IBackupManager method now has four corresponding tests: 1) Permission denial test: No INTERACT_ACROSS_USERS_FULL permission + non-calling user id = security exception (added in ag/5667585, only for methods that take in an user id param currently). 2) Permission grant test: INTERACT_ACROSS_USERS_FULL permission + non-calling user id = call forwarded. 3) Registered user test: Passing an user id that has a corresponding UserBMS instance -> delegate call to that UserBMS instance. 4) Unknown user test: Passing an user id that has no corresponding UserBMS instance -> no call forwarded. These tests will be updated when more methods take in an user id param. Bug: 120212806 Test: 1) atest RunFrameworksServicesRoboTests 2) Unlock system user -> starts service, registers transports 3) adb shell bmgr flows 4) atest TrampolineTest 5) CTS + GTS Backup test cases 6) SUW + Cloud restore; D2D Change-Id: Ic04f754c75af905ee34c609063c08406e23671d5
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions