commit | 6ce587d2c38bcc7dc90985bb7ba687cf27aa1e8e | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Thu Dec 19 21:30:22 2019 +0800 |
committer | Luke Huang <huangluke@google.com> | Mon Jul 13 12:08:46 2020 +0800 |
tree | e9544c5e9e855d4a91c62798c37da77cbd4e0e7a | |
parent | 568ed6c942a38f264460c81563e9ef2b8bd980c0 [diff] |
Support multinetwork tests The integration test used to set up testing DNS servers on loopback interface. To support testing functionality for multinetwork, make the test able to send queries to a TUN interface, and the queries will be forwarded to the testing DNS servers. To forward packets, implement a forwarder which can translate packets (v4-to-v4 or v6-to-v6) between the resolver and testing DNS servers and can forward packets to each other. Also add three tests: GetAddrInfo_AI_ADDRCONFIG NetworkDestroyedDuringQueryInFlight OneCachePerNetwork And remove unused libraries from the test: libnetd_test_tun_interface libnetd_test_utils Test: cd packages/modules/DnsResolver && atest Change-Id: I52a52ce59373bc8b9462064c0409b657696c379f
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.