commit | b55756648aa59e7cb2476cd2e58bba4dc1370be9 | [log] [tgz] |
---|---|---|
author | Hungming Chen <nuccachen@google.com> | Thu Apr 14 12:46:47 2022 +0800 |
committer | Hungming Chen <nuccachen@google.com> | Mon Apr 18 18:57:51 2022 +0800 |
tree | 84941eac244afe12d50988d6d7d49b33b2c86520 | |
parent | 7f6a44a579274e8d47cd1e60d979856dcd05a715 [diff] |
[DS#1] ResolverTest: assign specified socket type for GetAddrInfo_Dns64* If the socket type is not specified, every address will appear twice, once for SOCK_STREAM and one for SOCK_DGRAM. Just pick one (SOCK_DGRAM in this commit) because the addresses for the the second query of different socket types are responded to by the cache. This helps to avoid that misunderstand the dns query count of dns responder while people read the code. Also: 1. Reword comments. 2. Simply the dns result checking via testing utility. 3. Use aggregate initialization on stuct addrinfo. Bug: 159305929 Test: atest ResolverTest Change-Id: I13a1a1c183b94cb921a01c4fc0cc6c7c7ba7227e
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.