deviceManagerSUT.py:killProcess should retry

RESOLVED FIXED

Status

Testing
Mozbase
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bc, Assigned: bc)

Tracking

Trunk
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 713100 [details] [diff] [review]
patch

devicemanagerSUT.killProcess will abort if it fails to kill the process. This is a problem since the inability to kill processes sometimes at least appears to be transient. I've seen this often in autophone.

We should try to kill the process up to the limit devicemanagerSUT.retryLimit.

I've tested this on autophone and it appears to work fine.
Attachment #713100 - Flags: review?(jmaher)
Comment on attachment 713100 [details] [diff] [review]
patch

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

::: mozdevice/mozdevice/devicemanagerSUT.py
@@ +570,5 @@
> +            except DMError, err:
> +                retries +=1
> +                print ("WARNING: try %d of %d failed to kill %s" %
> +                       (retries, self.retryLimit, appname))
> +                print err

there is a danger here of the 'err' text geting caught in the tbpl log parsing and reporting an error.  I don't recall any bugs on file in recent times where we have had this in tegra/panda automation, so this might be ok for now.
Attachment #713100 - Flags: review?(jmaher) → review+
(Assignee)

Comment 2

5 years ago
(In reply to Joel Maher (:jmaher) from comment #1)

> 
> there is a danger here of the 'err' text geting caught in the tbpl log
> parsing and reporting an error.  I don't recall any bugs on file in recent
> times where we have had this in tegra/panda automation, so this might be ok
> for now.

The other code which prints err qualifies it with if self.debug >=4:, that might explain why you haven't seen it in production. I'll do that as well.
(Assignee)

Comment 3

5 years ago
https://github.com/mozilla/mozbase/commit/7b9acf714ce7aa6611ae8df4b0bb751570347a14 with debug change.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.