summaryrefslogtreecommitdiff
path: root/libnativeloader
AgeCommit message (Collapse)Author
2025-03-20Move more path logic for tests to testing.cc, so it can be used without Martin Stjernholm
depending on CommonArtTest. Preparation to fix the libart-gtest dependency in art_standalone_libartpalette_tests. Due to a new #include, this necessitated fixing a bunch of `testing` namespace references that could become ambigious wrt `art::testing`. Test: m generate-boot-image Test: art/tools/buildbot-build.sh Bug: 404306250 Change-Id: Iafb3d73148125775c9c5ddbcbaef39dc61859118
2025-02-12Improve cleanup robustness after adb push failures. Martin Stjernholm
Should fix `Cannot invoke "String.split(String)" because "pathList" is null` seen in those cases. Change-Id: I4bcd4e7c905017e25f83a47790d8552c7d94258e Test: presubmits Bug: 395130114
2025-01-28Allow ART internal libs to load libs in NATIVELOADER_DEFAULT_NAMESPACE_LIBS. Martin Stjernholm
This complements the treatment of NATIVELOADER_DEFAULT_NAMESPACE_LIBS, so that ART internal libs can load the libraries listed in that variable, as well as the other way around. This makes it possible to load libartagent(d).so without absolute paths in run tests on target, so use that to re-enable 900-hello-plugin. Test: art/test/testrunner/testrunner.py --target --64 900 in armv8 target chroot Test: art/test/testrunner/testrunner.py --host 900 Bug: 186654484 Change-Id: Ic418b26b2b77af8839af7b65ad44ea8b5121169c
2024-11-28Make NativeLoaderNamespace instances immutable. Martin Stjernholm
To make it easier to reason about thread safety. Test: atest libnativeloader_e2e_tests libnativeloader_test \ art_libnativeloader_cts_test libnativeloader_lazy_test Bug: 326505705 Bug: 326610154 Change-Id: I2447ed8120625823d3298d392d22828af2c22402
2024-11-28Do not hold g_namespace_mutex during library loads. Martin Stjernholm
Significantly shortens the locked durations, and makes it easier to ascertain there's no reentrancy through the load code paths. Test: atest libnativeloader_e2e_tests libnativeloader_test \ art_libnativeloader_cts_test libnativeloader_lazy_test with and without CHECK condition inverted Bug: 326505705 Bug: 326610154 Change-Id: Ib2290714fd102ae22f960e9f631c1623236f4d27
2024-11-08Replace test_for properties with explicit dependencies on implementations Colin Cross
As part of simplifying the apex logic in Soong, replace some of the magic dependencies on implementations vs stubs with explicit dependencies with a #impl suffix. This obsoletes the extra apex_avaiable entries required by b/183882457 and the test_for property. Bug: 372543712 Test: builds Flag: EXEMPT refactor Change-Id: Iafbccd8133729602d3c94bcc519c0933d1548da9
2024-10-31Remove dependencies on the 1-variant fallback Cole Faust
When adding a dependencies, if the variants don't match, but the dependency only has 1 variant anyways, soong will always use that variant. This makes it hard to add new variants to soong, because the 1-variant fallback stops being used and you start getting missing variant errors. Make changes to bp files such that all dependencies correctly specify the variant to use. Bug: 372091092 Flag: EXEMPT refactor Test: m nothing Change-Id: I9cc72bb9a769e0c96e3a5c1fff005f8ad8556ff2
2024-10-16Set native libs to non writable before loading it Linus Tufvesson
Bug: 354921003 Test: atest libnativeloader_e2e_tests Change-Id: I0abfe10e8673c25fc63e377b784a0626f02e0896
2024-09-10Restrict exported symbols from libnative{loader,bridge} lazy libs. Martin Stjernholm
The shims in the lazy libs bypass the stubs and hence the vetted exported APIs in the .map.txt files. To avoid inadvertently giving external access to internal APIs that way, let's apply the .map.txt files as version scripts to the lazy libs instead, so that any functions added there just don't become available to external code unless the .map.txt files get updated. This hack doesn't work if the lazy libs are linked statically, so restrict them to be shared libs (although ideally they should be static instead to avoid the shared lib overheads). Also drop the shims for the two functions added in https://r.android.com/2689969 and https://r.android.com/3022103, because they're only used internally in ART and don't go through the shims. Test: atest libnativebridge-tests art_libnativebridge_cts_tests \ libnativebridge-lazy-tests libnativeloader_test \ art_libnativeloader_cts_test libnativeloader_lazy_test Bug: 124250621 Change-Id: I1e1eba3f656830f51b792ce672276f37b3f0d865
2024-08-02Also bypass loading libwalkstack.so for b/349878424. Jiakai Zhang
Bug: 349878424 Change-Id: I0a5f851dc7e54cd151f372d3e3eed0488ce64006
2024-07-26Fix for b/349878424 Nicolas Geoffray
Avoid loading the libsobrige library. Test: device boots after mainline update. Bug: 349878424 Bug: 343621630 Change-Id: I19e1b9a9328eb5a39b9a91580f602a09d5366ae7
2024-06-19Recognise system/system_ext as a system image partition path. Martin Stjernholm
Also move the regex used for that next to the other partition regex'es for visibility, and add some unit tests. Test: atest libnativeloader_tests libnativeloader_e2e_tests on mokey_go32 Bug: 346515837 Change-Id: I30a85678e0d3c45645d6f089f5f1d92e1360e8bf
2024-06-19Link libnativeloader statically into its unit tests. Martin Stjernholm
Repurpose libnativeloader-defaults for use between lib and tests, rather than lib and the libnativeloader_lazy shim. Test: atest libnativeloader_tests Bug: 346515837 Change-Id: I8787194e8ec052b39e36048a72feb95f20175a91
2024-06-14Use C++20 `string{,_view}::{starts,ends}_with()`, part 2. Vladimir Marko
Replace uses of `android::base::{Starts,Ends}With()`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I80a0ca93f433464270989d248dd999e9366a1c17
2024-05-17Update product treble check for VNDK deprecation Tim Zimmermann
On devices which launched with an earlier version than R, if vndk is deprecated, /product is no longer added to linker namespaces because ro.product.vndk.version is gone. The original change addressed an issue for devices running on U, but on newer Android releases, /product is always treblelized. Bug: 341228914 Test: Open any /product app that uses jni libs from /product on a device with shipping api level <= 29, observe it no longer crashes Change-Id: I4e4f8ae5fdff2298bfc85a5e7076f26dcc0f67d6
2024-05-16Link libnativeloader statically into gtests. Martin Stjernholm
It needs to be statically linked together with the rest of the runtime since it uses internal APIs, like android::IsNamespaceNativeBridged from art/runtime/jni/jni_internal.cc. This moves the RUNPATH entries from libnativeloader.so to the test binaries, and the path is adjusted to account for the binary location .../testcases/art_<something>_tests/<arch>/<test binary> relative to .../testcases/art_common. Test: atest art_compiler_tests art_libartbase_tests art_runtime_tests on host and target in CI Bug: 247108425 Change-Id: Ifbcc21a2746446b3d6434c73e20675602bb164b1
2024-05-15Fix performance-implicit-conversion-in-loop clang-tidy issues Stefano Cianciulli
Bug: 264654008 Test: m tidy-art Change-Id: I390ba6ed89534b43b6815445fae022af7952a69d
2024-05-15Fix bugprone-argument-comment clang-tidy issues Stefano Cianciulli
Bug: 264654008 Test: m tidy-art Change-Id: I7cbe86ab1cc9de2ca2e80583203e8d9e7abcf44b
2024-05-13Clean up source_build Soong config variables. Martin Stjernholm
They no longer have any effect after the removal of the ART_MODULE_BUILD_FROM_SOURCE build variable (b/308188056). Test: m nothing Bug: 335854415 Change-Id: Ibe30b24defe8c63d2c0baab1ecebbf72cd970f74
2024-04-24Clean up the test mocks. Martin Stjernholm
Split them up so that the API tests only have the JNI mock that they need, and the "platform" mock - which is nonfunctional there - is not present. Also a few other code cleanups. Test: atest libnativeloader_test \ art_libnativeloader_cts_test \ libnativeloader_lazy_test Bug: 335224367 Change-Id: Ifabc64db43e0346d5aefc9809266190690178ebf
2024-04-24Repurpose libnativeloader_lazy tests as shallow tests for API coverage Martin Stjernholm
in CTS. Most APIs are exercised extensively in any managed process, but use this to cover the fringes. This drops the mocks that used dynamic library symbol overrides (android_create_namespace and android_link_namespaces) from the former libnativeloader_lazy tests, because we cannot inject them in CTS tests. However it turns out it works just fine to call into the real code in the linker. As a result libnativeloader_lazy_test no longer needs to be built with exported symbols necessary to make the symbol override mocks to work. Also strengthen the CreateClassLoaderNamespace test slightly by verifying that it really did create a classloader namespace. Also move libnativeloader_test and libnativeloader_lazy_test from device-tests to general-tests, because they shouldn't have any device dependencies. Test: atest libnativeloader_test \ art_libnativeloader_cts_test \ libnativeloader_lazy_test Bug: 335224367 Change-Id: Idd15d5a79f4f54c68304a4b758c7a46ba9b96c86
2024-04-23Set test ownerships for ART. Martin Stjernholm
Test: presubmits Bug: 333696887 Change-Id: Ieb6992ecb0a2489697ffa176dabc25626050cd48
2024-04-22ART standalone tests: use static STL and version scripts Ryan Prichard
Set "stl" to "libc++_static" in art_standalone_test_defaults. By default, localize/hide all of a test binary's symbols. In particular, symbols from libc++_static.a must not be exported from the test executable, because only *some* libc++ symbols would be exported (e.g. those that are also seen in other .dynsym sections at build time), and exporting this subset of symbols can break libc++ (e.g. inconsistent facet registration, b/331873741). It is also important to hide libbase.a symbols, such as constructors/destructors for internal classes like LogMessage. Using a version script also hides vaguely-linked libc++ symbols that could come from libc++'s headers, not libc++_static.a, such as vtables and template functions. `--exclude-libs=libc++_static.a` wouldn't hide these symbols. Bug: 331873741 Bug: 333438055 Test: atest art_libnativebridge_cts_tests art_standalone_artd_tests art_standalone_cmdline_tests art_standalone_compiler_tests art_standalone_dex2oat_cts_tests art_standalone_dex2oat_tests art_standalone_dexdump_tests art_standalone_dexlist_tests art_standalone_dexopt_chroot_setup_tests art_standalone_dexoptanalyzer_tests art_standalone_dexpreopt_tests art_standalone_disassembler_tests art_standalone_libartbase_tests art_standalone_libartpalette_tests art_standalone_libartservice_tests art_standalone_libarttools_tests art_standalone_libdexfile_external_tests art_standalone_libdexfile_support_tests art_standalone_libdexfile_tests art_standalone_libprofile_tests art_standalone_oatdump_tests art_standalone_odrefresh_tests art_standalone_profman_tests art_standalone_runtime_tests art_standalone_sigchain_tests libnativeloader_lazy_test libnativeloader_test Change-Id: Ibfe8de492c76c83c76b00c7124d5a94775579d03
2024-04-12Fix standalone tests to only link NDK and module exported libraries Martin Stjernholm
dynamically. libc++ is left out for now, due to problems using `stl: "libc++_static"` in some tests (b/333438055). Introduce a defaults for statically linking libunwindstack, to fix its dependencies in one place. Test: mmm art libnativehelper libcore find out/target/product/vsoc_x86_64/testcases/ -type f -regex '.*\(_standalone_\|libnativebridge\(_cts\|-lazy\)\|libnativeloader\).*_tests?\(32\|64\)?' | xargs readelf -d | grep 'File:\|NEEDED' | grep -v 'lib\(c\|m\|dl\|dl_android\|z\|log\|binder_ndk\|selinux\|nativeloader\|nativehelper\|nativebridge\|dexfile\|statspull\|statssocket\).so\|heapprofd_client_api.so' Check that no NEEDED dependencies are reported. Test: atest art_libnativebridge_cts_tests art_standalone_artd_tests art_standalone_cmdline_tests art_standalone_compiler_tests art_standalone_dex2oat_cts_tests art_standalone_dex2oat_tests art_standalone_dexdump_tests art_standalone_dexlist_tests art_standalone_dexopt_chroot_setup_tests art_standalone_dexoptanalyzer_tests art_standalone_dexpreopt_tests art_standalone_disassembler_tests art_standalone_libartbase_tests art_standalone_libartpalette_tests art_standalone_libartservice_tests art_standalone_libarttools_tests art_standalone_libdexfile_external_tests art_standalone_libdexfile_support_tests art_standalone_libdexfile_tests art_standalone_libprofile_tests art_standalone_oatdump_tests art_standalone_odrefresh_tests art_standalone_profman_tests art_standalone_runtime_tests art_standalone_sigchain_tests libnativeloader_lazy_test libnativeloader_test Bug: 247108425 Change-Id: I082bc88d8605b58981f43ba0677068de2ca3abea
2024-04-05Add getTrampolineForFunctionPointer method to native bridge dimitry
Add a function to native bridge that generates trampolines for guest pointers and call it for native-bridged namespaces. Bug: http://b/330367443 Test: art/libnativebridge/tests/runtests.sh --skip-target Test: ./android-cts/tools/cts-tradefed run cts -m CtsJniTestCases Change-Id: I02cab5ea6c87cb4d5065033a4b6793eb57fe0f52
2024-04-05Consolidate OWNERS in libnativebridge and libnativeloader. Martin Stjernholm
Ensure ART team has visibility into changes that go into the module. Remove OWNERS files in these subdirectories to make art/OWNERS take effect instead. Test: n/a Bug: 327407752 Change-Id: I5122c2ad34b371c4a5b901efcc9949ba24faf404
2024-03-18Give full access to native libs from Java libs in the same partition Martin Stjernholm
(reland 2). For both packages and shared Java libs in system image partitions (system, product, vendor), load native libraries from the same partition by using the linker namespace for that partition ("default" or "system", "product", "sphal", respectively). This is only done for native libraries in the <partition root>/lib(64) directories when specified by an absolute path (i.e. use java.lang.System.load rather than loadLibrary). Otherwise it's looked up using the classloader namespace for the package, as before. Since only loads with absolute paths are affected, compat issues are unlikely. However to be on the safe side it's only enabled for SDK level 35 (VIC) and later (regardless of targetSdkVersion of the package, because the affected code is in system image partitions). This relands https://r.android.com/2933611 but keeps the vendor and product API domain checks unchanged in the CreateClassLoaderNamespace code paths (cf. b/326631342). Test: atest libnativeloader_e2e_tests \ libnativeloader_test libnativeloader_lazy_test Test: libnativeloader_e2e_tests on S, Sv2, T, and U platforms in CI Test: ImsServiceEntitlementUnitTests Bug: 237577392 Change-Id: I246101c1663d81089d9b4ae9450c28d564a7603a
2024-03-18Revert "libnativeloader_test: link non-public libs statically" and Martin Stjernholm
remove libnativeloader_test from CTS instead. This reverts commit b2b067192ac047b99c0d03104c5d7dbf79192ef1 which made the CTS test no longer work for API coverage. It also (effectively) reverts commit 996fa745c3ad3e3150363c85816ad2db3a00f5bd which put it in CTS in the first place for that purpose. It's clear libnativeloader_test won't work for API coverage due to the mocking it does, so we'd have to add new tests if there are gaps. However there doesn't seem to be any. Also do a few other cleanups in the Android.bp file. Test: atest libnativeloader_e2e_tests \ libnativeloader_test libnativeloader_lazy_test Bug: 327407752 Change-Id: I488c3d3c5143b7694a8456c3b56edfd511c3c610
2024-02-28Avoid repeated logging of the file name when ReadConfig returns an Martin Stjernholm
error. https://r.android.com/2963904 made ReadConfig include the file name in the error if the file cannot be read, but some call sites added it as well. Make it consistently the responsibility of ReadConfig. Also shorten an error message where the path itself is good enough to identify the call site. Test: presubmits Bug: 325107109 Change-Id: I0c7d6c0ea3a7fb5d2ba1fa6aa25557080ac4d630
2024-02-23Revert "Give full access to native libs from java libs in the sa..." Becky Siegel
Revert submission 2933611-libnativeloader-shared-syslibs Reason for revert: Fixing test breakage b/326622518, b/326631342 Reverted changes: /q/submissionid:2933611-libnativeloader-shared-syslibs Change-Id: I746478191c0e3a2d1a36d87e7a3db980de196420
2024-02-23Give full access to native libs from java libs in the same partition Martin Stjernholm
(reland). For both packages and shared java libs in system image partitions (system, product, vendor), load native libraries from the same partition by using the linker namespace for that partition ("default" or "system", "product", "sphal", respectively). This is only done for native libraries in the <partition root>/lib(64) directories when specified by an absolute path (i.e. use java.lang.System.load rather than loadLibrary). Otherwise it's looked up using the classloader namespace for the package, as before. Since only loads with absolute paths are affected, compat issues are unlikely. However to be on the safe side it's only enabled for SDK level 35 (VIC) and later (regardless of targetSdkVersion of the package, because the affected code is in system image partitions). This is based on a reland of commit 453b9fe909c22eb0f01b3072a5213dd46aed6f45, but with a different solution. It also extends the approach to work for vendor and product partitions. Test: atest libnativeloader_e2e_tests \ libnativeloader_test libnativeloader_lazy_test Test: libnativeloader_e2e_tests on S, Sv2, T, and U platforms in CI Bug: 237577392 Change-Id: If8b74503edfa9229b9eada73968b7d7b5c75ca10
2024-02-22Fix unit test to work on non-treblelized devices (i.e. sargo running S). Martin Stjernholm
Test: libnativeloader_test on sargo in CI Bug: 325619263 Change-Id: I6c712aeb64dca4fea5094348c72974c5e0ba1eb2
2024-02-21Fix test failures on sargo. Martin Stjernholm
https://r.android.com/2962585 added new tests, but some of them fail on S on sargo since the product partition comes from R and doesn't have its own linker namespace. Also switch version checks to use com.android.modules.utils.build.SdkLevel to correctly handle pre-release codenames. Test: libnativeloader_e2e_tests on AOSP with temporary code to verify that TestUtils.productAppsAreShared() returns false Test: libnativeloader_e2e_tests on sargo in heavy presubmit Test: libnativeloader_e2e_tests on Cuttlefish S image in heavy presubmit Bug: 325619263 Bug: 237577392 Change-Id: I7cc7d0a6288b10b5f70c6c674f88287b2489be75
2024-02-20Separate handling of a single path and a list of paths when determining Martin Stjernholm
API domains. Becomes necessary in a later CL where it gets used on more or less arbitrary paths where we shouldn't treat colons specially. The old code crashed with a fatal if a list of paths had both vendor and product directories in it. This changes that to a more appropriate error that gets propagated to the java level and becomes an exception where the classloader is created. Test: atest libnativeloader_test Bug: 237577392 Change-Id: I783af87a03de18c65fadcd1fd5a71423ec0c786b
2024-02-15Add tests for loading with absolute paths through System.load(). Martin Stjernholm
Introduce a base class for common tests for all apps. This just "documents" current behaviour as a preparation for a later CL that will change the logic for loading private native libs. Test: atest libnativeloader_e2e_tests Bug: 237577392 Change-Id: I80fd10f1d980fd79d0f6f544ec6f776987531ee6
2024-02-15Don't match dlopen errors too closely in tests. Martin Stjernholm
It doesn't matter if the load failed due to not finding the library or due to finding it in the wrong linker namespace. Add tests to check existence of private libs as a safeguard so that we don't error out for the wrong reason. Test: atest libnativeloader_e2e_tests Bug: 237577392 Change-Id: I70ebffe2763d2e5e87c45c1cf94c3b268c795fdd
2024-02-15Improve debug logging to reflect all code paths in OpenNativeLibrary. Martin Stjernholm
Also some related code cleanups. Test: atest libnativeloader_e2e_tests \ libnativeloader_test libnativeloader_lazy_test Bug: 237577392 Change-Id: Ia8842cdaf84d282353f3b0c55ca3d56bbc3bd4aa
2024-02-15Refactorings to make more logic available at the top level in Martin Stjernholm
native_loader.cpp. - Make the code that determines the partition from the dex path available to code in native_loader.cpp, and rename it since it'll be applied to arbitrary paths, not just APK's. - Move the linker namespace constants to a header file. - Various other minor code cleanups. To prepare for a later CL that needs to access these things from OpenNativeLibrary. No functional changes. Test: atest libnativeloader_e2e_tests libnativeloader_test Bug: 237577392 Change-Id: Ifc762bf6d4664b2d477c4ed3af58f149fb4c1189
2024-02-14Improve an errno error message to show the file. Martin Stjernholm
Test: presubmits Bug: 325107109 Change-Id: I40ee8146f1cc36be9634ed1e3cf689ff6ce0e1f5
2024-01-03Update `OWNERS` files under `art`. Roland Levillain
Test: n/a Change-Id: Ie62b1b6da0c52277642c9a4af6d8d208fab2e26a
2023-12-21Add mcts tag to MainlineCTS ART test modules. Tongbo Liu
Bug: 316436957 Change-Id: I7db6cf4f06ba77daf8f2e3be532a9bbda7f14667
2023-11-30Disable tests for the product partition that fail on S and Sv2. Martin Stjernholm
- Support for public libraries in /product was added with https://r.android.com/1789089 in T. The ProductAppTest app, being installed in /product/app, can still access them since it's in the same partition. - Apps in /product/app were loaded with shared library namespaces in S, so we cannot test cases where loading of private product, system, and system_ext libraries should fail in ProductAppTest.java. Also use min_sdk_version and a far future target_sdk_version for the test apps to make them run on both development and release platforms, without compat mode. Test: libnativeloader_e2e_tests on S, T, and U in heavy presubmits Bug: 259700260 Change-Id: I21d785d94132af09305c71ed038c74d7b5d58fcc
2023-10-27Add support for ART gtest `libnativeloader_e2e_tests` to ART MTS. Roland Levillain
Test: m mts \ && mts-tradefed run commandAndExit mts-art \ -m libnativeloader_e2e_tests Bug: 306395261 Bug: 268491069 Bug: 167385698 Change-Id: Ie888e7b911bf5e86ebade474941d9fa99bebda44
2023-10-19Do not expect VNDK namespace when VNDK is deprecated Kiyoung Kim
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 Test: libnativeloader_test passed with VNDK deprecated device Change-Id: I3fd14beee676c86dbc066aa51b6c6bb57962283b
2023-10-19Check if product is treblelized Kiyoung Kim
Previous change on handling product partition was based on the assumption that all devices for mainline update would be product treblelized, but it was not true. There are some upgrade devices to S which is not product treblelized. This change checks if the device is treblelized with first api level and product vndk version. Bug: 305749591 Test: AOSP cuttlefish boot succeeded Test: libnativeloader_e2e_tests passed Change-Id: I46f9c0e253363b891bdc6b073df3cc14e9f7b5aa
2023-10-16Use product vndk version to check if product vndk is deprecated Kiyoung Kim
There are some logic in libnativeloader to check if product is treblelized by checking ro.product.vndk.version. However, this property is no longer valid to check if product is treblelized, because of vndk deprecation. This makes libnativeloader to consider as product is not treblelized when the property is empty from the VNDK deprecation. This causes unexpected error from libnativeloader which allows product apps to use system / system_ext libraries when the product partition is VNDK deprecated. Product is force-treblelized from R, so it is safe to assume that product partition is always treblelized as long as the device is treblelized. This change removes existing check of ro.product.vndk.version, and use this check only to confirm if product VNDK is deprecated. Bug: 290159430 Test: Cuttlefish build and run succeeded Test: libnativeloader_e2e_tests passed Change-Id: Ieee3ff2dde4244e7c46420ad8dde5f8e5cf249e4
2023-09-04Use llndk.libraries.txt from system if VNDK is deprecated Kiyoung Kim
llndk.libraries.txt will be relocated into system when VNDK is deprecated. This change sets a new location to load llndk.libraries.txt when VNDK is deprecated. Bug: 290160925 Test: aosp_cf build and boot succeeded with llndk.libraries.txt in the system image Change-Id: Id1c6f3e0c68f5a805a9285611da759f1b9a26da4
2023-08-01Add missing AOSP module metadata to ART tests part of ART MTS. Roland Levillain
This information is required to run ART test modules (e.g. `art-run-test-001-HelloWorld`) that are part of ART MTS with the following Atest syntax: atest art-run-test-001-HelloWorld[com.android.art.apex] Test: atest art-run-test-001-HelloWorld[com.android.art.apex] Test: atest art-run-test-001-HelloWorld[com.google.android.art.apex] Test: atest art-run-test-018-stack-overflow[com.android.art.apex] Test: atest art-run-test-018-stack-overflow[com.google.android.art.apex] Test: atest art-run-test-175-alloc-big-bignums[com.android.art.apex] Test: atest art-run-test-175-alloc-big-bignums[com.google.android.art.apex] Test: atest art_standalone_artd_tests[com.android.art.apex] Test: atest art_standalone_artd_tests[com.google.android.art.apex] Test: atest art_standalone_cmdline_tests[com.android.art.apex] Test: atest art_standalone_cmdline_tests[com.google.android.art.apex] Test: atest art_standalone_compiler_tests[com.android.art.apex] Test: atest art_standalone_compiler_tests[com.google.android.art.apex] Test: atest art_standalone_libartservice_tests[com.android.art.apex] Test: atest art_standalone_libartservice_tests[com.google.android.art.apex] Test: atest art_standalone_libarttools_tests[com.android.art.apex] Test: atest art_standalone_libarttools_tests[com.google.android.art.apex] Test: atest art_standalone_libdexfile_support_tests[com.android.art.apex] Test: atest art_standalone_libdexfile_support_tests[com.google.android.art.apex] Test: atest art_standalone_libdexfile_tests[com.android.art.apex] Test: atest art_standalone_libdexfile_tests[com.google.android.art.apex] Test: atest art_standalone_libprofile_tests[com.android.art.apex] Test: atest art_standalone_libprofile_tests[com.google.android.art.apex] Test: atest art_standalone_oatdump_tests[com.android.art.apex] Test: atest art_standalone_oatdump_tests[com.google.android.art.apex] Test: atest art_standalone_odrefresh_tests[com.android.art.apex] Test: atest art_standalone_odrefresh_tests[com.google.android.art.apex] Test: atest art_standalone_runtime_tests[com.android.art.apex] Test: atest art_standalone_runtime_tests[com.google.android.art.apex] Test: atest art_standalone_sigchain_tests[com.android.art.apex] Test: atest art_standalone_sigchain_tests[com.google.android.art.apex] Test: atest libnativeloader_e2e_tests[com.android.art.apex] Test: atest libnativeloader_e2e_tests[com.google.android.art.apex] Bug: 258065512 Bug: 178703264 Change-Id: I97c76f8a96fbbc1e6146e2f0ec94e494ee7d6ce7
2023-04-29libnativeloader_test: link non-public libs statically Lev Rumyantsev
Non-public NDK libs are not supposed to be tested in CTS. Specifically native-bridged execution (e.g. arm on x86) doesn't support this. The awkward thing here is that the test redefines all libnativebridge symbols, but still links shared libnativebridge to call its OpenSystemLibrary. Due to symbols duplication we cannot simply convert libnativebridge to static. Instead, as a quick fix, we copy OpenSystemLibrary implementation from native_bridge.cpp. We expect that one of the codebase owners will find a better way to share OpenSystemLibrary later. Test: cts-tradefed run cts -m libnativeloader_tests (arm on x86) Bug: b/268440713 Change-Id: I7c651200567a299742e7604ee07b043713ca1fec
2023-03-16Make art modules apex_available to test_broken_com.android.art Cole Faust
libart-broken needs to compile against the source of its dependencies, not stubs. The stubs/source logic is complicated, but one of the ways it can be affected is that if both modules have identical apex_available lists, they will be allowed to depend on the source of each other. libart-broken needs to be apex_available to test_broken_com.android.art, so test_broken_com.android.art needs to be added to libdexfile as well. This change then propagates virally though most of the art modules. This is needed now because we're making a change to allow building the non-apex variants of apex dependencies. The apex variant of libart-broken did not have this issue because the stubs/source rules are different for apex variants. Bug: 254205429 Test: cd art && mm with aosp/2462194 Test: art/libnativebridge/tests/runtests.sh --skip-target Change-Id: Ia3517b70808d64ed2b33d68e2280b514bdfef6b6