Commit Graph

14 Commits

Author SHA1 Message Date
Mathieu Chartier
6f44bd0492 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 d5d442ddd9)

Test: atest BootImageProfileTest
Bug: 149802360
Merged-In: I52ac80f15d8efe152dea81b75a82faa4da1b8600
Change-Id: I52ac80f15d8efe152dea81b75a82faa4da1b8600
2020-03-06 12:32:00 -08:00
Mathieu Chartier
a37afa4067 Use shell commands instead of ITestDevice for BootImageProfile test
For some reason, ITestDevice property getting and setting is flaky on
GCE. This causes frequent test failures.

Test: tested on cuddlefish device
Bug: 149802360

(cherry-picked from commit 94d9a21ccb)

Merged-In: Iba48c173bdea2d55d8f2aa7f0fa382628582fe1c
Change-Id: Iba48c173bdea2d55d8f2aa7f0fa382628582fe1c
2020-03-06 12:21:11 -08:00
Mathieu Chartier
44e771cf3b Make BootImageProfileTest less flaky
Use the system properties instead of phenotype since GMS can change the
values more arbitrarily for PH properties.

Test: manual
Bug: 149645847

(cherry-picked from commit 599079b381)

Merged-In: If0a716075597f45e95b8357480e4b4a7c52fbb2a
Change-Id: If0a716075597f45e95b8357480e4b4a7c52fbb2a
2020-03-06 12:13:00 -08:00
Mathieu Chartier
ac3eecfd8a Revert "Disable BootImageProfileTest presubmit"
This reverts commit 33b9bb815b.

Bug: 149802360
Reason for revert: Test is hopefully fixed

Change-Id: Ifc99b98d0b438f5c0d7ae29a9046c4fc5fe2cf21
2020-02-22 22:01:24 +00:00
Mathieu Chartier
33b9bb815b Disable BootImageProfileTest presubmit
Test is failing, disabling until fixed.

Bug: 149802360
Test: TH
Change-Id: Iac12d7ecd9e6a042ecafd3a0ef41da7daebe655f
2020-02-19 12:42:44 -08:00
Mathieu Chartier
19773e04fc Set boot image profile properties in a loop for BootImageProfileTest
Set the properties in a loop to attempt and prevent flakiness if
properties aren't set by the time the tests starts.

Bug: 148649139
Test: atest BootImageProfileTest
Change-Id: I9a51770d687c93e0eb8829c277e1ec0a33d7c481
2020-02-11 08:27:31 -08:00
Mathieu Chartier
98e621e805 Add OWNERS file for BootImageProfileTest
Make it easier to find owners if the test becomes flaky.

Bug: 148649139
Test: manual
Change-Id: Ib8afcb027c92a376ab042f0cf7f9731edc17b7e0
2020-02-10 11:22:27 -08:00
Mathieu Chartier
3c7125c5b6 Add retry loop for BootImageProfileTest
In case the package manager is not yet started, retry saving the
profile up to 20 times to give it time. Should fix test flakiness.

Also addresses previous review comment.

Bug: 144048260
Bug: 139883463
Test: atest BootImageProfileTest

(cherry-picked from commit 233c33956b)

Merged-In: I12e101447d2a42fb0fcad7ad3427750c3ce89a79
Change-Id: I12e101447d2a42fb0fcad7ad3427750c3ce89a79
2019-11-11 20:24:18 +00:00
Mathieu Chartier
f34532e53a Add test for system server method sampling
Verify that the package manager constructor is in the profile.

Bug: 139883463
Test: atest BootImageProfileTest
Change-Id: I53350be972771c246c95f623eeb1289c59c9ba84
2019-11-04 13:53:35 -08:00
Mathieu Chartier
de49e23a3b Fix waiting for system server to be running for BootImageProfileTest
In the case where system server was not yet running, the invalid pid
would cause the test to fail instead of doing the 20 retry loop.
Fixed the logic to handle this case.

Presumably fixes test flakyness.

Bug: 143223380
Bug: 139883463
Test: atest ./tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java

Change-Id: I4bac03e7f377058479f75daaa0d57608614bf329
2019-10-23 14:06:40 -07:00
Mathieu Chartier
9a1c86dd4b Use phenotype properties for boot image profile test
Use these properties instead of system properties to get coverage.

Bug: 139883463
Test: atest BootImageProfileTest

Change-Id: I9275913ef109b5aaf0bdca6c07da8f102ecdc701
2019-10-11 15:10:01 -07:00
Mathieu Chartier
bafd39c1cb Add a test that we get samples for a common core-oj method
Test: atest frameworks/base/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
Bug: 139883463
Change-Id: I11d0d98731756da5b9739b18acb5ab140657ca34
2019-10-01 19:53:19 +00:00
Mathieu Chartier
4aafe443c3 Wait for the profile to not be empty in BootImageProfileTest
Keep trying to force profile saves until it's not empty. This handles
the case when the system server isn't started enough to save a profile
yet. This can be affected by boot time fluctuations if we don't wait.

Test: atest BootImageProfileTest
Bug: 139883463

Change-Id: I98b359412f919bd64c2cd2a5b7d6659d1cef113d
2019-09-24 15:13:26 -07:00
Mathieu Chartier
feca77fc81 Add test for boot image profile collection
Test that the expected properties are set.

Test that saving the system server profile contains both the boot image
profile and system server profile.

The test requires root to run.

Bug: 139883463
Test: atest BootImageProfileTest

(cherry picked from commit f7849d916a)

Change-Id: Id7fa4ecc507864c2855da276025be076e5768df1
Merged-In: I6bb39337ba07be58b7dc2b314a8ee92154256f17
2019-09-20 16:42:06 -07:00