Closed Bug 796863 Opened 12 years ago Closed 12 years ago

*-remote test targets stopped working within the last few days

Categories

(Testing :: Mozbase, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cjones, Assigned: wlach)

References

Details

Attachments

(2 files)

For reftests I see $ TEST_PATH="layout/reftests/reftest-sanity/reftest.list" MOZ_HOST_BIN="/home/cjones/mozilla/new-b2g/gaia/xulrunner-sdk/bin" make -C ../ima-opt reftest-remote make: Entering directory `/home/cjones/mozilla/ima-opt' ln: failed to create symbolic link `_tests/reftest/tests/inbound': File exists Android Debug Bridge version 1.0.29 ln: failed to create symbolic link `/home/cjones/mozilla/ima-opt/_tests/reftest/jsreftest': File exists 'cp' not found, but 'dd' was found as a replacement args: ['/home/cjones/mozilla/new-b2g/gaia/xulrunner-sdk/bin/xpcshell', '-g', '/home/cjones/mozilla/new-b2g/gaia/xulrunner-sdk/bin', '-v', '170', '-f', '/home/cjones/mozilla/ima-opt/_tests/reftest/reftest/components/httpd.js', '-e', "const _PROFILE_PATH = '/tmp/tmp1giwId';const _SERVER_PORT = '8888'; const _SERVER_ADDR ='192.168.1.64';", '-f', '/home/cjones/mozilla/ima-opt/_tests/reftest/server.js'] INFO | remotereftests.py | Server pid: 12153 {} {} TEST-UNEXPECTED-FAIL | | exception while running reftests /bin/sh: 8: @errors=TEST-UNEXPECTED-FAIL: not found (no error that lets me see what went wrong.) For mochitests I see $ TEST_PATH="docshell/test" MOZ_HOST_BIN="/home/cjones/mozilla/new-b2g/gaia/xulrunner-sdk/bin" make -C ../ima-opt mochitest-remote make: Entering directory `/home/cjones/mozilla/ima-opt' Android Debug Bridge version 1.0.29 'cp' not found, but 'dd' was found as a replacement {} {} TEST-UNEXPECTED-FAIL | Shell command '/system/bin/logcat -c' requested to run as root but root is not available on this device. Root your device or refactor the test/harness to not require root. | Exception caught while running tests. Traceback (most recent call last): File "_tests/testing/mochitest/runtestsremote.py", line 497, in <module> main() File "_tests/testing/mochitest/runtestsremote.py", line 484, in main mochitest.stopWebServer(options) File "_tests/testing/mochitest/runtestsremote.py", line 278, in stopWebServer self.server.stop() AttributeError: 'MochiRemote' object has no attribute 'server' make: *** [mochitest-remote] Error 1 make: Leaving directory `/home/cjones/mozilla/ima-opt' Maybe this is the same error as for reftests, but the exception is being slurped up somewhere? This is a device I'd rather not root (and didn't have to previously).
Ah yes, I was meaning to do something about this. Since the adb process runs as a privileged user on Android, we should be able to run certain commands (case in point: logcat) even though we're an unprivileged user. Pretty easy patch, should be able to cook something up today.
Assignee: nobody → wlachance
Trying to do the minimum possible to get something working here. So tempted to try and improve this interface at the same time, but the priority should probably be fixing this issue. :)
Attachment #667024 - Flags: review?(gbrown)
Comment on attachment 667024 [details] [diff] [review] Don't require root to get logcat with dmADB Review of attachment 667024 [details] [diff] [review]: ----------------------------------------------------------------- Did you verify that sut logcat requires su? ::: mozdevice/mozdevice/devicemanagerADB.py @@ +769,5 @@ > + # this does not require root privileges with ADB > + try: > + self.shellCheckOutput(['/system/bin/logcat', '-c']) > + except DMError: > + # to preserve compat with parent method, just ignore exceptions couldn't you at least print the DMError?
Attachment #667024 - Flags: review?(gbrown) → review+
Hmm, for some reason I thought we did need root to run logcat but at least on my phone I don't. Going to try testing a smaller change which just takes out the root=True to logcat calls: https://tbpl.mozilla.org/?tree=Try&rev=4459f33cdc47 Asking for review pre-emptively in case that turns out to be true. Simpler is always better.
Attachment #667076 - Flags: review?(gbrown)
Comment on attachment 667076 [details] [diff] [review] Smaller patch which just removes root requirement from logcat shell command Review of attachment 667076 [details] [diff] [review]: ----------------------------------------------------------------- LGTM...I'll leave it you to verify that it doesn't cause trouble!
Attachment #667076 - Flags: review?(gbrown) → review+
(In reply to William Lachance (:wlach) from comment #4) > Created attachment 667076 [details] [diff] [review] > Smaller patch which just removes root requirement from logcat shell command > > Hmm, for some reason I thought we did need root to run logcat but at least > on my phone I don't. > > Going to try testing a smaller change which just takes out the root=True to > logcat calls: > > https://tbpl.mozilla.org/?tree=Try&rev=4459f33cdc47 > > Asking for review pre-emptively in case that turns out to be true. Simpler > is always better. Ok this is a big failure. I guess logcat requires su on the tegras. Falling back to the previous idea.
Pushed: https://github.com/mozilla/mozbase/commits/master Jeff: If you could do another mozbase merge into m-c to get this change delivered, it would be much appreciated! As things stand, it's not possible to run mochitest or reftest locally for mobile.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee: wlachance → nobody
Component: General → Mozbase
Assignee: nobody → wlachance
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: