Closed Bug 1057044 Opened 5 years ago Closed 5 years ago

[mozrunner] Remove minidumps from device after pulling them for crash detection

Categories

(Testing :: Mozbase, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: davehunt, Assigned: davehunt)

References

Details

Attachments

(1 file, 1 obsolete file)

After pulling the minidumps folder from the device it is removed, which is preventing any further minidumps from being written to it. We should only remove the contents of this folder instead.
Comment on attachment 8476937 [details] [diff] [review]
Remove minidumps from device after pulling them for crash detection. v1.0

Review of attachment 8476937 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good! r+, with one nit.

::: testing/mozbase/mozrunner/mozrunner/devices/base.py
@@ +61,5 @@
>          remote_dump_dir = posixpath.join(self.app_ctx.remote_profile, 'minidumps')
>          local_dump_dir = tempfile.mkdtemp()
>          self.dm.getDirectory(remote_dump_dir, local_dump_dir)
> +        for f in self.dm.listFiles(remote_dump_dir):
> +            self.dm.removeFile('/'.join([remote_dump_dir, f]))

nit: use 'posixpath.join' here
Attachment #8476937 - Flags: review?(ahalberstadt) → review+
(In reply to Dave Hunt (:davehunt) from comment #0)
> After pulling the minidumps folder from the device it is removed, which is
> preventing any further minidumps from being written to it. We should only
> remove the contents of this folder instead.

That's interesting. Shouldn't we better re-create that folder? Ted, do you know about that?
Flags: needinfo?(ted)
It ought to be created on startup, but it's possible you're just hitting a race condition with the app restarting, deleting it after it checks for it. Don't delete the folder, just delete the minidumps.
Flags: needinfo?(ted)
https://hg.mozilla.org/mozilla-central/rev/f66f7b5533f9
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.