Lines Matching refs:td

281         const auto& td = kTestData[i];  in TEST_F()  local
286 status = mNetd->ipSecAddTunnelInterface(td.deviceName, td.localAddress, td.remoteAddress, in TEST_F()
287 td.iKey, td.oKey, td.ifId); in TEST_F()
288 EXPECT_TRUE(status.isOk()) << td.family << status.exceptionMessage(); in TEST_F()
291 EXPECT_NE(0U, if_nametoindex(td.deviceName.c_str())); in TEST_F()
294 status = mNetd->ipSecUpdateTunnelInterface(td.deviceName, td.localAddress, td.remoteAddress, in TEST_F()
295 td.iKey, td.oKey, td.ifId); in TEST_F()
296 EXPECT_TRUE(status.isOk()) << td.family << status.exceptionMessage(); in TEST_F()
299 status = mNetd->ipSecRemoveTunnelInterface(td.deviceName); in TEST_F()
300 EXPECT_TRUE(status.isOk()) << td.family << status.exceptionMessage(); in TEST_F()
303 EXPECT_EQ(0U, if_nametoindex(td.deviceName.c_str())); in TEST_F()
829 const auto &td = kTestData[i]; in TEST_F() local
831 SCOPED_TRACE(String8::format("Offending IP address %s/%d", td.addrString, td.prefixLength)); in TEST_F()
835 sTun.name(), td.addrString, td.prefixLength); in TEST_F()
836 if (td.expectAddResult == 0) { in TEST_F()
840 ASSERT_EQ(td.expectAddResult, status.serviceSpecificErrorCode()); in TEST_F()
844 if (td.expectAddResult == 0) { in TEST_F()
845 EXPECT_TRUE(interfaceHasAddress(sTun.name(), td.addrString, td.prefixLength)); in TEST_F()
847 EXPECT_FALSE(interfaceHasAddress(sTun.name(), td.addrString, -1)); in TEST_F()
851 status = mNetd->interfaceDelAddress(sTun.name(), td.addrString, td.prefixLength); in TEST_F()
852 if (td.expectRemoveResult == 0) { in TEST_F()
856 ASSERT_EQ(td.expectRemoveResult, status.serviceSpecificErrorCode()); in TEST_F()
860 EXPECT_FALSE(interfaceHasAddress(sTun.name(), td.addrString, -1)); in TEST_F()
897 const auto& td = kTestData[i]; in TEST_F() local
901 mNetd->getProcSysNet(td.ipversion, td.which, td.ifname, td.parameter, &value); in TEST_F()
903 if (td.expectedReturnCode == 0) { in TEST_F()
907 EXPECT_EQ(td.expectedValue, value); in TEST_F()
911 EXPECT_EQ(td.expectedReturnCode, status.serviceSpecificErrorCode()); in TEST_F()
935 const auto& td = kTestData[i]; in TEST_F() local
937 mNetd->setProcSysNet(td.ipversion, td.which, td.ifname, td.parameter, td.value); in TEST_F()
939 if (td.expectedReturnCode == 0) { in TEST_F()
946 EXPECT_EQ(td.expectedReturnCode, status.serviceSpecificErrorCode()); in TEST_F()
1130 for (const auto& td : idleTestData) { in TEST_F() local
1131 status = mNetd->idletimerAddInterface(td.ifname, td.timeout, td.classLabel); in TEST_F()
1133 expectIdletimerInterfaceRuleExists(td.ifname, td.timeout, td.classLabel); in TEST_F()
1135 status = mNetd->idletimerRemoveInterface(td.ifname, td.timeout, td.classLabel); in TEST_F()
1137 expectIdletimerInterfaceRuleNotExists(td.ifname, td.timeout, td.classLabel); in TEST_F()
1812 const auto& td = kTestDataWithNextHop[i]; in TEST_F() local
1816 mNetd->networkAddRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop); in TEST_F()
1818 expectNetworkRouteExists(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1824 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1827 expectNetworkRouteExists(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1833 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1836 expectNetworkRouteExists(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1841 const auto& td = kTestData[i]; in TEST_F() local
1844 mNetd->networkAddRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop); in TEST_F()
1845 if (td.expectSuccess) { in TEST_F()
1847 expectNetworkRouteExists(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1854 status = mNetd->networkRemoveRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop); in TEST_F()
1855 if (td.expectSuccess) { in TEST_F()
1857 expectNetworkRouteDoesNotExist(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1867 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1869 if (td.expectSuccess) { in TEST_F()
1871 expectNetworkRouteExists(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1878 status = mNetd->networkRemoveLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, in TEST_F()
1879 td.testNextHop, testUid); in TEST_F()
1880 if (td.expectSuccess) { in TEST_F()
1882 expectNetworkRouteDoesNotExist(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1892 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1894 if (td.expectSuccess) { in TEST_F()
1896 expectNetworkRouteExists(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1903 status = mNetd->networkRemoveLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, in TEST_F()
1904 td.testNextHop, testUid); in TEST_F()
1905 if (td.expectSuccess) { in TEST_F()
1907 expectNetworkRouteDoesNotExist(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1916 const auto& td = kTestData[i]; in TEST_F() local
1921 parcel.destination = td.testDest; in TEST_F()
1922 parcel.nextHop = td.testNextHop; in TEST_F()
1925 if (td.expectSuccess) { in TEST_F()
1927 expectNetworkRouteExistsWithMtu(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1936 if (td.expectSuccess) { in TEST_F()
1938 expectNetworkRouteExistsWithMtu(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1946 if (td.expectSuccess) { in TEST_F()
1948 expectNetworkRouteDoesNotExist(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
3187 for (const auto& td : kTestData) { in TEST_F() local
3190 td.testDest, td.testNextHop); in TEST_F()
3193 sTun.name().c_str(), td.testDest, td.testNextHop); in TEST_F()
3197 EXPECT_EQ(td.expectedResult, Trim(result[0])); in TEST_F()
3198 if (td.expectSuccess) { in TEST_F()
3199 expectNetworkRouteExists(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
3203 EXPECT_EQ(td.expectedResult, Trim(result[0])); in TEST_F()
3204 expectNetworkRouteDoesNotExist(td.ipVersion, sTun.name(), td.testDest, td.testNextHop, in TEST_F()