summaryrefslogtreecommitdiff
path: root/libnativebridge/tests/NativeBridgeTest.h
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-05nativebridge: Add isNativeBridgeFunctionPointer method dimitry
This method lets native bridge report if particular pointer is in the region of code executable by native bridge implementation. Bug: 393035780 Test: atest art/libnativebridge/tests Change-Id: Icaec80cb7efae5b918aed0a98216cbfaeaba330d
2024-07-09Style changes in `libnativebridge-tests`. Roland Levillain
This is a follow-up to https://android-review.git.corp.google.com/c/platform/art/+/3080063. Test: atest --host libnativebridge-tests Test: atest libnativebridge-tests Bug: 189484095 Flag: TEST_ONLY Change-Id: I8d30747d8713e9c1d29e08758df7c7d9d68e2846
2024-05-15Use isolated: true instead of test_per_src: true in libnativebridge_tests Colin Cross
libnativebridge_tests uses test_per_src: true to avoid running multiple tests in the same process. gtest_isolated uses separate processes for each test, but without the various incompatibilities caused by test_per_src. Switch to isolated: true instead. Create a temporary directory in the constructor of the shared NativeBridgeTest base class instead and put the code_cache directory inside it to keep the tests from trying to modify the current directory. Also add the tests to TEST_MAPPING and remove the preupload check. Bug: 189484095 Test: atest --host libnativebridge_tests Test: atest libnativebridge_tests Flag: TEST_ONLY Change-Id: Iea522c1895f1f5996b10e545c44d6b00bda1ee3d
2023-08-08nativebridge: Add getTrampoline2 function to pass JNICallType dimitry
NativeBridge needs to know if JNI call is @CriticalNative, starting with v7 getTrampoline2 is used in place of getTrampoline. Bug: https://issuetracker.google.com/288392666 Test: art/libnativebridge/tests/runtests.sh --skip-target Change-Id: I60a2fd6ab2fb9d19dda7bbdcbe09144797bd1d49
2022-06-10Revert "Use compile_multilib: "both" with "32"/"64" suffixes by default for ART" Nicolas Geoffray
This reverts commit e631de122b065b014927c08df45258dffca27211. Bug: 233550842 Reason for revert: Fails nativebridge test: #################### #################### stderr diffs --- expected-stderr.txt 2008-01-01 00:00:00.000000000 -0800 +++ test-stderr.txt 2022-06-10 07:15:02.074448940 -0700 @@ -0,0 +1,5 @@ +Exception in thread "main" java.lang.UnsatisfiedLinkError: /b/s/w/ir/x/t/test-art-js9t0vr2/tmpf1x6axa7/libarttestd.so: file too short + at java.lang.Runtime.loadLibrary0(Runtime.java:1077) + at java.lang.Runtime.loadLibrary0(Runtime.java:998) + at java.lang.System.loadLibrary(System.java:1661) + at NativeBridgeMain.main(NativeBridgeMain.java:211) #################### 115-native-bridge files deleted from host ---------- test-art-host-run-test-debug-prebuild-optimizing-no-relocate-ntrace-cms-checkjni-picimage-ndebuggable-no-jvmti-cdex-fast-115-native-bridge64 Change-Id: Ib5182fc50dc94d34f314297d0bcc0fa44cd04f61
2022-06-10Use compile_multilib: "both" with "32"/"64" suffixes by default for ART Martin Stjernholm
native tests. It cannot be used for shared testing libraries since the suffixes aren't picked up by DT_NEEDED or dlopen calls. They need to continue to be installed into different directories, just like before. Test: gtests and run tests in the buildbot-build.sh chroot Test: art/libnativebridge/tests/runtests.sh Test: atest art_standalone_dex2oat_tests Bug: 233550842 Change-Id: Idd576f9de34ab63d70e63b8701373767f0bd78ae
2021-06-03Fix bitrot in the libnativebridge tests. Martin Stjernholm
- Bitrot 1: NativeBridge2Signal_test stopped working when version 3 was added in https://r.android.com/234059. - Bitrot 2: The code path that PreInitializeNativeBridgeFail1_test tested was removed completely when missing app data directory was allowed in https://r.android.com/1208629, so delete the test. - Use cc_test_library for the dynamic test libs so they are installed in the test directory rather than in system/lib(64). - Use test_per_src since native_bridge.cc doesn't support reloading the native bridge implementation lib after unloading. - Add a custom script to run the tests and a preupload check that the script is run. (Configuring atest for these tests still TBD in b/189484095 - test_per_src is a complication.) Test: art/libnativebridge/tests/runtests.sh Bug: 122710865 Bug: 189484095 Change-Id: Ib2b387e1d858127ca4bb44c548a5105ea8b838d8
2020-07-27libnativebridge: updates for Android's inclusive language guidance Orion Hodson
Based on: https://source.android.com/setup/contribute/respectful-code Bug: 161896447 Bug: 161850439 Bug: 161336379 Test: treehugger Change-Id: I11c2bc377bccb84c5ad587350c76972614262c23
2019-10-16Remove temporary CPPLINT.cfg files Orion Hodson
Temporary CPPLINT.cfg files were introduced when move libnativeloader and libnativebridge under art/. Bug: 141749154 Test: mm cpplint-art-all Change-Id: I85e75180138a512aef025f1e5275e20d8d1d14b0
2019-10-11Move libnative{bridge,loader} to art/ Orion Hodson
This change moves system/core/libnative{bridge,loader} under art/. Bug: 137364733 Test: m Change-Id: I9be7333d00fcd3f36cd80520e50a30ea840187ad