Closed Bug 1028129 Opened 7 years ago Closed 5 months ago

[mozcrash] Make mozcrash.check_for_crashes() test_name mandatory


(Testing :: Mozbase, enhancement)

Not set


(Not tracked)



(Reporter: emorley, Assigned: gbrown)


At the moment it's optional as to whether we pass in the test name to mozcrash.check_for_crashes(), so that it can use it in the PROCESS CRASH failure message:

If not passed in, we just use the filename of the calling script, which normally isn't very helpful, since the calling script has much more context to make decisions like calling the test name "B2G Startup", "Shutdown" etc, even if there isn't a valid test running at the moment.

As such, I think we should remove this footgun, to prevent having to play whac-a-mole with bugs like bug 1027607.

Ideally we'd also call it something other than test-name, eg: step_name / description etc, but that will mean changing a lot of callers in lots of different repos, so let's save that for another day.
This still seems relevant/useful fwiw.

Most callers do not supply test_name, and I think it would be difficult for most callers to supply a meaningful test name. Some (most?) callers run a sequence of tests, then check_for_crashes(); while there are cases where the most recent test to log its name is "responsible" for the crash, there are other cases, and other explanations for crashes. I understand the desire to associate crashes with tests (test_names), but I don't think that is realistic: Crashes are best understood in terms of their crash stacks, and should be delegated for investigation based on the crashing code rather than the test name.

Assignee: nobody → gbrown
Type: defect → enhancement
Closed: 5 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.