summaryrefslogtreecommitdiff
path: root/libs/binder/rust/tests
AgeCommit message (Collapse)Author
2021-04-22Merge "Allow set_requesting_sid to be enabled when AIDL Binder is created."Andrew Walbran
2021-04-19Use the new more inclusive command-line options.Joel Galenson
Test: Compile Change-Id: If0a5a6c20b72034e15ebca2ced6a9394f007a12d
2021-04-14Allow set_requesting_sid to be enabled when AIDL Binder is created.Andrew Walbran
Bug: 181869875 Bug: 178852354 Test: mm Change-Id: Iff84df4ee4eed2f24d02fd8156b575a443bbb0c6
2021-03-09Add DeathRecipient and IBinder to public_api.Andrew Walbran
This is necessary for clients to use link_to_death. Moved internal methods to new IBinderInternal trait instead, to avoid exposing them. Bug: 181869875 Test: mm Change-Id: I0d28bed920b7d7e3b4b40a3583bdaf96f257941f
2021-02-25Merge "libbinder_rs: Modify asserts to propagate failure to C++"Steven Moreland
2021-02-15[LSC] Add LOCAL_LICENSE_KINDS to frameworks/nativeBob Badour
Added SPDX-license-identifier-Apache-2.0 to: cmds/atrace/Android.bp cmds/bugreport/Android.bp cmds/bugreportz/Android.bp cmds/cmd/Android.bp cmds/dumpstate/Android.bp cmds/dumpsys/Android.bp cmds/dumpsys/tests/Android.bp cmds/flatland/Android.mk cmds/idlcli/Android.bp cmds/installd/Android.bp cmds/installd/tests/Android.bp cmds/ip-up-vpn/Android.mk cmds/lshal/Android.bp cmds/lshal/libprocpartition/Android.bp cmds/rawbu/Android.bp cmds/rss_hwm_reset/Android.bp cmds/service/Android.bp cmds/servicemanager/Android.bp cmds/surfacereplayer/Android.bp cmds/surfacereplayer/replayer/Android.bp libs/adbd_auth/Android.bp libs/android_runtime_lazy/Android.bp libs/arect/Android.bp libs/binder/Android.bp libs/binder/ndk/Android.bp libs/binder/ndk/tests/Android.bp libs/binder/parcel_fuzzer/Android.bp libs/binder/rust/Android.bp libs/binder/rust/tests/Android.bp libs/binder/tests/Android.bp libs/binder/tests/fuzzers/Android.bp libs/binderdebug/Android.bp libs/binderdebug/tests/Android.bp libs/binderthreadstate/1.0/Android.bp libs/binderthreadstate/Android.bp libs/bufferqueueconverter/Android.bp libs/cputimeinstate/Android.bp libs/diskusage/Android.bp libs/dumputils/Android.bp libs/fakeservicemanager/Android.bp libs/gralloc/types/Android.bp libs/gralloc/types/fuzzer/Android.bp libs/gralloc/types/tests/Android.bp libs/graphicsenv/Android.bp libs/gui/Android.bp libs/gui/sysprop/Android.bp libs/gui/tests/Android.bp libs/incidentcompanion/Android.bp libs/input/Android.bp libs/input/tests/Android.bp libs/math/Android.bp libs/math/tests/Android.bp libs/nativebase/Android.bp libs/nativedisplay/Android.bp libs/nativewindow/Android.bp libs/nativewindow/tests/Android.bp libs/renderengine/Android.bp libs/renderengine/tests/Android.bp libs/sensor/Android.bp libs/sensor/tests/Android.bp libs/sensorprivacy/Android.bp libs/ui/Android.bp libs/ui/tests/Android.bp libs/ui/tools/Android.bp libs/vibrator/Android.bp libs/vibrator/fuzzer/Android.bp libs/vr/libpdx/Android.bp libs/vr/libpdx/fuzz/Android.bp libs/vr/libvr_manager/Android.bp opengl/libs/Android.bp opengl/tests/EGLTest/Android.bp opengl/tests/fillrate/Android.bp opengl/tests/finish/Android.bp opengl/tests/gl2_basic/Android.bp opengl/tests/gl2_cameraeye/Android.bp opengl/tests/gl2_copyTexImage/Android.bp opengl/tests/gl2_java/Android.bp opengl/tests/gl2_jni/Android.bp opengl/tests/gl2_yuvtex/Android.bp opengl/tests/gl_jni/Android.bp opengl/tests/gl_perf/Android.bp opengl/tests/gl_perfapp/Android.bp opengl/tests/gl_yuvtex/Android.bp opengl/tests/gldual/Android.bp opengl/tests/gralloc/Android.bp opengl/tests/hwc/Android.bp opengl/tests/lib/Android.bp opengl/tests/lighting1709/Android.bp opengl/tests/linetex/Android.bp opengl/tests/swapinterval/Android.bp opengl/tests/testFramerate/Android.bp opengl/tests/testLatency/Android.bp opengl/tests/testPauseResume/Android.bp opengl/tests/testViewport/Android.bp opengl/tests/textures/Android.bp services/audiomanager/Android.bp services/automotive/display/Android.bp services/batteryservice/Android.bp services/displayservice/Android.bp services/gpuservice/Android.bp services/gpuservice/bpfprogs/Android.bp services/gpuservice/gpumem/Android.bp services/gpuservice/gpustats/Android.bp services/gpuservice/tests/unittests/Android.bp services/gpuservice/tracing/Android.bp services/inputflinger/Android.bp services/inputflinger/benchmarks/Android.bp services/inputflinger/dispatcher/Android.bp services/inputflinger/host/Android.bp services/inputflinger/reader/Android.bp services/inputflinger/reporter/Android.bp services/inputflinger/tests/Android.bp services/inputflinger/tests/fuzzers/Android.bp services/powermanager/Android.bp services/schedulerservice/Android.bp services/sensorservice/Android.bp services/sensorservice/hidl/Android.bp services/sensorservice/tests/Android.bp services/stats/Android.bp services/surfaceflinger/Android.bp services/surfaceflinger/CompositionEngine/Android.bp services/surfaceflinger/TimeStats/Android.bp services/surfaceflinger/TimeStats/timestatsproto/Android.bp services/surfaceflinger/layerproto/Android.bp services/surfaceflinger/sysprop/Android.bp services/surfaceflinger/tests/Android.bp services/surfaceflinger/tests/fakehwc/Android.bp services/surfaceflinger/tests/unittests/Android.bp services/surfaceflinger/tests/vsync/Android.bp services/surfaceflinger/tests/waitforvsync/Android.bp services/utils/Android.bp services/utils/tests/Android.bp services/vr/hardware_composer/Android.bp services/vr/virtual_touchpad/Android.bp vulkan/libvulkan/Android.bp vulkan/nulldrv/Android.bp vulkan/vkjson/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS legacy_notice to: Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT legacy_notice to: opengl/Android.bp opengl/tests/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_notice to: libs/vr/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: headers/Android.bp services/vr/Android.bp vulkan/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS to: cmds/surfacereplayer/proto/Android.bp libs/vr/libbroadcastring/Android.bp libs/vr/libbufferhub/Android.bp libs/vr/libbufferhubqueue/Android.bp libs/vr/libbufferhubqueue/benchmarks/Android.bp libs/vr/libbufferhubqueue/tests/Android.bp libs/vr/libdisplay/Android.bp libs/vr/libdvr/Android.bp libs/vr/libdvr/tests/Android.bp libs/vr/libdvrcommon/Android.bp libs/vr/libpdx_default_transport/Android.bp libs/vr/libpdx_uds/Android.bp libs/vr/libperformance/Android.bp libs/vr/libvrflinger/Android.bp libs/vr/libvrflinger/tests/Android.bp libs/vr/libvrsensor/Android.bp opengl/tests/configdump/Android.bp opengl/tests/filter/Android.bp opengl/tests/gl_basic/Android.bp opengl/tests/tritex/Android.bp services/vr/bufferhubd/Android.bp services/vr/hardware_composer/aidl/Android.bp Added SPDX-license-identifier-BSD SPDX-license-identifier-MIT legacy_notice to: opengl/tests/angeles/Android.bp Added SPDX-license-identifier-MIT to: services/vr/performanced/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ib1de8cd7b87446de45d79db15cd90b93a591846d Merged-in: I61e7702e6b36f218bebc7c87853001861a92741e Merged-in: I9d9d5fb32033c08cfb517f6cfc0ecb4cf1eee2fe Merged-in: I10f45547b1161e3768a134b38bf40d77a3a82f09
2021-02-15libbinder_rs: Modify asserts to propagate failure to C++Stephen Crane
We can't rely on Rust panics to unwind, so we need to return failed transaction rather than panic on assertion failures. Replaces assert! and assert_eq! to propagate failures as failed transactions rather than Rust panics. Test: atest rustBinderSerializationTest Bug: 179067202 Change-Id: I01b6443b364a9df2a5631f2ddfbc72ce13febe93
2021-02-09libbinder_rs: Add Strong<> and Weak<> Binder referencesStephen Crane
Adds Strong<dyn Interface> and Weak<dyn Interface> references for Binder interfaces. These structs are equivalent to sp<Interface> and wp<Interface> in C++. Bug: 175584883 Test: atest -p frameworks/native/libs/binder/TEST_MAPPING Change-Id: Icf1b3acf0d8c82d541281a5aae9814372a5ab800
2021-02-01Do not test panic capture in Rust.Matthew Maurer
We have switched panic strategy to abort rather than unwind. This prevents the previously tested behavior from working correctly. Bug: 178577888 Test: atest rustBinderSerializationTest Change-Id: I0ab1ed86ed1264054f43a9655185496d9c8b6328
2021-01-21Add Rust/C++ Parcel serialization testsStephen Crane
This tests cross-language marshaling between C++ and Rust for all available parcelable types. Test: atest libbinder_rs-internal_test Change-Id: I57fae844d58395ee85f0afa4604e1480262f1a4b
2020-12-03Revert "Revert "libbinder_rs: Treat previously associated Binder as remote""Stephen Crane
This reverts commit f6b9ad98ee61149f42b6ca0bf84068d4411a92f8. Reason for revert: Includes fix for aidl_integration_test failure that prompted the initial revert Original commit message: libbinder_rs: Treat previously associated Binder as remote A binder object may have already been associated by another module (e.g. NDK code that created the object if it is local) and therefore already have an NDK AIBinder_Class. In this case we still want to transact with the object, but must treat it as remote if its class does not match the class expected for a compatible Rust service. Re-landing this change with the fix for aidl_integration_test failure that prompted its reversion. Bug: 167723746 Test: atest rustBinderTest binderRustNdkInteropTest Change-Id: I9a848bcc4b8003a22ebe59c89a95be70ef6ee7ec
2020-12-03Revert "libbinder_rs: Treat previously associated Binder as remote"Matthew Maurer
This reverts commit 29422bf9421560bf283c063ad13a82fa30d9a141. Reason for revert: b/174694961 Change-Id: I3043d1c9b7b317c9bf9a0ebeedf0ef1e16025827
2020-11-25libbinder_rs: Treat previously associated Binder as remoteStephen Crane
A binder object may have already been associated by another module (e.g. NDK code that created the object if it is local) and therefore already have an NDK AIBinder_Class. In this case we still want to transact with the object, but must treat it as remote if its class does not match the class expected for a compatible Rust service. Bug: 167723746 Test: atest rustBinderTest binderRustNdkInteropTest Change-Id: Id90c8153a3cc6656607c29bd8864e513c3f090d5
2020-09-09Expose binder security context to rust binder servicesJanis Danisevskis
This patch exposes AIBinder_setRequestingSid and AIBinder_getCallingSid to binder services written in Rust. This is required by services to effectively enforce SEPolicy because relying only on the caller's PID is racy. Bug: 165070170 Test: atest rustBinderTest Change-Id: Iae25d4fedded7d133354ba4c82527f33e5d5e1ce
2020-08-14Add rustBinderTestService to general-tests suiteDan Shi
The test binary is needed by rustBinderTest Bug: 164454409 Test: m rustBinderTestService Change-Id: Ifd2a3087c585244546c789646a7fc5cc656f3c12
2020-08-12Initial Binder Rust crateStephen Crane
This crate exposes an idiomatic Binder interface for Rust clients and services. This interface is primarily designed for use by the forthcoming Rust backend for the AIDL compiler. The crate links against the stable NDK version of the libbinder interface and therefore can be used by APEX packages. Test: atest rustBinderTest libbinder_rs-internal_test Bug: 161559357 Change-Id: I2e9b800186f24217edeb1c3778f13902a3cca2fd