Closed
Bug 761586
Opened 13 years ago
Closed 12 years ago
mozcrash.check_for_crashes does the wrong thing when MINIDUMP_SAVE_PATH is set to a nonexistent directory
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ted, Assigned: ted)
References
Details
(Whiteboard: [mozbase])
Attachments
(1 file)
2.92 KB,
patch
|
emorley
:
review+
|
Details | Diff | Splinter Review |
If MINIDUMP_SAVE_PATH is set to a nonexistent dir, then the shutil.move in checkForCrashes will just move the dump file to a file with that name. We're hitting this on the slaves right now, they're just getting stuck in a file named "minidumps", with the newest one overwriting the previous one.
We'll have to stick in an os.path.isdir check there, mkdir it if it doesn't exist, and also unlink it if it exists as a file already, to clear up the existing mess.
Assignee | ||
Updated•12 years ago
|
Component: Mochitest → Mozbase
QA Contact: hskupin
Summary: automationutils.checkForCrashes does the wrong thing when MINIDUMP_SAVE_PATH is set to a nonexistent directory → mozcrash.check_for_crashes does the wrong thing when MINIDUMP_SAVE_PATH is set to a nonexistent directory
Whiteboard: [mozbase]
Assignee | ||
Comment 1•12 years ago
|
||
Since our test harnesses are using mozcrash now, we'll just fix it there.
Comment 2•12 years ago
|
||
Comment on attachment 748028 [details] [diff] [review]
handle non-existent dump_save_path
Review of attachment 748028 [details] [diff] [review]:
-----------------------------------------------------------------
::: mozcrash/mozcrash/mozcrash.py
@@ +125,4 @@
> if dump_save_path is None:
> dump_save_path = os.environ.get('MINIDUMP_SAVE_PATH', None)
> if dump_save_path:
> + # This code did not previouslycreate the directory,
Missing space between "previously" and "create".
@@ +131,5 @@
> + os.unlink(dump_save_path)
> + if not os.path.isdir(dump_save_path):
> + try:
> + os.makedirs(dump_save_path)
> + except OSError, e:
This results in pyflakes complaining about 'e' since not used, can we drop it please.
Attachment #748028 -
Flags: review?(emorley) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Pushed with those nits fixed:
https://github.com/mozilla/mozbase/commit/65d40d28e111e3bfe2d2c623e3bd11302c47bfd2
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•