From 1cffc693d9babee49cf1104b7bc8dd2214509369 Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Thu, 19 Oct 2023 17:12:13 +0900 Subject: Do not expect VNDK namespace when VNDK is deprecated UnbundledVendorApp test from libnativeloader tests expects VNDK namespace as default, because all devices using mainline was treblelized and had vendor VNDK version. However, this is no longer valid because of VNDK deprecation, so test should check 'ro.vndk.version' property exists, and do not expect VNDK namespace if the property is empty. Bug: 290159430 Bug: 325710867 Test: libnativeloader_test passed with VNDK deprecated device Change-Id: I3fd14beee676c86dbc066aa51b6c6bb57962283b Merged-In: I3fd14beee676c86dbc066aa51b6c6bb57962283b (cherry picked from commit cd9c984c9ec7e14080d5ccc4f50868a2974b29ea) --- libnativeloader/native_loader_test.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libnativeloader/native_loader_test.cpp') diff --git a/libnativeloader/native_loader_test.cpp b/libnativeloader/native_loader_test.cpp index 547fded4b4..72348ed364 100644 --- a/libnativeloader/native_loader_test.cpp +++ b/libnativeloader/native_loader_test.cpp @@ -348,7 +348,9 @@ TEST_P(NativeLoaderTest_Create, UnbundledVendorApp) { expected_permitted_path = expected_permitted_path + ":/vendor/" LIB_DIR; expected_shared_libs_to_platform_ns = default_public_libraries() + ":" + llndk_libraries_vendor(); - expected_link_with_vndk_ns = true; + if (android::base::GetProperty("ro.vndk.version", "") != "") { + expected_link_with_vndk_ns = true; + } SetExpectations(); RunTest(); } @@ -386,7 +388,9 @@ TEST_P(NativeLoaderTest_Create, UnbundledProductApp) { expected_permitted_path + ":/product/" LIB_DIR ":/system/product/" LIB_DIR; expected_shared_libs_to_platform_ns = append_extended_libraries(default_public_libraries() + ":" + llndk_libraries_product()); - expected_link_with_vndk_product_ns = true; + if (android::base::GetProperty("ro.product.vndk.version", "") != "") { + expected_link_with_vndk_product_ns = true; + } } SetExpectations(); -- cgit v1.2.3-59-g8ed1b