/packages/modules/DnsResolver/tests/ |
D | resolv_cache_unit_test.cpp | 149 cacheDelete(TEST_NETID); in ~ResolvCacheTest() 269 EXPECT_EQ(0, cacheCreate(TEST_NETID)); in TEST_F() 270 EXPECT_EQ(-EEXIST, cacheCreate(TEST_NETID)); in TEST_F() 271 EXPECT_TRUE(has_named_cache(TEST_NETID)); in TEST_F() 279 cacheDelete(TEST_NETID); in TEST_F() 280 EXPECT_FALSE(has_named_cache(TEST_NETID)); in TEST_F() 286 EXPECT_EQ(0, cacheCreate(TEST_NETID)); in TEST_F() 292 EXPECT_EQ(-EINVAL, cacheAdd(TEST_NETID, queryEmpty, ce.answer)); in TEST_F() 293 EXPECT_EQ(-EINVAL, cacheAdd(TEST_NETID, queryTooSmall, ce.answer)); in TEST_F() 300 EXPECT_EQ(0, cacheCreate(TEST_NETID)); in TEST_F() [all …]
|
D | resolv_integration_test.cpp | 221 TEST_NETID /*monitor specific network*/); in SetUpTestSuite() 226 TEST_NETID /*monitor specific network*/); in SetUpTestSuite() 300 TEST_NETID, eventType, returnCode, in ExpectDnsEvent() 344 if (!DnsResponderClient::GetResolverInfo(mDnsClient.resolvService(), TEST_NETID, in expectStatsFromGetResolverInfo() 696 mDnsClient.resolvService(), TEST_NETID, &res_servers, &res_domains, &res_tls_servers, in TEST_F() 885 mDnsClient.resolvService(), TEST_NETID, &res_servers, &res_domains, in TEST_F() 1201 mDnsClient.resolvService(), TEST_NETID, &res_servers, &res_domains, &res_tls_servers, in TEST_F() 1432 EXPECT_TRUE(mDnsClient.resolvService()->flushNetworkCache(TEST_NETID).isOk()); in TEST_F() 1499 mDnsClient.resolvService(), TEST_NETID, &res_servers, &res_domains, &res_tls_servers, in TEST_F() 1612 const auto& res_domains1 = getResolverDomains(mDnsClient.resolvService(), TEST_NETID); in TEST_F() [all …]
|
D | resolv_gold_test.cpp | 83 resolv_create_cache_for_net(TEST_NETID); in SetUp() 88 privateDnsConfiguration.clear(TEST_NETID); in TearDown() 90 resolv_delete_cache_for_net(TEST_NETID); in TearDown() 105 fwmark.netId = TEST_NETID; 109 ASSERT_EQ(privateDnsConfiguration.set(TEST_NETID, fwmark.intValue, tlsServers, tlsHostname, 112 ASSERT_EQ(resolv_set_nameservers(TEST_NETID, servers, domains, kParams, std::nullopt), 0); 132 privateDnsConfiguration.getStatus(TEST_NETID).validatedServers(); in WaitForPrivateDnsValidation() 260 .app_netid = TEST_NETID, 262 .dns_netid = TEST_NETID, 267 .app_netid = TEST_NETID, [all …]
|
D | resolv_callback_unit_test.cpp | 109 android::net::gDnsResolv->resolverCtrl.createNetworkCache(TEST_NETID); in SetUp() 117 android::net::gDnsResolv->resolverCtrl.destroyNetworkCache(TEST_NETID); in TearDown() 131 return resolv_set_nameservers(TEST_NETID, servers, domains, params, std::nullopt); in SetResolvers() 135 .app_netid = TEST_NETID, 137 .dns_netid = TEST_NETID,
|
D | dnsresolver_binder_test.cpp | 64 constexpr int TEST_NETID = 30; variable 106 mDnsResolver->createNetworkCache(TEST_NETID); in DnsResolverBinderTest() 112 mDnsResolver->destroyNetworkCache(TEST_NETID); in ~DnsResolverBinderTest() 318 ndk::SharedRefBase::make<UnsolicitedEventListener>(TEST_NETID); in TEST_F() 347 {TEST_NETID, INetdEventListener::EVENT_GETADDRINFO, 0 /*success*/, 1, "hi", "1.2.3.4"}, in TEST_F() 348 {TEST_NETID, INetdEventListener::EVENT_GETADDRINFO, EAI_NODATA, 0, "nonexistent", ""}, in TEST_F() 454 TEST_NETID, test_params, LOCALLY_ASSIGNED_DNS, {}, td.tlsName, td.servers); in TEST_F() 516 TEST_NETID, testParams, servers, domains, "", {}); in TEST_F() 527 status = mDnsResolver->getResolverInfo(TEST_NETID, &res_servers, &res_domains, &res_tls_servers, in TEST_F() 560 const int ANOTHER_TEST_NETID = TEST_NETID + 1; in TEST_F() [all …]
|
D | resolv_unit_test.cpp | 62 resolv_create_cache_for_net(TEST_NETID); in SetUp() 66 resolv_delete_cache_for_net(TEST_NETID); in TearDown() 129 return resolv_set_nameservers(TEST_NETID, servers, domains, params, std::nullopt); in SetResolvers() 133 .app_netid = TEST_NETID, 135 .dns_netid = TEST_NETID, 1505 EXPECT_EQ(0, resolv_set_nameservers(TEST_NETID, servers, domains, params, resolverOptions, in TEST_F() 1507 EXPECT_THAT(getCustomizedTableByName(TEST_NETID, hostnameV4V6), in TEST_F() 1511 ASSERT_TRUE(getCustomizedTableByName(TEST_NETID, "not.in.cust.table").empty()); in TEST_F() 1514 ASSERT_TRUE(getCustomizedTableByName(TEST_NETID + 1, hostnameV4V6).empty()); in TEST_F() 1515 resolv_create_cache_for_net(TEST_NETID + 1); in TEST_F() [all …]
|
D | resolv_stress_test.cpp | 91 mDnsClient.resolvService(), TEST_NETID, &res_servers, &res_domains, in RunGetAddrInfoStressTest()
|
D | resolv_test_utils.h | 84 constexpr int TEST_NETID = 30; variable
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | DnsManagerTest.java | 94 static final int TEST_NETID = 100; field in DnsManagerTest 162 mDnsManager.updatePrivateDns(new Network(TEST_NETID), in testTrackedValidationUpdates() 172 mDnsManager.updateTransportsForNetwork(TEST_NETID, TEST_TRANSPORT_TYPES); in testTrackedValidationUpdates() 173 mDnsManager.noteDnsServersForNetwork(TEST_NETID, lp); in testTrackedValidationUpdates() 183 mDnsManager.updatePrivateDnsStatus(TEST_NETID, fixedLp); in testTrackedValidationUpdates() 203 mDnsManager.updatePrivateDns(new Network(TEST_NETID), in testTrackedValidationUpdates() 208 mDnsManager.updateTransportsForNetwork(TEST_NETID, TEST_TRANSPORT_TYPES); in testTrackedValidationUpdates() 209 mDnsManager.noteDnsServersForNetwork(TEST_NETID, lp); in testTrackedValidationUpdates() 212 mDnsManager.updatePrivateDnsStatus(TEST_NETID, fixedLp); in testTrackedValidationUpdates() 219 new DnsManager.PrivateDnsValidationUpdate(TEST_NETID, in testTrackedValidationUpdates() [all …]
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder_client_ndk.cpp | 26 #define TEST_NETID 30 macro 127 makeResolverParamsParcel(TEST_NETID, params, servers, domains, "", {}, ""); in SetResolversForNetwork() 137 const auto& resolverParams = makeResolverParamsParcel(TEST_NETID, params, servers, domains, in SetResolversWithTls() 151 return makeResolverParamsParcel(TEST_NETID, kDefaultParams, kDefaultServers, in GetDefaultResolverParamsParcel() 176 mNetdSrv->networkDestroy(TEST_NETID); in SetupOemNetwork() 177 mDnsResolvSrv->destroyNetworkCache(TEST_NETID); in SetupOemNetwork() 182 TEST_NETID, NativeNetworkType::PHYSICAL, INetd::PERMISSION_NONE, /*secure=*/false); in SetupOemNetwork() 188 ret = mNetdSrv->networkCreatePhysical(TEST_NETID, INetd::PERMISSION_NONE); in SetupOemNetwork() 192 fprintf(stderr, "Creating physical network %d failed, %s\n", TEST_NETID, ret.getMessage()); in SetupOemNetwork() 195 ret = mDnsResolvSrv->createNetworkCache(TEST_NETID); in SetupOemNetwork() [all …]
|
/packages/modules/Connectivity/tests/common/java/android/net/ |
D | NetworkStateSnapshotTest.kt | 35 private const val TEST_NETID = 123 constant 66 val emptySnapshot = NetworkStateSnapshot(Network(TEST_NETID), NetworkCapabilities(), in testParcelUnparcel() 69 Network(TEST_NETID), TEST_CAPABILITIES, TEST_LINK_PROPERTIES, TEST_IMSI, TYPE_WIFI) in testParcelUnparcel()
|
/packages/modules/Connectivity/tests/integration/src/com/android/server/net/integrationtests/ |
D | TestNetworkStackService.kt | 42 private const val TEST_NETID = 42 constant 69 private val network = Network(TEST_NETID) 70 private val privateDnsBypassNetwork = TestNetwork(TEST_NETID)
|
/packages/modules/CaptivePortalLogin/tests/src/com/android/captiveportallogin/ |
D | CaptivePortalLoginActivityTest.java | 115 private static final int TEST_NETID = 1234; field in CaptivePortalLoginActivityTest 126 private Network mNetwork = new Network(TEST_NETID); 339 final Network network1 = new Network(TEST_NETID + 1); in configVpnNetwork() 340 final Network network2 = new Network(TEST_NETID + 2); in configVpnNetwork()
|
/packages/modules/NetworkStack/tests/unit/src/com/android/server/connectivity/ |
D | NetworkMonitorTest.java | 245 private @Spy Network mCleartextDnsNetwork = new Network(TEST_NETID); 257 private static final int TEST_NETID = 4242; field in NetworkMonitorTest 1867 assertEquals(TEST_NETID, bundleNetwork.netId); 1871 assertEquals(TEST_NETID, networkCaptor.getValue().netId); 2458 assertEquals(TEST_NETID, bundleNetwork.netId); 2462 assertEquals(TEST_NETID, networkCaptor.getValue().netId); 2683 argThat(network -> TEST_NETID == network.netId), 2686 && TEST_NETID == ((Network) bundle.getParcelable(
|