Closed Bug 1080761 Opened 10 years ago Closed 10 years ago

`mach robocop <test>` fails on Nexus 4

Categories

(Firefox for Android Graveyard :: Testing, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 36

People

(Reporter: mcomella, Assigned: wlach)

References

Details

Attachments

(2 files)

Attached file Error output
Error output is attached. In particular:

  File "/home/mcomella/dev/moz/obj-android/_tests/testing/mochitest/devicemanagerADB.py", line 660, in _checkForRoot
    data = proc.output[0]

Earlier in the file [1]:

proc = self._runCmd(["shell", "su", "-c", "id"])

Running this on my N7 (where the command works):

<prompt> adb shell su -c id
/system/bin/sh: su: not found
<prompt>

Running this on my N4 (where the command fails):

<prompt> adb shell su -c id
<prompt>

I see why the exception occurs, but I'm amazed I haven't hit it sooner (though I've been doing most of my testing on the N7 these days).

[1]: https://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py?rev=bf4de5f37e5b#649
wlach: it looks like your change http://hg.mozilla.org/mozilla-central/rev/c809edd9b1c3 is busting mcomella.  Can we get some explanation of what you were trying to do?  Perhaps we need to guard against some failure case that doesn't return a tuple?
Flags: needinfo?(wlachance)
(In reply to Nick Alexander :nalexander from comment #1)
> wlach: it looks like your change
> http://hg.mozilla.org/mozilla-central/rev/c809edd9b1c3 is busting mcomella. 
> Can we get some explanation of what you were trying to do?  Perhaps we need
> to guard against some failure case that doesn't return a tuple?

proc.output is actually a list of lines of output returned by the processhandler. It looks like in this case, we have no lines, so we're getting an error. We should guard for this condition, I'll do up a patch.
Flags: needinfo?(wlachance)
This patch handles blank/null responses when executing root checking on Android. Basically yet another followup to bug 1026710.

Try run (b2g tests are the only thing that use dmADB in production):

https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=d460667a3327
Assignee: nobody → wlachance
Attachment #8502763 - Flags: review?(armenzg)
Attachment #8502763 - Flags: review?(armenzg) → review+
Ok, that try-run didn't work because of infrastructure issues but I tested locally and the initialization parts / error handling seem to work fine:

>>> import mozdevice
>>> dm = mozdevice.DeviceManagerADB()
>>> dm.listFiles('/mnt/sdcard/')
['Alarms', 'Android', 'DCIM', 'Download', 'EditedOnlinePhotos', 'Expensify', 'Movies', 'Music', 'Notifications', 'Pictures', 'Podcasts', 'Ringtones', 'Temp', 'amazon', 'com.facebook.orca', 'kindle', 'media', 'obb', 'tests']

If this causes breakage in the tree I'll eat my shirt.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/92a91ac105d1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 36
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.