Closed Bug 1275702 Opened 9 years ago Closed 9 years ago

cleanup pending crash reports before running android browser tests

Categories

(Firefox for Android Graveyard :: Testing, defect)

49 Branch
defect
Not set
normal

Tracking

(firefox49 affected)

RESOLVED WORKSFORME
Tracking Status
firefox49 --- affected

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

+++ This bug was initially created as a clone of Bug #1275692 +++ In the land of mochitest/reftest (bug 1274395) we found that old pending crash reports in the user app data dir were causing some prompting/interference in tests. We should do this for Android too. It should not be an issue in automation or on emulators -- the emulator image should be clean. But for autophone and when running tests locally against Android devices, pending crash reports might be present and might affect tests. See the patch on bug 1274395 for inspiration.
Autophone should be ok. We have AutophoneCrashProcessor.clear() at https://github.com/mozilla/autophone/blob/master/autophonecrash.py#L115 which deletes anr_traces, tombstones and minidumps. It is called from Phonetest.setup_job() at https://github.com/mozilla/autophone/blob/master/phonetest.py#L938 which is called at PhoneWorkerSubprocess.run_tests https://github.com/mozilla/autophone/blob/master/worker.py#L717 for each test.
(In reply to Bob Clary [:bc:] from comment #1) > which deletes anr_traces, tombstones and minidumps. But these are *pending* crash reports, written to "<UAppData>/Crash Reports". (I'm not sure of the location of <UAppData> on Android.)
https://dxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/nsExceptionHandler.cpp#1406 ShouldReport() returns false if "MOZ_CRASHREPORTER_NO_REPORT" is set. https://dxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/nsExceptionHandler.cpp#2819 if ShouldReport() returns false, then the "minidumps stay in [profile]/minidumps/ limbo". So, as long as we set "MOZ_CRASHREPORTER_NO_REPORT" we should be able to deal with just the minidumps in the profile.
I'll buy that! And indeed, I see MOZ_CRASHREPORTER_NO_REPORT=1 in logcats when I run all test flavors on Android, and I see no evidence of "Crash Reports" being created. There might be pending crash reports on some developer devices, and that might affect some tests, but, as Ted pointed out in bug 1274395, we probably don't want to automatically delete pending crash reports from developer environments. The advantage of taking any action on Android appears to be minimal, so...
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.