• Home
  • Raw
  • Download

Lines Matching refs:dns

201     size_t GetNumQueries(const test::DNSResponder& dns, const char* name) const {  in GetNumQueries()  argument
202 auto queries = dns.queries(); in GetNumQueries()
212 size_t GetNumQueriesForType(const test::DNSResponder& dns, ns_type type, in GetNumQueriesForType() argument
214 auto queries = dns.queries(); in GetNumQueriesForType()
227 std::vector<std::unique_ptr<test::DNSResponder>> dns; in RunGetAddrInfoStressTest_Binder() local
231 ASSERT_NO_FATAL_FAILURE(SetupDNSServers(MAXNS, mappings, &dns, &servers)); in RunGetAddrInfoStressTest_Binder()
238 thread = std::thread([this, &servers, &dns, &mappings, num_queries]() { in RunGetAddrInfoStressTest_Binder()
265 ASSERT_NO_FATAL_FAILURE(ShutdownDNSServers(&dns)); in RunGetAddrInfoStressTest_Binder()
279 test::DNSResponder dns(listen_addr, listen_srv, 250, ns_rcode::ns_r_servfail, 1.0); in TEST_F() local
280 dns.addMapping(host_name, ns_type::ns_t_a, "1.2.3.3"); in TEST_F()
281 ASSERT_TRUE(dns.startServer()); in TEST_F()
287 dns.clearQueries(); in TEST_F()
289 EXPECT_EQ(1U, GetNumQueriesForType(dns, ns_type::ns_t_a, nonexistent_host_name)); in TEST_F()
293 dns.clearQueries(); in TEST_F()
295 EXPECT_EQ(1U, GetNumQueriesForType(dns, ns_type::ns_t_a, host_name)); in TEST_F()
302 dns.stopServer(); in TEST_F()
325 std::vector<std::unique_ptr<test::DNSResponder>> dns; in TEST_F() local
329 ASSERT_NO_FATAL_FAILURE(SetupDNSServers(4, mappings, &dns, &servers)); in TEST_F()
336 size_t total_queries = std::accumulate(dns.begin(), dns.end(), 0, in TEST_F()
367 ASSERT_NO_FATAL_FAILURE(ShutdownDNSServers(&dns)); in TEST_F()
377 test::DNSResponder dns(listen_addr, listen_srv, 250, in TEST_F() local
379 dns.addMapping(host_name, ns_type::ns_t_a, "1.2.3.4"); in TEST_F()
380 dns.addMapping(host_name, ns_type::ns_t_aaaa, "::1.2.3.4"); in TEST_F()
381 ASSERT_TRUE(dns.startServer()); in TEST_F()
392 dns.clearQueries(); in TEST_F()
396 size_t found = GetNumQueries(dns, host_name); in TEST_F()
411 found = GetNumQueries(dns, host_name); in TEST_F()
425 dns.clearQueries(); in TEST_F()
429 found = GetNumQueries(dns, host_name); in TEST_F()
443 dns.stopServer(); in TEST_F()
453 test::DNSResponder dns(listen_addr, listen_srv, 250, in TEST_F() local
455 dns.addMapping(host_name, ns_type::ns_t_a, "1.2.3.5"); in TEST_F()
456 ASSERT_TRUE(dns.startServer()); in TEST_F()
464 EXPECT_EQ(1U, GetNumQueries(dns, host_name)); in TEST_F()
477 test::DNSResponder dns(listen_addr, listen_srv, 250, in TEST_F() local
479 dns.addMapping(host_name, ns_type::ns_t_a, "1.2.3.3"); in TEST_F()
480 ASSERT_TRUE(dns.startServer()); in TEST_F()
484 dns.clearQueries(); in TEST_F()
486 EXPECT_EQ(1U, GetNumQueriesForType(dns, ns_type::ns_t_a, host_name)); in TEST_F()
492 dns.stopServer(); in TEST_F()
639 test::DNSResponder dns(listen_addr, listen_srv, 250, in TEST_F() local
641 dns.addMapping(host_name1, ns_type::ns_t_aaaa, "2001:db8::13"); in TEST_F()
642 dns.addMapping(host_name2, ns_type::ns_t_aaaa, "2001:db8::1:13"); in TEST_F()
643 ASSERT_TRUE(dns.startServer()); in TEST_F()
652 EXPECT_EQ(1U, dns.queries().size()); in TEST_F()
653 EXPECT_EQ(1U, GetNumQueries(dns, host_name1)); in TEST_F()
660 dns.clearQueries(); in TEST_F()
663 EXPECT_EQ(1U, dns.queries().size()); in TEST_F()
664 EXPECT_EQ(1U, GetNumQueries(dns, host_name2)); in TEST_F()
673 std::vector<std::unique_ptr<test::DNSResponder>> dns; in TEST_F() local
677 ASSERT_NO_FATAL_FAILURE(SetupDNSServers(MAXNS + 1, mappings, &dns, &servers)); in TEST_F()
688 ASSERT_NO_FATAL_FAILURE(ShutdownDNSServers(&dns)); in TEST_F()