diff options
author | 2021-08-10 14:05:49 +0900 | |
---|---|---|
committer | 2021-08-17 00:49:38 +0000 | |
commit | a21b58476a530d47532af28c0f909fb9a3aedcbf (patch) | |
tree | 6ec0af4828245affb1556ce8e5249e56d3f5ded9 /libnativeloader/native_loader_test.cpp | |
parent | fb3ad7201bf2d9154862e347e960df376ac04c3c (diff) |
Define product public libraries
When /product is unbundled from the /system, /product/etc/ may not
have 'public.libraries-<companyname>.txt' to extend public libraries.
Instead, /product/etc/public.library.txt can provide public libraries
from /product.
Bug: 186055799
Test: atest libnativeloader_test
Change-Id: I8994649826657f59ac1dac655205b9704a2c67c9
Diffstat (limited to 'libnativeloader/native_loader_test.cpp')
-rw-r--r-- | libnativeloader/native_loader_test.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libnativeloader/native_loader_test.cpp b/libnativeloader/native_loader_test.cpp index c1dd4aaf1d..878b9f8f1f 100644 --- a/libnativeloader/native_loader_test.cpp +++ b/libnativeloader/native_loader_test.cpp @@ -190,6 +190,7 @@ class NativeLoaderTest_Create : public NativeLoaderTest { bool expected_link_with_i18n_ns = true; bool expected_link_with_conscrypt_ns = false; bool expected_link_with_sphal_ns = !vendor_public_libraries().empty(); + bool expected_link_with_product_ns = !product_public_libraries().empty(); bool expected_link_with_vndk_ns = false; bool expected_link_with_vndk_product_ns = false; bool expected_link_with_default_ns = false; @@ -199,6 +200,7 @@ class NativeLoaderTest_Create : public NativeLoaderTest { std::string expected_shared_libs_to_i18n_ns = apex_public_libraries().at("com_android_i18n"); std::string expected_shared_libs_to_conscrypt_ns = apex_jni_libraries("com_android_conscrypt"); std::string expected_shared_libs_to_sphal_ns = vendor_public_libraries(); + std::string expected_shared_libs_to_product_ns = product_public_libraries(); std::string expected_shared_libs_to_vndk_ns = vndksp_libraries_vendor(); std::string expected_shared_libs_to_vndk_product_ns = vndksp_libraries_product(); std::string expected_shared_libs_to_default_ns = default_public_libraries(); @@ -237,6 +239,11 @@ class NativeLoaderTest_Create : public NativeLoaderTest { StrEq(expected_shared_libs_to_sphal_ns))) .WillOnce(Return(true)); } + if (expected_link_with_product_ns) { + EXPECT_CALL(*mock, mock_link_namespaces(Eq(IsBridged()), _, NsEq("product"), + StrEq(expected_shared_libs_to_product_ns))) + .WillOnce(Return(true)); + } if (expected_link_with_vndk_ns) { EXPECT_CALL(*mock, mock_link_namespaces(Eq(IsBridged()), _, NsEq("vndk"), StrEq(expected_shared_libs_to_vndk_ns))) |