diff options
author | 2022-09-02 21:33:04 +0100 | |
---|---|---|
committer | 2022-09-05 14:35:48 +0100 | |
commit | 43b3caaa018f9dd265ff47f756e07fb2bc7d1f2a (patch) | |
tree | 8ddca3373057e3a389b7cccbb79e014e14ecd886 | |
parent | 63db938afa98b86904c0a12fb1cfd05d4c59b3ab (diff) |
[DO NOT MERGE] Make a CTS test more lenient to work with and without
M-2022-10 ART module.
Test: Download libnativeloader_test from android13-tests-dev and run
with ART module at AOSP head.
Bug: 244766714
Change-Id: Iccebb16398a409ece97d0d2fd8390538ef3c548c
-rw-r--r-- | libnativeloader/native_loader_test.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libnativeloader/native_loader_test.cpp b/libnativeloader/native_loader_test.cpp index 9648713e70..b1a7e3538a 100644 --- a/libnativeloader/native_loader_test.cpp +++ b/libnativeloader/native_loader_test.cpp @@ -379,9 +379,24 @@ TEST_P(NativeLoaderTest_Create, UnbundledProductApp) { expected_library_path = expected_library_path + ":/product/" LIB_DIR ":/system/product/" LIB_DIR; expected_permitted_path = expected_permitted_path + ":/product/" LIB_DIR ":/system/product/" LIB_DIR; - expected_shared_libs_to_platform_ns = - default_public_libraries() + ":" + llndk_libraries_product(); expected_link_with_vndk_product_ns = true; + + // The handling of extended libraries for product apps changed in the + // M-2022-10 release of the ART module (https://r.android.com/2194871). + // Since this test is in CTS for T, we need to accept both new and old + // behaviour, i.e. with and without the extended public libraries appended + // at the end. Skip the EXPECT_CALL in + // NativeLoaderTest_Create::SetExpectations and create a more lenient + // variant of it here. + expected_link_with_platform_ns = false; + expected_shared_libs_to_platform_ns = + expected_shared_libs_to_platform_ns + ":" + llndk_libraries_product(); + EXPECT_CALL(*mock, + mock_link_namespaces(Eq(IsBridged()), + _, + NsEq("system"), + ::testing::StartsWith(expected_shared_libs_to_platform_ns))) + .WillOnce(Return(true)); } SetExpectations(); RunTest(); |