summaryrefslogtreecommitdiff
path: root/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2020-03-06 09:19:42 -0800
committerMathieu Chartier <mathieuc@google.com>2020-03-06 12:32:00 -0800
commit6f44bd04927acc92e3f7ccadbc580a7da33f96a9 (patch)
tree6c9436ab603e2273edaa6ebc30c04818c2de00c6 /tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
parenta37afa406721c44de4c0ca8c7afcc44d780ae5d4 (diff)
Make BootImageProfileTest less flaky
Number one flake is when the system server process is killed before SIGUSR1. Change this case to be non fatal. Increase number of retry iterations in case the package manager is very slow to start and get a JIT sample. Hopefully fixes the other flake where PackageManagerService.<init> is not seen in the profile. (cherry-picked from commit d5d442ddd9b59528f84ae84b27b05795c04ef7cb) Test: atest BootImageProfileTest Bug: 149802360 Merged-In: I52ac80f15d8efe152dea81b75a82faa4da1b8600 Change-Id: I52ac80f15d8efe152dea81b75a82faa4da1b8600
Diffstat (limited to 'tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java')
-rw-r--r--tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java b/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
index 34e6a4b42ac8..9a02bd405417 100644
--- a/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
+++ b/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
@@ -78,13 +78,12 @@ public class BootImageProfileTest implements IDeviceTest {
return false;
}
String res = mTestDevice.executeShellCommand("kill -s SIGUSR1 " + pid).trim();
- assertTrue("kill SIGUSR1: " + res, res.length() == 0);
- return true;
+ return res.length() == 0;
}
@Test
public void testSystemServerProfile() throws Exception {
- final int numIterations = 20;
+ final int numIterations = 30;
String res;
// Set properties and wait for them to be readable.
for (int i = 1; i <= numIterations; ++i) {