Merge changes from topic "querylog"
* changes:
Add unit tests for DnsQueryLog
Log DNS resolved answers
diff --git a/Android.bp b/Android.bp
index fd868f7..28cb03e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -114,6 +114,10 @@
],
},
},
+ header_abi_checker: {
+ enabled: true,
+ symbol_file: "libnetd_resolv.map.txt",
+ },
}
cc_library_static {
@@ -161,7 +165,7 @@
// TODO: Move this test to tests/
cc_test {
name: "resolv_unit_test",
- test_suites: ["device-tests"],
+ test_suites: ["device-tests", "mts"],
require_root: true,
//TODO: drop root privileges and make it be an real unit test.
defaults: ["netd_defaults"],
@@ -198,4 +202,13 @@
"server_configurable_flags",
"stats_proto",
],
+ compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
}
diff --git a/apex/Android.bp b/apex/Android.bp
index c1d33e1..3191b0a 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -26,6 +26,8 @@
// Use a custom AndroidManifest.xml used for API targeting.
androidManifest: "AndroidManifest.xml",
+
+ legacy_android10_support: true,
}
apex_key {
diff --git a/tests/Android.bp b/tests/Android.bp
index 0d6ddff..41282f5 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -32,7 +32,7 @@
cc_test {
name: "resolv_gold_test",
- test_suites: ["device-tests"],
+ test_suites: ["device-tests", "mts"],
require_root: true,
defaults: ["netd_defaults"],
data: ["testdata/*.pbtxt"],
@@ -64,11 +64,12 @@
"server_configurable_flags",
"stats_proto",
],
+ compile_multilib: "first",
}
cc_test {
name: "resolv_stress_test",
- test_suites: ["device-tests"],
+ test_suites: ["device-tests", "mts"],
// This won't work with test_config
// require_root: true,
test_config: "resolv_stress_test_config.xml",
@@ -95,12 +96,12 @@
"netd_event_listener_interface-ndk_platform",
"netd_aidl_interface-ndk_platform",
],
- compile_multilib: "both",
+ compile_multilib: "first",
}
cc_test {
name: "resolv_integration_test",
- test_suites: ["device-tests"],
+ test_suites: ["device-tests", "mts"],
require_root: true,
defaults: ["netd_defaults"],
tidy: false, // cuts test build time by > 1m30s
@@ -138,4 +139,12 @@
"netd_event_listener_interface-ndk_platform",
],
compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
}
diff --git a/tests/resolv_gold_test.cpp b/tests/resolv_gold_test.cpp
index 29ec615..5216268 100644
--- a/tests/resolv_gold_test.cpp
+++ b/tests/resolv_gold_test.cpp
@@ -126,8 +126,9 @@
GoldTest ToProto(const std::string& file) {
// Convert the testing configuration from .pbtxt file to proto.
std::string file_content;
- EXPECT_TRUE(android::base::ReadFileToString(kTestDataPath + file, &file_content))
- << strerror(errno);
+ const std::string file_name = kTestDataPath + file;
+ EXPECT_TRUE(android::base::ReadFileToString(file_name, &file_content))
+ << "Failed to read " << file_name << ": " << strerror(errno);
android::net::GoldTest goldtest;
EXPECT_TRUE(google::protobuf::TextFormat::ParseFromString(file_content, &goldtest));
return goldtest;
@@ -425,4 +426,4 @@
VerifyResolver(goldtest, dns, tls, protocol);
}
-} // namespace android::net
\ No newline at end of file
+} // namespace android::net
diff --git a/tests/resolv_integration_test.cpp b/tests/resolv_integration_test.cpp
index d49db5f..4f8f976 100644
--- a/tests/resolv_integration_test.cpp
+++ b/tests/resolv_integration_test.cpp
@@ -38,7 +38,6 @@
#include <netdutils/SocketOption.h>
#include <netdutils/Stopwatch.h>
#include <netinet/in.h>
-#include <openssl/base64.h>
#include <poll.h> /* poll */
#include <private/android_filesystem_config.h>
#include <resolv.h>