[Android] Refine bad build check and testcase manager execution - #5456
Conversation
6c51bd7 to
455c3f5
Compare
455c3f5 to
c41d97d
Compare
c41d97d to
91f145b
Compare
91f145b to
8630786
Compare
8630786 to
7ea0de9
Compare
29bb199 to
a9b0c46
Compare
a9b0c46 to
0e01fdf
Compare
dylanjew
left a comment
There was a problem hiding this comment.
LGTM. sorry, forgot to send my comments earlier
07d8d6a to
8ad9f8e
Compare
decoNR
left a comment
There was a problem hiding this comment.
Overall LGTM. Left a quick question, please answer it before merging.
Were you able to test it in dev to guarantee that this does not affect other platforms? I think this seems important since one of the changes is not specific to Android.
Sure no worries, that specific argument in the Is only used on android, see: |
Perfect, thanks. |
8ad9f8e to
1162aa8
Compare
Bug: b/553141628
Overview
Since Android API level 30 (and apps targeting Android 11+), apps have scoped storage access. Previously, bad build checks for Android did not verify whether the application process actually survived startup because
am startreturns 0 even if the process dies immediately.This PR enhances
check_for_bad_build()intestcase_manager.pyby ensuring command line files are written prior to execution and flipping a conditional so in the bad build check the android specific validation proceeds other validations.The later was required because thanks to this PR we added the possibility to check for false positives, but this added a problem in which valid builds were incorrectly flagged as crashes, so by flipping the conditional we fix this.
Changes
src/clusterfuzz/_internal/bot/testcase_manager.py: Updatedcheck_for_bad_build()to passwrite_command_line_file=Trueand verify target application process presence on Android post-launch.Tests performed
When this happen now CF correctly determines that the app crashed due to runtime issues not related to memory errors.
PR stack
masterfeature/android-exit-code-constantsfeature/android-exit-code-corefeature/android-exit-code-process-handlerfeature/android-bad-build-check👈Note:
Adding additional debug logs in this other PR: