• Home
  • Raw
  • Download

Lines Matching refs:appUids

223     void expectUidOwnerMapValues(const std::vector<uint32_t>& appUids, uint8_t expectedRule,  in expectUidOwnerMapValues()  argument
225 for (uint32_t uid : appUids) { in expectUidOwnerMapValues()
244 void expectUidPermissionMapValues(const std::vector<uid_t>& appUids, uint8_t expectedValue) { in expectUidPermissionMapValues() argument
245 for (uid_t uid : appUids) { in expectUidPermissionMapValues()
254 void expectPrivilegedUserSet(const std::vector<uid_t>& appUids) { in expectPrivilegedUserSet() argument
256 EXPECT_EQ(appUids.size(), mTc.mPrivilegedUser.size()); in expectPrivilegedUserSet()
257 for (uid_t uid : appUids) { in expectPrivilegedUserSet()
619 std::vector<uint32_t> appUids = {1000, 1001, 10012}; in TEST_F() local
621 mTc.updateUidOwnerMap(appUids, PENALTY_BOX_MATCH, BandwidthController::IptOpInsert))); in TEST_F()
622 expectUidOwnerMapValues(appUids, PENALTY_BOX_MATCH, 0); in TEST_F()
624 mTc.updateUidOwnerMap(appUids, PENALTY_BOX_MATCH, BandwidthController::IptOpDelete))); in TEST_F()
629 std::vector<uint32_t> appUids = {1000, 1001, 10012}; in TEST_F() local
631 mTc.updateUidOwnerMap(appUids, HAPPY_BOX_MATCH, BandwidthController::IptOpInsert))); in TEST_F()
632 expectUidOwnerMapValues(appUids, HAPPY_BOX_MATCH, 0); in TEST_F()
634 mTc.updateUidOwnerMap(appUids, HAPPY_BOX_MATCH, BandwidthController::IptOpDelete))); in TEST_F()
639 std::vector<uint32_t> appUids = {1000, 1001, 10012}; in TEST_F() local
642 mTc.updateUidOwnerMap(appUids, PENALTY_BOX_MATCH, BandwidthController::IptOpInsert))); in TEST_F()
643 expectUidOwnerMapValues(appUids, PENALTY_BOX_MATCH, 0); in TEST_F()
648 mTc.updateUidOwnerMap(appUids, HAPPY_BOX_MATCH, BandwidthController::IptOpInsert))); in TEST_F()
649 expectUidOwnerMapValues(appUids, HAPPY_BOX_MATCH | PENALTY_BOX_MATCH, 0); in TEST_F()
653 mTc.updateUidOwnerMap(appUids, HAPPY_BOX_MATCH, BandwidthController::IptOpDelete))); in TEST_F()
654 expectUidOwnerMapValues(appUids, PENALTY_BOX_MATCH, 0); in TEST_F()
658 mTc.updateUidOwnerMap(appUids, PENALTY_BOX_MATCH, BandwidthController::IptOpDelete))); in TEST_F()
663 std::vector<uint32_t> appUids = {1000, 1001, 10012}; in TEST_F() local
666 mTc.updateUidOwnerMap(appUids, HAPPY_BOX_MATCH, BandwidthController::IptOpDelete))); in TEST_F()
671 mTc.updateUidOwnerMap(appUids, HAPPY_BOX_MATCH, BandwidthController::IptOpInsert))); in TEST_F()
672 expectUidOwnerMapValues(appUids, HAPPY_BOX_MATCH, 0); in TEST_F()
679 mTc.updateUidOwnerMap(appUids, PENALTY_BOX_MATCH, BandwidthController::IptOpDelete))); in TEST_F()
680 expectUidOwnerMapValues(appUids, HAPPY_BOX_MATCH, 0); in TEST_F()
786 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F() local
788 mTc.setPermissionForUids(INetd::PERMISSION_INTERNET, appUids); in TEST_F()
794 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F() local
796 mTc.setPermissionForUids(INetd::PERMISSION_NONE, appUids); in TEST_F()
797 expectUidPermissionMapValues(appUids, INetd::PERMISSION_NONE); in TEST_F()
801 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F() local
803 mTc.setPermissionForUids(INetd::PERMISSION_UPDATE_DEVICE_STATS, appUids); in TEST_F()
804 expectUidPermissionMapValues(appUids, INetd::PERMISSION_UPDATE_DEVICE_STATS); in TEST_F()
805 expectPrivilegedUserSet(appUids); in TEST_F()
820 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F() local
822 mTc.setPermissionForUids(INetd::PERMISSION_UPDATE_DEVICE_STATS, appUids); in TEST_F()
823 expectUidPermissionMapValues(appUids, INetd::PERMISSION_UPDATE_DEVICE_STATS); in TEST_F()
824 expectPrivilegedUserSet(appUids); in TEST_F()
826 mTc.setPermissionForUids(INetd::PERMISSION_NONE, appUids); in TEST_F()
828 expectUidPermissionMapValues(appUids, INetd::PERMISSION_NONE); in TEST_F()
832 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F() local
834 mTc.setPermissionForUids(INetd::PERMISSION_UPDATE_DEVICE_STATS, appUids); in TEST_F()
835 expectPrivilegedUserSet(appUids); in TEST_F()
848 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F() local
850 mTc.setPermissionForUids(INetd::PERMISSION_NONE, appUids); in TEST_F()
852 expectUidPermissionMapValues(appUids, INetd::PERMISSION_NONE); in TEST_F()
856 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F() local
858 mTc.setPermissionForUids(INetd::PERMISSION_INTERNET, appUids); in TEST_F()
866 mTc.setPermissionForUids(INetd::PERMISSION_NONE, appUids); in TEST_F()
867 expectUidPermissionMapValues(appUids, INetd::PERMISSION_NONE); in TEST_F()
869 mTc.setPermissionForUids(INetd::PERMISSION_UPDATE_DEVICE_STATS, appUids); in TEST_F()
870 expectPrivilegedUserSet(appUids); in TEST_F()
873 expectPrivilegedUserSet(appUids); in TEST_F()
875 mTc.setPermissionForUids(INetd::PERMISSION_NONE, appUids); in TEST_F()