Autophone - Unit tests are failing due to rooting issues with devicemanagerSUT

RESOLVED FIXED

Status

Testing
Autophone
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: bc, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
bug 1148421 details how devices which do not have su installed but are running adbd as root are not supported by the current devicemanagerSUT. This causes the Autophone unit tests on nexus-4-jdq39-{3,4} to fail with:

0 ERROR Automation Error: Exception caught while running tests
Traceback (most recent call last):
  File "mochitest/runtestsremote.py", line 973, in main
    dm.recordLogcat()
  File ".../tests/mochitest/devicemanager.py", line 147, in recordLogcat
    self.shellCheckOutput(['/system/bin/logcat', '-c'], root=self._logcatNeedsRoot)
  File ".../tests/mochitest/devicemanager.py", line 393, in shellCheckOutput
    retval = self.shell(cmd, buf, env=env, cwd=cwd, timeout=timeout, root=root)
  File ".../tests/mochitest/devicemanagerSUT.py", line 351, in shell
    raise DMError("Automation Error: Error finding end of line/return value when running '%s'" % cmdline)
DMError: Automation Error: Error finding end of line/return value when running '/system/bin/logcat -c'

I have temporarily disabled the unit tests until devicemanagerSUT is fixed.
(Reporter)

Comment 1

3 years ago
It appears that unless we use su of some form, the commands issued by the sutagent will be executed with the user id of the sutagent regardless of whether adbd runs as root.

nexus-4-jdq39-3, nexus-4-jdq39-4 do not have su though they are all running adbd as root. I was able to grab the su/Superuser.apk from nexus-4-jdq39-1 and install it on nexus-4-jdq39-{3,4} and it appears to be working.

nexus-5-kot49h-3 does not have su but I can't remount system rw and can't install su/Superuser.apk from nexus-5-kot49h-1. :-(

I've re-enabled the unit tests on:

nexus-4-jdq39-3 = try mozilla-central fx-team b2g-inbound 
nexus-4-jdq39-4 = mozilla-beta mozilla-aurora mozilla-release
nexus-7-jss15q-2 = try mozilla-central fx-team b2g-inbound mozilla-beta mozilla-aurora mozilla-release
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.