summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2024-01-02 14:08:44 +0000
committer Android Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2024-01-04 14:10:46 +0000
commitc968f45f41f9ca409c967e5495d28a049eebf14d (patch)
tree495817fb89a8f44582d60f5a3b96a228d3547458
parent1ad622c724bafcc091f7dfd905919d74c13e245b (diff)
Update Test913 to check for .art] to detect if there's an image
Test913 checks if Object.class is in image space when an image is loaded. The test checks for a ".art" mapping in /proc/self/maps to check if an image exists. We should also check for ".art]". Bug: 318039063 Test: art/test.py -t 913 (cherry picked from https://android-review.googlesource.com/q/commit:9a3ca371e9fe14ccf4e55fd1c9a8c45b01b5250c) Merged-In: I0ef5ae0dc35669dd5603b35e34f00e653f70a3c1 Change-Id: I0ef5ae0dc35669dd5603b35e34f00e653f70a3c1
-rw-r--r--test/913-heaps/src/art/Test913.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/913-heaps/src/art/Test913.java b/test/913-heaps/src/art/Test913.java
index 4fffa88198..8bd7cf4710 100644
--- a/test/913-heaps/src/art/Test913.java
+++ b/test/913-heaps/src/art/Test913.java
@@ -317,7 +317,8 @@ public class Test913 {
BufferedReader reader = new BufferedReader(new FileReader("/proc/" + pid + "/maps"));
String line;
while ((line = reader.readLine()) != null) {
- if (line.endsWith(".art")) {
+ // On host the mappings end with .art and on device they end with .art]
+ if (line.endsWith(".art]") || line.endsWith(".art")) {
reader.close();
return true;
}