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