Last Comment Bug 803177 - Issue with killProcess on devicemanagerADB
: Issue with killProcess on devicemanagerADB
Status: RESOLVED FIXED
:
Product: Testing
Classification: Components
Component: Mozbase (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: William Lachance (:wlach)
: Henrik Skupin (:whimboo)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-18 10:27 PDT by William Lachance (:wlach)
Modified: 2012-10-18 11:05 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix dmADB's version of killApp (918 bytes, patch)
2012-10-18 10:31 PDT, William Lachance (:wlach)
jmaher: review+
Details | Diff | Splinter Review

Description William Lachance (:wlach) 2012-10-18 10:27:07 PDT
We're seeing an error with dmADB's version of killProcess:

(mozbase)wlach@eideticker:~/src/eideticker$ dm killapp com.mozilla.SUTAgentAndroid
Android Debug Bridge version 1.0.29

Traceback (most recent call last):
  File "/home/wlach/src/mozbase/bin/dm", line 9, in <module>
    load_entry_point('mozdevice==0.11', 'console_scripts', 'dm')()
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/dmcli.py", line 247, in cli
    cli = DMCli(args)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/dmcli.py", line 127, in __init__
    command['function'](*command_args)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/dmcli.py", line 212, in killapp
    self.dm.killProcess(appname)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/devicemanagerADB.py", line 400, in killProcess
    p = self._runCmdAs(args)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/devicemanagerADB.py", line 732, in _runCmdAs
    return self._runCmd(args)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/devicemanagerADB.py", line 720, in _runCmd
    return subprocess.Popen(finalArgs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings


After bug 799507, the pid needs to be passed as a string argument. I think I actually fixed this earlier but forgot to include it as part of the patch.
Comment 1 William Lachance (:wlach) 2012-10-18 10:31:03 PDT
Created attachment 672845 [details] [diff] [review]
Fix dmADB's version of killApp

This fixes the problem for me.

Based on :gcp's earlier report, it looks like this is causing problems for (at least) mochitest robotium over adb.
Comment 2 Joel Maher ( :jmaher) 2012-10-18 10:36:54 PDT
Comment on attachment 672845 [details] [diff] [review]
Fix dmADB's version of killApp

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

simple.
Comment 3 William Lachance (:wlach) 2012-10-18 11:05:17 PDT
Pushed: https://github.com/mozilla/mozbase/commit/94e9a49155de4a03467a5d68fc5cfec03953bb06

(this will take effect the next time mozbase is merged to m-i, probably early next week)

Note You need to log in before you can comment on or make changes to this bug.