From 2174ba31dfa1f8a81c0ca38e9553ffdc8db94d0b Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Tue, 7 Sep 2021 00:26:17 +0100 Subject: Better isolate standalone ART gtests on device. Standalone ART gtests used to be installed in the same directory on device (`/data/local/tmp/nativetest`), which could be a race condition. In particular, some ART gtests are run as root (e.g. `art_standalone_dexoptanalyzer_tests`) and create the `/data/local/tmp/nativetest` directory with `root` ownership/permissions, preventing any subsequent ART gtest not run as root (e.g. `art_standalone_cmdline_tests`) from installing its artifacts in that directory. To prevent these issues, use a different directory on device (under `/data/local/tmp`) per standalone ART gtest. (cherry picked from commit d8c0ac264f606bf0c69781388ca6048eb0a4b55f) (cherry picked from commit 58a79873e94dbe4a168221fc95b641dbf8cd3e3e) Test: atest art_standalone_dexoptanalyzer_tests \ && atest art_standalone_cmdline_tests Test: atest art_standalone_\*_tests Bug: 194403904 Bug: 162834439 Change-Id: I141c1676382b078c1441e5782b3dc77affafa3fc Merged-In: I141c1676382b078c1441e5782b3dc77affafa3fc --- compiler/art_standalone_compiler_tests.xml | 10 +-- dex2oat/art_standalone_dex2oat_tests.xml | 54 +++++++-------- .../art_standalone_dexoptanalyzer_tests.xml | 22 +++--- libdexfile/art_standalone_libdexfile_tests.xml | 14 ++-- libprofile/art_standalone_libprofile_tests.xml | 10 +-- oatdump/art_standalone_oatdump_tests.xml | 6 +- profman/art_standalone_profman_tests.xml | 6 +- runtime/art_standalone_runtime_compiler_tests.xml | 10 +-- runtime/art_standalone_runtime_tests.xml | 78 +++++++++++----------- test/art-gtests-target-standalone-template.xml | 4 +- 10 files changed, 107 insertions(+), 107 deletions(-) diff --git a/compiler/art_standalone_compiler_tests.xml b/compiler/art_standalone_compiler_tests.xml index 4137a183c3..4cf6e3d514 100644 --- a/compiler/art_standalone_compiler_tests.xml +++ b/compiler/art_standalone_compiler_tests.xml @@ -16,19 +16,19 @@ -