Loading Experiments.h +2 −2 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class Experiments { // TODO: Migrate other experiment flags to here. // (retry_count, retransmission_time_interval) static constexpr const char* const kExperimentFlagKeyList[] = { "keep_listening_udp", "parallel_lookup", "parallel_lookup_sleep_time", "keep_listening_udp", "parallel_lookup_release", "parallel_lookup_sleep_time", "sort_nameservers", "dot_async_handshake", "dot_connect_timeout_ms", "dot_maxtries", }; Loading getaddrinfo.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1707,7 +1707,7 @@ static int res_queryN_parallel(const char* name, res_target* target, res_state r static int res_queryN_wrapper(const char* name, res_target* target, res_state res, int* herrno) { const bool parallel_lookup = android::net::Experiments::getInstance()->getFlag("parallel_lookup", 0); android::net::Experiments::getInstance()->getFlag("parallel_lookup_release", 1); if (parallel_lookup) return res_queryN_parallel(name, target, res, herrno); return res_queryN(name, target, res, herrno); Loading tests/resolv_gold_test.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,7 @@ TEST_F(ResolvGetAddrInfo, BasicTlsQuery) { ASSERT_TRUE(tls.startServer()); ASSERT_NO_FATAL_FAILURE(SetResolversWithTls()); EXPECT_TRUE(WaitForPrivateDnsValidation(tls.listen_address())); tls.setDelayQueries(2); dns.clearQueries(); addrinfo* res = nullptr; Loading Loading @@ -429,6 +430,7 @@ TEST_P(ResolvGoldTest, GoldData) { test::DNSResponder dns(test::DNSResponder::MappingType::BINARY_PACKET); ASSERT_TRUE(dns.startServer()); test::DnsTlsFrontend tls; tls.setDelayQueries(2); if (protocol == DnsProtocol::CLEARTEXT) { ASSERT_NO_FATAL_FAILURE(SetResolvers()); Loading tests/resolv_integration_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -5301,7 +5301,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupTimeout) { neverRespondDns.setResponseProbability(0.0); StartDns(neverRespondDns, records); ScopedSystemProperties scopedSystemProperties( "persist.device_config.netd_native.parallel_lookup", "1"); "persist.device_config.netd_native.parallel_lookup_release", "1"); // The default value of parallel_lookup_sleep_time should be very small // that we can ignore in this test case. // Re-setup test network to make experiment flag take effect. Loading Loading @@ -5336,7 +5336,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupSleepTime) { test::DNSResponder dns(listen_addr); StartDns(dns, records); ScopedSystemProperties scopedSystemProperties1( "persist.device_config.netd_native.parallel_lookup", "1"); "persist.device_config.netd_native.parallel_lookup_release", "1"); constexpr int PARALLEL_LOOKUP_SLEEP_TIME_MS = 500; ScopedSystemProperties scopedSystemProperties2( "persist.device_config.netd_native.parallel_lookup_sleep_time", Loading Loading
Experiments.h +2 −2 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class Experiments { // TODO: Migrate other experiment flags to here. // (retry_count, retransmission_time_interval) static constexpr const char* const kExperimentFlagKeyList[] = { "keep_listening_udp", "parallel_lookup", "parallel_lookup_sleep_time", "keep_listening_udp", "parallel_lookup_release", "parallel_lookup_sleep_time", "sort_nameservers", "dot_async_handshake", "dot_connect_timeout_ms", "dot_maxtries", }; Loading
getaddrinfo.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1707,7 +1707,7 @@ static int res_queryN_parallel(const char* name, res_target* target, res_state r static int res_queryN_wrapper(const char* name, res_target* target, res_state res, int* herrno) { const bool parallel_lookup = android::net::Experiments::getInstance()->getFlag("parallel_lookup", 0); android::net::Experiments::getInstance()->getFlag("parallel_lookup_release", 1); if (parallel_lookup) return res_queryN_parallel(name, target, res, herrno); return res_queryN(name, target, res, herrno); Loading
tests/resolv_gold_test.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,7 @@ TEST_F(ResolvGetAddrInfo, BasicTlsQuery) { ASSERT_TRUE(tls.startServer()); ASSERT_NO_FATAL_FAILURE(SetResolversWithTls()); EXPECT_TRUE(WaitForPrivateDnsValidation(tls.listen_address())); tls.setDelayQueries(2); dns.clearQueries(); addrinfo* res = nullptr; Loading Loading @@ -429,6 +430,7 @@ TEST_P(ResolvGoldTest, GoldData) { test::DNSResponder dns(test::DNSResponder::MappingType::BINARY_PACKET); ASSERT_TRUE(dns.startServer()); test::DnsTlsFrontend tls; tls.setDelayQueries(2); if (protocol == DnsProtocol::CLEARTEXT) { ASSERT_NO_FATAL_FAILURE(SetResolvers()); Loading
tests/resolv_integration_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -5301,7 +5301,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupTimeout) { neverRespondDns.setResponseProbability(0.0); StartDns(neverRespondDns, records); ScopedSystemProperties scopedSystemProperties( "persist.device_config.netd_native.parallel_lookup", "1"); "persist.device_config.netd_native.parallel_lookup_release", "1"); // The default value of parallel_lookup_sleep_time should be very small // that we can ignore in this test case. // Re-setup test network to make experiment flag take effect. Loading Loading @@ -5336,7 +5336,7 @@ TEST_F(ResolverTest, GetAddrInfoParallelLookupSleepTime) { test::DNSResponder dns(listen_addr); StartDns(dns, records); ScopedSystemProperties scopedSystemProperties1( "persist.device_config.netd_native.parallel_lookup", "1"); "persist.device_config.netd_native.parallel_lookup_release", "1"); constexpr int PARALLEL_LOOKUP_SLEEP_TIME_MS = 500; ScopedSystemProperties scopedSystemProperties2( "persist.device_config.netd_native.parallel_lookup_sleep_time", Loading