Lines Matching refs:status

283         binder::Status status;  in TEST_F()  local
286 status = mNetd->ipSecAddTunnelInterface(td.deviceName, td.localAddress, td.remoteAddress, in TEST_F()
288 EXPECT_TRUE(status.isOk()) << td.family << status.exceptionMessage(); in TEST_F()
294 status = mNetd->ipSecUpdateTunnelInterface(td.deviceName, td.localAddress, td.remoteAddress, 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()
335 android::netdutils::Status status = XfrmController::ipSecAllocateSpi(0, "::", "::1", 123, spi); in allocateIpSecResources() local
336 SCOPED_TRACE(status); in allocateIpSecResources()
337 RETURN_FALSE_IF_NEQ(status.ok(), expectOk); in allocateIpSecResources()
340 status = XfrmController::ipSecAddSecurityPolicy(0, AF_INET6, 0, "::", "::1", 123, 0, 0, 0); in allocateIpSecResources()
341 SCOPED_TRACE(status); in allocateIpSecResources()
342 RETURN_FALSE_IF_NEQ(status.ok(), expectOk); in allocateIpSecResources()
351 android::binder::Status status; in TEST_F() local
357 status = mNetd->ipSecAddSecurityPolicy(0, addrFamily, direction, "127.0.0.5", in TEST_F()
359 EXPECT_TRUE(status.isOk()) in TEST_F()
367 status = mNetd->ipSecDeleteSecurityPolicy(0, addrFamily, direction, 0, 0, 0); in TEST_F()
368 EXPECT_TRUE(status.isOk()); in TEST_F()
375 binder::Status status; in TEST_F() local
381 status = mNetd->ipSecAddSecurityPolicy(0, addrFamily, direction, "2001:db8::f00d", in TEST_F()
383 EXPECT_TRUE(status.isOk()) in TEST_F()
391 status = mNetd->ipSecDeleteSecurityPolicy(0, addrFamily, direction, 0, 0, 0); in TEST_F()
392 EXPECT_TRUE(status.isOk()); in TEST_F()
399 android::netdutils::Status status; in TEST_F() local
400 status = XfrmController::Init(); in TEST_F()
401 SCOPED_TRACE(status); in TEST_F()
405 if (status.code() == EOPNOTSUPP) return; in TEST_F()
407 ASSERT_TRUE(status.ok()); in TEST_F()
414 status = XfrmController::Init(); in TEST_F()
415 ASSERT_TRUE(status.ok()); in TEST_F()
419 status = XfrmController::ipSecDeleteSecurityAssociation(0, "::", "::1", 123, spi, 0, 0); in TEST_F()
420 SCOPED_TRACE(status); in TEST_F()
421 ASSERT_TRUE(status.ok()); in TEST_F()
423 status = XfrmController::ipSecDeleteSecurityPolicy(0, AF_INET6, 0, 0, 0, 0); in TEST_F()
424 SCOPED_TRACE(status); in TEST_F()
425 ASSERT_TRUE(status.ok()); in TEST_F()
612 binder::Status status = mNetd->networkRejectNonSecureVpn(false, uidRanges); in TEST_F() local
613 ASSERT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
614 EXPECT_EQ(ENOENT, status.serviceSpecificErrorCode()); in TEST_F()
834 binder::Status status = mNetd->interfaceAddAddress( in TEST_F() local
837 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
839 ASSERT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
840 ASSERT_EQ(td.expectAddResult, status.serviceSpecificErrorCode()); in TEST_F()
851 status = mNetd->interfaceDelAddress(sTun.name(), td.addrString, td.prefixLength); in TEST_F()
853 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
855 ASSERT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
856 ASSERT_EQ(td.expectRemoveResult, status.serviceSpecificErrorCode()); in TEST_F()
868 binder::Status status = in TEST_F() local
870 ASSERT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
871 status = mNetd->interfaceAddAddress(tun.name(), "2001:db8::1", 64); in TEST_F()
872 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
873 EXPECT_EQ(EACCES, status.serviceSpecificErrorCode()); in TEST_F()
900 const binder::Status status = in TEST_F() local
905 EXPECT_EQ(0, status.exceptionCode()); in TEST_F()
906 EXPECT_EQ(0, status.serviceSpecificErrorCode()); in TEST_F()
910 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
911 EXPECT_EQ(td.expectedReturnCode, status.serviceSpecificErrorCode()); in TEST_F()
936 const binder::Status status = in TEST_F() local
941 EXPECT_EQ(0, status.exceptionCode()); in TEST_F()
942 EXPECT_EQ(0, status.serviceSpecificErrorCode()); in TEST_F()
945 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
946 EXPECT_EQ(td.expectedReturnCode, status.serviceSpecificErrorCode()); in TEST_F()
1046 binder::Status status = mNetd->tetherGetStats(&statsVec); in TEST_F() local
1047 EXPECT_TRUE(status.isOk()) << "Getting tethering stats failed: " << status; in TEST_F()
1121 binder::Status status; in TEST_F() local
1131 status = mNetd->idletimerAddInterface(td.ifname, td.timeout, td.classLabel); in TEST_F()
1132 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1135 status = mNetd->idletimerRemoveInterface(td.ifname, td.timeout, td.classLabel); in TEST_F()
1136 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1181 binder::Status status; in TEST_F() local
1185 status = mNetd->strictUidCleartextPenalty(uid, INetd::PENALTY_POLICY_LOG); in TEST_F()
1186 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1190 status = mNetd->strictUidCleartextPenalty(uid, INetd::PENALTY_POLICY_ACCEPT); in TEST_F()
1194 status = mNetd->strictUidCleartextPenalty(uid, INetd::PENALTY_POLICY_REJECT); in TEST_F()
1195 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1199 status = mNetd->strictUidCleartextPenalty(uid, INetd::PENALTY_POLICY_ACCEPT); in TEST_F()
1204 status = mNetd->strictUidCleartextPenalty(uid, wrongPolicy); in TEST_F()
1205 EXPECT_EQ(EINVAL, status.serviceSpecificErrorCode()); in TEST_F()
1246 binder::Status status; in TEST_F() local
1253 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1254 EXPECT_FALSE(status.isOk()); in TEST_F()
1255 EXPECT_EQ(ENODEV, status.serviceSpecificErrorCode()); in TEST_F()
1262 status = mNetd->clatdStart(sTun.name(), "2001:db8:cafe:f00d::/64", &clatAddress); in TEST_F()
1263 EXPECT_FALSE(status.isOk()); in TEST_F()
1264 EXPECT_EQ(EINVAL, status.serviceSpecificErrorCode()); in TEST_F()
1267 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1268 EXPECT_FALSE(status.isOk()); in TEST_F()
1269 EXPECT_EQ(EADDRNOTAVAIL, status.serviceSpecificErrorCode()); in TEST_F()
1275 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1276 EXPECT_FALSE(status.isOk()); in TEST_F()
1277 EXPECT_EQ(EADDRNOTAVAIL, status.serviceSpecificErrorCode()); in TEST_F()
1284 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1285 EXPECT_TRUE(status.isOk()); in TEST_F()
1286 EXPECT_EQ(0, status.serviceSpecificErrorCode()); in TEST_F()
1289 status = mNetd->clatdStart(sTun.name(), nat64Prefix, &clatAddress); in TEST_F()
1290 EXPECT_FALSE(status.isOk()); in TEST_F()
1291 EXPECT_EQ(EBUSY, status.serviceSpecificErrorCode()); in TEST_F()
1296 status = mNetd->clatdStop(sTun.name()); in TEST_F()
1297 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1301 status = mNetd->clatdStop(sTun.name()); in TEST_F()
1302 EXPECT_FALSE(status.isOk()); in TEST_F()
1303 EXPECT_EQ(ENODEV, status.serviceSpecificErrorCode()); in TEST_F()
1368 binder::Status status = mNetd->ipfwdGetRequesterList(&requesterList); in TEST_F() local
1369 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1375 status = mNetd->ipfwdEnableForwarding("TestRequester"); in TEST_F()
1376 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1379 status = mNetd->ipfwdEnabled(&ipfwdEnabled); in TEST_F()
1380 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1384 status = mNetd->ipfwdDisableForwarding("TestRequester"); in TEST_F()
1385 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1388 status = mNetd->ipfwdEnabled(&ipfwdEnabled); in TEST_F()
1389 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1394 status = mNetd->ipfwdDisableForwarding(requester); in TEST_F()
1395 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1400 status = mNetd->ipfwdEnabled(&ipfwdEnabled); in TEST_F()
1401 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1406 status = mNetd->ipfwdEnableForwarding(requester); in TEST_F()
1407 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1412 status = mNetd->ipfwdEnabled(&ipfwdEnabled); in TEST_F()
1413 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1425 binder::Status status = mNetd->ipfwdAddInterfaceForward(sTun.name(), sTun2.name()); in TEST_F() local
1426 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1429 status = mNetd->ipfwdRemoveInterfaceForward(sTun.name(), sTun2.name()); in TEST_F()
1430 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1558 binder::Status status = mNetd->bandwidthSetInterfaceQuota(sTun.name(), testQuotaBytes); in TEST_F() local
1559 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1562 status = mNetd->bandwidthRemoveInterfaceQuota(sTun.name()); in TEST_F()
1563 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1576 binder::Status status = mNetd->bandwidthSetInterfaceQuota(sTun.name(), testAlertBytes); in TEST_F() local
1577 status = mNetd->bandwidthSetInterfaceAlert(sTun.name(), testAlertBytes); in TEST_F()
1578 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1581 status = mNetd->bandwidthRemoveInterfaceAlert(sTun.name()); in TEST_F()
1582 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1586 status = mNetd->bandwidthRemoveInterfaceQuota(sTun.name()); in TEST_F()
1587 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1597 binder::Status status = mNetd->bandwidthSetGlobalAlert(testAlertBytes); in TEST_F() local
1598 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1602 status = mNetd->bandwidthSetGlobalAlert(testAlertBytes); in TEST_F()
1603 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1615 binder::Status status = mNetd->bandwidthAddNaughtyApp(uid); in TEST_F() local
1616 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1620 status = mNetd->bandwidthRemoveNaughtyApp(uid); in TEST_F()
1621 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1625 status = mNetd->bandwidthAddNiceApp(uid); in TEST_F()
1626 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1630 status = mNetd->bandwidthRemoveNiceApp(uid); in TEST_F()
1631 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1815 binder::Status status = in TEST_F() local
1817 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1824 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1826 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1833 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1835 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1843 binder::Status status = in TEST_F() local
1846 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1850 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1851 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1854 status = mNetd->networkRemoveRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop); in TEST_F()
1856 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1860 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1861 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1867 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1870 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1874 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1875 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1878 status = mNetd->networkRemoveLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, in TEST_F()
1881 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1885 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1886 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1892 status = mNetd->networkAddLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, td.testNextHop, in TEST_F()
1895 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1899 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1900 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1903 status = mNetd->networkRemoveLegacyRoute(TEST_NETID1, sTun.name(), td.testDest, in TEST_F()
1906 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1910 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1911 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1924 binder::Status status = mNetd->networkAddRouteParcel(TEST_NETID1, parcel); in TEST_F() local
1926 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1930 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1931 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1935 status = mNetd->networkUpdateRouteParcel(TEST_NETID1, parcel); in TEST_F()
1937 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1941 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1942 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1945 status = mNetd->networkRemoveRouteParcel(TEST_NETID1, parcel); in TEST_F()
1947 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1951 EXPECT_EQ(binder::Status::EX_SERVICE_SPECIFIC, status.exceptionCode()); in TEST_F()
1952 EXPECT_NE(0, status.serviceSpecificErrorCode()); in TEST_F()
1965 binder::Status status = mNetd->networkGetDefault(&mStoredDefaultNetwork); in TEST_F() local
1966 ASSERT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1969 status = mNetd->networkSetDefault(TEST_NETID1); in TEST_F()
1970 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1973 status = mNetd->networkClearDefault(); in TEST_F()
1974 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1978 status = mNetd->networkSetDefault(mStoredDefaultNetwork); in TEST_F()
1979 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1982 status = mNetd->networkSetPermissionForNetwork(TEST_NETID1, INetd::PERMISSION_SYSTEM); in TEST_F()
1983 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1987 status = mNetd->networkSetPermissionForNetwork(TEST_NETID1, INetd::PERMISSION_NONE); in TEST_F()
1988 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
1997 binder::Status status = mNetd->networkSetProtectAllow(TEST_UID1); in TEST_F() local
1998 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2000 status = mNetd->networkCanProtect(TEST_UID1, &ret); in TEST_F()
2003 status = mNetd->networkSetProtectDeny(TEST_UID1); in TEST_F()
2004 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2010 status = mNetd->networkCanProtect(TEST_UID1, &ret); in TEST_F()
2089 binder::Status status = mNetd->tetherStartWithConfiguration(config); in TEST_F() local
2090 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2099 status = mNetd->tetherIsEnabled(&tetherEnabled); in TEST_F()
2100 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2103 status = mNetd->tetherStop(); in TEST_F()
2104 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2107 status = mNetd->tetherIsEnabled(&tetherEnabled); in TEST_F()
2108 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2116 binder::Status status = mNetd->tetherInterfaceAdd(sTun.name()); in TEST_F() local
2117 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2121 status = mNetd->tetherInterfaceList(&ifList); in TEST_F()
2122 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2125 status = mNetd->tetherInterfaceRemove(sTun.name()); in TEST_F()
2126 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2129 status = mNetd->tetherInterfaceList(&ifList); in TEST_F()
2130 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2139 binder::Status status = mNetd->tetherDnsSet(TEST_NETID1, testDnsAddrs); in TEST_F() local
2140 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2143 status = mNetd->tetherDnsList(&dnsList); in TEST_F()
2144 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2215 binder::Status status = mNetd->tetherStop(); in TEST_F() local
2216 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2220 status = mNetd->tetherInterfaceAdd(tun1.name()); in TEST_F()
2221 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2231 status = mNetd->tetherStartWithConfiguration(config); in TEST_F()
2232 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2239 status = mNetd->tetherInterfaceList(&ifList); in TEST_F()
2240 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2255 status = mNetd->tetherInterfaceAdd(tun2.name()); in TEST_F()
2256 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2265 status = mNetd->tetherStop(); in TEST_F()
2266 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2270 status = mNetd->tetherInterfaceRemove(tun1.name()); in TEST_F()
2271 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2273 status = mNetd->tetherInterfaceRemove(tun2.name()); in TEST_F()
2274 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2444 binder::Status status = mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F() local
2445 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2448 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2449 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2454 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2455 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2460 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F()
2461 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2465 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2466 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2472 binder::Status status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F() local
2473 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2475 status = mNetd->firewallSetInterfaceRule(sTun.name(), INetd::FIREWALL_RULE_ALLOW); in TEST_F()
2476 EXPECT_FALSE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2479 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F()
2480 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2482 status = mNetd->firewallSetInterfaceRule(sTun.name(), INetd::FIREWALL_RULE_ALLOW); in TEST_F()
2483 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2486 status = mNetd->firewallSetInterfaceRule(sTun.name(), INetd::FIREWALL_RULE_DENY); in TEST_F()
2487 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2491 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2492 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2502 binder::Status status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_DOZABLE, uid, in TEST_F() local
2504 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2508 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_DOZABLE, uid, in TEST_F()
2510 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2514 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_POWERSAVE, uid, in TEST_F()
2516 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2520 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_POWERSAVE, uid, in TEST_F()
2522 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2526 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_STANDBY, uid, in TEST_F()
2528 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2532 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_STANDBY, uid, in TEST_F()
2534 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2538 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_NONE, uid, INetd::FIREWALL_RULE_DENY); in TEST_F()
2539 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2544 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_NONE, uid, INetd::FIREWALL_RULE_ALLOW); in TEST_F()
2545 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2550 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_WHITELIST); in TEST_F()
2551 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2555 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_NONE, uid, INetd::FIREWALL_RULE_ALLOW); in TEST_F()
2556 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2561 status = mNetd->firewallSetUidRule(INetd::FIREWALL_CHAIN_NONE, uid, INetd::FIREWALL_RULE_DENY); in TEST_F()
2562 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2567 status = mNetd->firewallSetFirewallType(INetd::FIREWALL_BLACKLIST); in TEST_F()
2568 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2575 binder::Status status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_DOZABLE, true); in TEST_F() local
2576 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2579 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_STANDBY, true); in TEST_F()
2580 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2583 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_POWERSAVE, true); in TEST_F()
2584 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2587 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_DOZABLE, false); in TEST_F()
2588 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2591 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_STANDBY, false); in TEST_F()
2592 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2595 status = mNetd->firewallEnableChildChain(INetd::FIREWALL_CHAIN_POWERSAVE, false); in TEST_F()
2596 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2624 EXPECT_TRUE(isOk(fd.status())); in ioctlByIfName()
2636 if (isOk(res.status())) { in getInterfaceHwAddr()
2647 if (isOk(res.status())) { in getInterfaceIPv4Prefix()
2659 if (isOk(res.status())) { in getInterfaceIPv4Addr()
2670 if (isOk(res.status())) { in getInterfaceFlags()
2791 binder::Status status = mNetd->interfaceGetList(&interfaceListResult); in TEST_F() local
2792 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2803 binder::Status status = mNetd->interfaceGetCfg(sTun.name(), &interfaceCfgResult); in TEST_F() local
2804 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2824 binder::Status status = mNetd->interfaceSetCfg(interfaceCfg); in TEST_F() local
2825 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2830 status = mNetd->interfaceSetCfg(interfaceCfg); in TEST_F()
2831 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2832 status = mNetd->interfaceClearAddrs(sTun.name()); in TEST_F()
2833 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2841 binder::Status status = mNetd->interfaceSetIPv6PrivacyExtensions(sTun.name(), true); in TEST_F() local
2842 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2846 status = mNetd->interfaceSetIPv6PrivacyExtensions(sTun.name(), false); in TEST_F()
2847 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2861 binder::Status status = mNetd->interfaceSetCfg(interfaceCfg); in TEST_F() local
2862 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2865 status = mNetd->interfaceClearAddrs(sTun.name()); in TEST_F()
2866 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2879 binder::Status status = mNetd->interfaceSetEnableIPv6(sTun.name(), false); in TEST_F() local
2880 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2884 status = mNetd->interfaceSetEnableIPv6(sTun.name(), true); in TEST_F()
2885 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2899 binder::Status status = mNetd->interfaceSetMtu(sTun.name(), testMtu); in TEST_F() local
2900 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2993 binder::Status status = mNetd->tetherAddForward(sTun.name(), sTun2.name()); in TEST_F() local
2994 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
2997 status = mNetd->tetherRemoveForward(sTun.name(), sTun2.name()); in TEST_F()
2998 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3082 binder::Status status = mNetd->registerUnsolicitedEventListener( in TEST_F() local
3084 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3214 binder::Status status = mNetd->getOemNetd(&binder); in TEST_F() local
3215 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3254 status = oemNetd->registerOemUnsolicitedEventListener( in TEST_F()
3258 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3551 auto status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F() local
3552 EXPECT_FALSE(status.isOk()); in TEST_F()
3553 EXPECT_EQ(EAFNOSUPPORT, status.serviceSpecificErrorCode()); in TEST_F()
3558 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3559 EXPECT_FALSE(status.isOk()); in TEST_F()
3560 EXPECT_EQ(ENXIO, status.serviceSpecificErrorCode()); in TEST_F()
3565 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3566 EXPECT_FALSE(status.isOk()); in TEST_F()
3567 EXPECT_EQ(ENXIO, status.serviceSpecificErrorCode()); in TEST_F()
3572 status = mNetd->tetherOffloadRuleRemove(rule); in TEST_F()
3573 EXPECT_FALSE(status.isOk()); in TEST_F()
3574 EXPECT_EQ(EAFNOSUPPORT, status.serviceSpecificErrorCode()); in TEST_F()
3578 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3579 EXPECT_FALSE(status.isOk()); in TEST_F()
3580 EXPECT_EQ(EINVAL, status.serviceSpecificErrorCode()); in TEST_F()
3581 status = mNetd->tetherOffloadRuleRemove(rule); in TEST_F()
3582 EXPECT_FALSE(status.isOk()); in TEST_F()
3583 EXPECT_EQ(EINVAL, status.serviceSpecificErrorCode()); in TEST_F()
3587 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3588 EXPECT_FALSE(status.isOk()); in TEST_F()
3589 EXPECT_EQ(ENODEV, status.serviceSpecificErrorCode()); in TEST_F()
3591 status = mNetd->tetherOffloadRuleRemove(rule); in TEST_F()
3592 EXPECT_FALSE(status.isOk()); in TEST_F()
3593 EXPECT_EQ(ENODEV, status.serviceSpecificErrorCode()); in TEST_F()
3597 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3598 EXPECT_FALSE(status.isOk()); in TEST_F()
3599 EXPECT_EQ(EINVAL, status.serviceSpecificErrorCode()); in TEST_F()
3603 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3604 EXPECT_FALSE(status.isOk()); in TEST_F()
3605 EXPECT_EQ(EINVAL, status.serviceSpecificErrorCode()); in TEST_F()
3690 binder::Status status = mNetd->networkAddInterface(INetd::LOCAL_NET_ID, tap.name()); in TEST_F() local
3691 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3692 status = mNetd->tetherInterfaceAdd(tap.name()); in TEST_F()
3693 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3697 status = mNetd->networkAddRoute(INetd::LOCAL_NET_ID, tap.name(), kDownstreamPrefix, ""); in TEST_F()
3698 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3701 status = mNetd->tetherAddForward(tap.name(), sTun.name()); in TEST_F()
3702 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3703 status = mNetd->ipfwdAddInterfaceForward(tap.name(), sTun.name()); in TEST_F()
3704 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3712 status = mNetd->tetherOffloadRuleAdd(rule); in TEST_F()
3713 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()
3718 status = mNetd->tetherOffloadSetInterfaceQuota(sTun.ifindex(), sizeof(pkt) * 2 - 1); in TEST_F()
3719 EXPECT_TRUE(status.isOk()) << status.exceptionMessage(); in TEST_F()