Lines Matching refs:TEST_UID

51 constexpr uid_t TEST_UID = 10086;  variable
167 uint32_t uid = TEST_UID; in checkUidOwnerRuleForChain()
184 uid = TEST_UID; in checkUidOwnerRuleForChain()
321 int v4socket = setUpSocketAndTag(AF_INET, &sockCookie, TEST_TAG, TEST_UID, TEST_UID); in TEST_F()
322 expectUidTag(sockCookie, TEST_UID, TEST_TAG); in TEST_F()
332 int v4socket = setUpSocketAndTag(AF_INET, &sockCookie, TEST_TAG, TEST_UID, TEST_UID); in TEST_F()
333 expectUidTag(sockCookie, TEST_UID, TEST_TAG); in TEST_F()
334 ASSERT_EQ(0, mTc.tagSocket(v4socket, TEST_TAG + 1, TEST_UID + 1, TEST_UID + 1)); in TEST_F()
335 expectUidTag(sockCookie, TEST_UID + 1, TEST_TAG + 1); in TEST_F()
343 int v4socket1 = setUpSocketAndTag(AF_INET, &sockCookie1, TEST_TAG, TEST_UID, TEST_UID); in TEST_F()
344 setUpSocketAndTag(AF_INET, &sockCookie2, TEST_TAG, TEST_UID, TEST_UID); in TEST_F()
345 expectUidTag(sockCookie1, TEST_UID, TEST_TAG); in TEST_F()
346 expectUidTag(sockCookie2, TEST_UID, TEST_TAG); in TEST_F()
349 expectUidTag(sockCookie2, TEST_UID, TEST_TAG); in TEST_F()
357 int v6socket = setUpSocketAndTag(AF_INET6, &sockCookie, TEST_TAG, TEST_UID, TEST_UID); in TEST_F()
358 expectUidTag(sockCookie, TEST_UID, TEST_TAG); in TEST_F()
368 ASSERT_GT(0, mTc.tagSocket(invalidSocket, TEST_TAG, TEST_UID, TEST_UID)); in TEST_F()
377 ASSERT_EQ(-EPERM, mTc.tagSocket(sock, TEST_TAG, TEST_UID, TEST_UID2)); in TEST_F()
390 int v6socket = setUpSocketAndTag(AF_INET6, &sockCookie, TEST_TAG, TEST_UID, TEST_UID2); in TEST_F()
391 expectUidTag(sockCookie, TEST_UID, TEST_TAG); in TEST_F()
414 uid_t uid = TEST_UID; in TEST_F()
421 expectTagSocketReachLimit(TEST_TAG, TEST_UID); in TEST_F()
431 uid_t uid = TEST_UID + i; in TEST_F()
434 expectTagSocketReachLimit(TEST_TAG, TEST_UID); in TEST_F()
442 ASSERT_EQ(0, mTc.setCounterSet(TEST_COUNTERSET, TEST_UID, callingUid)); in TEST_F()
443 uid_t uid = TEST_UID; in TEST_F()
447 ASSERT_EQ(0, mTc.setCounterSet(DEFAULT_COUNTERSET, TEST_UID, callingUid)); in TEST_F()
455 ASSERT_EQ(-EPERM, mTc.setCounterSet(TEST_COUNTERSET, TEST_UID, TEST_UID2)); in TEST_F()
456 uid_t uid = TEST_UID; in TEST_F()
466 ASSERT_GT(0, mTc.setCounterSet(OVERFLOW_COUNTERSET, TEST_UID, callingUid)); in TEST_F()
467 uid_t uid = TEST_UID; in TEST_F()
476 uid_t uid = TEST_UID; in TEST_F()
480 ASSERT_EQ(-EPERM, mTc.deleteTagData(0, TEST_UID, TEST_UID2)); in TEST_F()
491 uid_t uid = TEST_UID; in TEST_F()
495 ASSERT_EQ(0, mTc.deleteTagData(TEST_TAG, TEST_UID, callingUid)); in TEST_F()
506 auto appStatsResult = mFakeAppUidStatsMap.readValue(TEST_UID); in TEST_F()
518 uid_t uid = TEST_UID; in TEST_F()
522 ASSERT_EQ(0, mTc.deleteTagData(0, TEST_UID, callingUid)); in TEST_F()
528 ASSERT_FALSE(mFakeAppUidStatsMap.readValue(TEST_UID).ok()); in TEST_F()
538 uid_t uid = TEST_UID; in TEST_F()
545 ASSERT_EQ(0, mTc.deleteTagData(TEST_TAG, TEST_UID, callingUid)); in TEST_F()
549 ASSERT_EQ(TEST_UID, cookieMapResult.value().uid); in TEST_F()
568 uid_t uid1 = TEST_UID; in TEST_F()
569 uid_t uid2 = TEST_UID + 1; in TEST_F()
607 uint32_t uid = TEST_UID; in TEST_F()
637 ASSERT_EQ(-EINVAL, mTc.changeUidOwnerRule(NONE, TEST_UID, ALLOW, ALLOWLIST)); in TEST_F()
638 ASSERT_EQ(-EINVAL, mTc.changeUidOwnerRule(INVALID_CHAIN, TEST_UID, ALLOW, ALLOWLIST)); in TEST_F()
644 std::vector<int32_t> uids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
654 std::vector<int32_t> uids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
847 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
857 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
866 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
872 std::vector<uid_t> uidToRemove = {TEST_UID}; in TEST_F()
887 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
901 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
906 std::vector<uid_t> uidToRemove = {TEST_UID}; in TEST_F()
919 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
929 std::vector<uid_t> appUids = {TEST_UID, TEST_UID2, TEST_UID3}; in TEST_F()
934 std::vector<uid_t> uidToAdd = {TEST_UID}; in TEST_F()