Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ec9fc5d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6348860 from 26e58152 to rvc-d1-release

Change-Id: I96e944ff635ca3a8c92b3a05e8031413379a483a
parents a15ddacb 26e58152
Loading
Loading
Loading
Loading
+22 −5
Original line number Original line Diff line number Diff line
@@ -52,6 +52,25 @@ cc_defaults {
    ],
    ],
}
}


cc_defaults {
    // This is necessary to have the coverage tests run on cf_x86_phone.
    // Because the test_suite target is 64 bit and the test infra is running the 64 bit test
    // suite on cf_x86_phone (32-bit) for coverage.
    // See b/147785146 for details.
    // TODO: Remove this target after coverage test switched to 64-bit device.
    name: "resolv_test_mts_coverage_defaults",
    test_config_template: ":resolv_test_config_template",
    compile_multilib: "both",
    multilib: {
        lib32: {
            suffix: "32",
        },
        lib64: {
            suffix: "64",
        },
    },
}

cc_library {
cc_library {
    name: "libnetd_resolv",
    name: "libnetd_resolv",
    version_script: "libnetd_resolv.map.txt",
    version_script: "libnetd_resolv.map.txt",
@@ -200,10 +219,9 @@ cc_test {
    name: "resolv_unit_test",
    name: "resolv_unit_test",
    test_suites: ["device-tests", "mts"],
    test_suites: ["device-tests", "mts"],
    require_root: true,
    require_root: true,
    // TODO: Remove after b/152303924 fixing
    // TODO: Drop root privileges and make it be an real unit test.
    test_config_template: ":resolv_test_config_template",
    // TODO: Remove resolv_test_mts_coverage_defaults after mts coverage switched to 64-bit device.
    //TODO:  drop root privileges and make it be an real unit test.
    defaults: ["netd_defaults", "resolv_test_defaults", "resolv_test_mts_coverage_defaults"],
    defaults: ["netd_defaults", "resolv_test_defaults"],
    srcs: [
    srcs: [
        "resolv_cache_unit_test.cpp",
        "resolv_cache_unit_test.cpp",
        "resolv_callback_unit_test.cpp",
        "resolv_callback_unit_test.cpp",
@@ -235,5 +253,4 @@ cc_test {
        "server_configurable_flags",
        "server_configurable_flags",
        "stats_proto",
        "stats_proto",
    ],
    ],
    compile_multilib: "first",
}
}
+5 −2
Original line number Original line Diff line number Diff line
@@ -13,14 +13,17 @@
     See the License for the specific language governing permissions and
     See the License for the specific language governing permissions and
     limitations under the License.
     limitations under the License.
-->
-->
<!-- Temporary solution for MTS coverage because MTS coverage can only run with FilesPusher.
<!-- Workaround for MTS coverage because test infra is running the 64 bit
     See b/152303924 for details.
     test suite on cf_x86_phone (32-bit). See b/147785146 for details.
     We need to push the correct binary against the architecture of
     test device with "append-bitness" option.
-->
-->
<configuration description="Configuration for {MODULE} tests">
<configuration description="Configuration for {MODULE} tests">
   <option name="test-suite-tag" value="mts" />
   <option name="test-suite-tag" value="mts" />
   <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
   <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
       <option name="cleanup" value="true" />
       <option name="cleanup" value="true" />
       <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />
       <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />
       <option name="append-bitness" value="true" />
   </target_preparer>
   </target_preparer>
   <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
   <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
   <test class="com.android.tradefed.testtype.GTest" >
   <test class="com.android.tradefed.testtype.GTest" >
+9 −6
Original line number Original line Diff line number Diff line
@@ -103,7 +103,9 @@ cc_test {
        "server_configurable_flags",
        "server_configurable_flags",
        "stats_proto",
        "stats_proto",
    ],
    ],
    compile_multilib: "first",
    // MTS test binary can't be built under compile_multilib = "both" and having test data.
    // However, MTS coverage requires 32 bit test binary to run.
    compile_multilib: "32",
}
}


cc_test {
cc_test {
@@ -111,9 +113,8 @@ cc_test {
    test_suites: ["device-tests", "mts"],
    test_suites: ["device-tests", "mts"],
    // This won't work with test_config
    // This won't work with test_config
    // require_root: true,
    // require_root: true,
    // TODO: Remove after b/152303924 fixing
    // TODO: Remove resolv_test_mts_coverage_defaults after mts coverage switched to 64-bit device.
    test_config_template: ":resolv_test_config_template",
    defaults: ["netd_defaults", "resolv_test_defaults", "resolv_test_mts_coverage_defaults"],
    defaults: ["netd_defaults", "resolv_test_defaults"],
    srcs: [
    srcs: [
        "resolv_stress_test.cpp",
        "resolv_stress_test.cpp",
    ],
    ],
@@ -134,14 +135,13 @@ cc_test {
        "netd_event_listener_interface-ndk_platform",
        "netd_event_listener_interface-ndk_platform",
        "netd_aidl_interface-ndk_platform",
        "netd_aidl_interface-ndk_platform",
    ],
    ],
    compile_multilib: "first",
}
}


cc_test {
cc_test {
    name: "resolv_integration_test",
    name: "resolv_integration_test",
    test_suites: ["device-tests", "mts"],
    test_suites: ["device-tests", "mts"],
    require_root: true,
    require_root: true,
    test_config: "resolv_integration_test_config.xml",
    test_config_template: ":resolv_test_config_template",
    defaults: ["netd_defaults", "resolv_test_defaults"],
    defaults: ["netd_defaults", "resolv_test_defaults"],
    tidy: false, // cuts test build time by > 1m30s
    tidy: false, // cuts test build time by > 1m30s
    srcs: [
    srcs: [
@@ -174,6 +174,9 @@ cc_test {
        "netd_aidl_interface-ndk_platform",
        "netd_aidl_interface-ndk_platform",
        "netd_event_listener_interface-ndk_platform",
        "netd_event_listener_interface-ndk_platform",
    ],
    ],
    // This test talks to the DnsResolver module over a binary protocol on a socket, so keep it as
    // multilib setting is worth because we might be able to get some coverage for the case where
    // 32bit apps talk to 64bit resolvers.
    compile_multilib: "both",
    compile_multilib: "both",
    multilib: {
    multilib: {
        lib32: {
        lib32: {
+6 −0
Original line number Original line Diff line number Diff line
@@ -4355,6 +4355,11 @@ TEST_F(ResolverTest, RepeatedSetup_KeepChangingPrivateDnsServers) {
    enum TlsServerState { WORKING, UNSUPPORTED, UNRESPONSIVE };
    enum TlsServerState { WORKING, UNSUPPORTED, UNRESPONSIVE };
    const std::string addr1 = getUniqueIPv4Address();
    const std::string addr1 = getUniqueIPv4Address();
    const std::string addr2 = getUniqueIPv4Address();
    const std::string addr2 = getUniqueIPv4Address();
    const auto waitForPrivateDnsStateUpdated = []() {
        // A buffer time for PrivateDnsConfiguration to update its state. It prevents this test
        // being flaky. See b/152009023 for the reason.
        std::this_thread::sleep_for(20ms);
    };


    test::DNSResponder dns1(addr1);
    test::DNSResponder dns1(addr1);
    test::DNSResponder dns2(addr2);
    test::DNSResponder dns2(addr2);
@@ -4408,6 +4413,7 @@ TEST_F(ResolverTest, RepeatedSetup_KeepChangingPrivateDnsServers) {
            tls.setHangOnHandshakeForTesting(serverState == UNRESPONSIVE);
            tls.setHangOnHandshakeForTesting(serverState == UNRESPONSIVE);
            const int connectCountsBefore = tls.acceptConnectionsCount();
            const int connectCountsBefore = tls.acceptConnectionsCount();


            waitForPrivateDnsStateUpdated();
            ResolverParamsParcel parcel = DnsResponderClient::GetDefaultResolverParamsParcel();
            ResolverParamsParcel parcel = DnsResponderClient::GetDefaultResolverParamsParcel();
            parcel.servers = {config.tlsServer};
            parcel.servers = {config.tlsServer};
            parcel.tlsServers = {config.tlsServer};
            parcel.tlsServers = {config.tlsServer};
+0 −31
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<configuration description="Configuration for resolv integration tests">
   <option name="test-suite-tag" value="mts" />
   <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
       <option name="cleanup" value="true" />
       <option name="push" value="resolv_integration_test->/data/local/tmp/resolv_integration_test" />
       <option name="append-bitness" value="true" />
   </target_preparer>
   <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
   <test class="com.android.tradefed.testtype.GTest" >
       <option name="native-test-device-path" value="/data/local/tmp" />
       <option name="module-name" value="resolv_integration_test" />
       <option name="runtime-hint" value="10m" />
       <!-- test-timeout unit is ms, value = 10 min -->
       <option name="native-test-timeout" value="600000" />
   </test>
</configuration>