From 8722201866e3ad145b755953e84afa057349dd8a Mon Sep 17 00:00:00 2001 From: Nikita Putikhin Date: Tue, 16 Jul 2024 12:37:59 +0200 Subject: [PATCH] Use test install base template instead of a hardcoded path ** This CL reapplies aosp/3150696. Now it is connected to a corresponding change in rust soong module to ensure system test dir does not change to avoid b/350479879. ** Make the template more consistent with the native (aka cc) test temlate. The important change is that vendor tests will be pushed into /data/local/tests/vendor. Having the test binary in the vendor test folder makes the linker treat it as a vendor binary and prefer vendor libraries. Previously, the test binary was always a system binary (due to being in /data/local/tmp) and used system libraries first potentially leading to bugs (e.g. the one attached). This change also makes vendor tests that use vendor libraries require root due to an existing SELinux policy issue with atest. Bug: 347370677 Test: checked with: - libsecretkeeper_core_test - libauthgraph_boringssl_test - libdice_policy.test Test steps: atest -d .vendor # runs vendor variant, passes adb root adb shell find / -iname 2>/dev/null # before change: /data/local/tmp/ # after change: /data/local/tests/vendor/ Test: v2/android-kvm-team/avf_presubmit_tests Change-Id: I19793bd20bc23ff0c78e622bc6b93f9a90d725c0 --- core/rust_device_test_config_template.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/rust_device_test_config_template.xml b/core/rust_device_test_config_template.xml index bfd2f4761c..aacabcb111 100644 --- a/core/rust_device_test_config_template.xml +++ b/core/rust_device_test_config_template.xml @@ -20,11 +20,11 @@ -