summaryrefslogtreecommitdiff
path: root/src/com/android/server/NetworkStackService.java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2019-05-09 05:27:29 -0700
committerLorenzo Colitti <lorenzo@google.com>2019-05-09 12:35:18 +0000
commita4fb4e6dd01dccb7308471f748ed2e2ba9c79823 (patch)
tree9e100a581e3e6cc87884537adf716b0e34712f5d /src/com/android/server/NetworkStackService.java
parent6ee592de0484f8b915b2cb8de01200001659f8b6 (diff)
Add tests for strict mode private DNS validation.
Test successful and failed validation, and updating the config. In order to do this, add a FakeDns class so we can change DNS responses dynamically while the test is running. Also a couple of minor fixes: 1. Make sure the DNS timeout is set. Before this CL, it was always 0. Not sure why. It does seem to be set to the default value (12500) when actually running on device. We didn't catch this because the only tests that use the timeout set it explicitly. 2. Make runNetworkTest a bit more realistic: always send NetworkCapabilities *before* calling notifyNetworkConnected. This is what ConnectivityService does. Bug: 122652057 Test: atest FrameworksNetTests NetworkStackTests Test: atest --generate-new-metrics 50 NetworkStackTests:com.android.server.connectivity.NetworkMonitorTest Change-Id: Ifd6694262501874f3261c864a049cb35c6afb9c8 Merged-In: Ifd6694262501874f3261c864a049cb35c6afb9c8 (cherry picked from commit 89909befd2f4e990d21e27c99857c635b3c6709e)
Diffstat (limited to 'src/com/android/server/NetworkStackService.java')
0 files changed, 0 insertions, 0 deletions