dns_tls_frontend.cpp: set queries_ to 0 in startServer

so that we could call waitForQueries with 1 passed to check with the query number.

In TlsBypass test in tests/netd_test.cpp file, 1 is passed to tls.waitForQueries to check with query number,
but after one tls enabled config, the query number will be more than 1, which makes
the check in DnsTlsFrontend::waitForQueries following has no meaning:
https://android.googlesource.com/platform/system/netd.git/+/master/tests/dns_responder/dns_tls_frontend.cpp#382

To make the test cleanest, we set queries_ to 0 in the startServer function of dns_tls_frontend.cpp,
so that in the TlsBypass test of tests/netd_test.cpp, we only need to wait for the validation query
come simply with calling of tls.waitForQueries(1, 5000), since the tls.startServer is called every time
in the for loop when tls enabled, so the call to waitForQueries when tls enabled works there

Test: adb shell /data/nativetest64/netd_integration_test/netd_integration_test64 --gtest_filter=ResolverTest.TlsBypass on hikey
Test: ./android-vts/tools/vts-tradefed run vts-kernel -m VtsKernelNetdTest -t VtsKernelNetdTest.ResolverTest.TlsBypass on hikey

Change-Id: I9ce9314c34420b346703500f4120304dfa58b9af
Merged-In: I9ce9314c34420b346703500f4120304dfa58b9af
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
1 file changed