Closed
Bug 1425163
Opened 7 years ago
Closed 7 years ago
devicemanagerADB getInfo('memtotal') fails on some devices (Android 7.0 emulator)
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(firefox59 fixed)
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: gbrown, Assigned: gbrown)
References
Details
Attachments
(1 file)
1.44 KB,
patch
|
bc
:
review+
|
Details | Diff | Splinter Review |
With 'mach android-emulator --version 7.0', I find all tests fail on devicemanager's getInfo(). Apparently it fails to retrieve /proc/meminfo.
https://treeherder.mozilla.org/logviewer.html#?job_id=151512739&repo=try&lineNumber=1761
[task 2017-12-13T20:41:26.819Z] 20:41:26 INFO - Device info:
[task 2017-12-13T20:41:28.117Z] 20:41:28 INFO - Traceback (most recent call last):
[task 2017-12-13T20:41:28.117Z] 20:41:28 INFO - File "/builds/worker/workspace/build/tests/mochitest/runtestsremote.py", line 400, in <module>
[task 2017-12-13T20:41:28.117Z] 20:41:28 INFO - sys.exit(main())
[task 2017-12-13T20:41:28.117Z] 20:41:28 INFO - File "/builds/worker/workspace/build/tests/mochitest/runtestsremote.py", line 396, in main
[task 2017-12-13T20:41:28.118Z] 20:41:28 INFO - return run_test_harness(parser, options)
[task 2017-12-13T20:41:28.118Z] 20:41:28 INFO - File "/builds/worker/workspace/build/tests/mochitest/runtestsremote.py", line 348, in run_test_harness
[task 2017-12-13T20:41:28.118Z] 20:41:28 INFO - mochitest.printDeviceInfo()
[task 2017-12-13T20:41:28.119Z] 20:41:28 INFO - File "/builds/worker/workspace/build/tests/mochitest/runtestsremote.py", line 254, in printDeviceInfo
[task 2017-12-13T20:41:28.119Z] 20:41:28 INFO - devinfo = self._dm.getInfo()
[task 2017-12-13T20:41:28.119Z] 20:41:28 INFO - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/mozdevice/devicemanagerADB.py", line 650, in getInfo
[task 2017-12-13T20:41:28.119Z] 20:41:28 INFO - ret["memtotal"] = meminfo["MemTotal"]
[task 2017-12-13T20:41:28.119Z] 20:41:28 INFO - KeyError: 'MemTotal'
[task 2017-12-13T20:41:28.130Z] 20:41:28 ERROR - Return code: 1
[task 2017-12-13T20:41:28.130Z] 20:41:28 ERROR - No tests run or test summary not found
Assignee | ||
Comment 1•7 years ago
|
||
In local testing, I see:
gbrown@mozpad:~/src$ adb shell cat /proc/meminfo
MemTotal: 2059124 kB
MemFree: 1255312 kB
Buffers: 6884 kB
Cached: 520924 kB
SwapCached: 0 kB
Active: 303616 kB
Inactive: 440684 kB
Active(anon): 222952 kB
Inactive(anon): 1128 kB
Active(file): 80664 kB
Inactive(file): 439556 kB
Unevictable: 256 kB
Mlocked: 256 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 216788 kB
Mapped: 244204 kB
Shmem: 7604 kB
Slab: 24604 kB
SReclaimable: 9956 kB
SUnreclaim: 14648 kB
KernelStack: 7696 kB
PageTables: 11280 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1029560 kB
Committed_AS: 17600724 kB
VmallocTotal: 251658176 kB
VmallocUsed: 36340 kB
VmallocChunk: 251611588 kB
gbrown@mozpad:~/src$ adb pull /proc/meminfo xx
adb: error: remote object '/proc/meminfo' does not exist
Assignee | ||
Comment 2•7 years ago
|
||
The core of this fix is switching from 'adb pull /proc/meminfo' to 'adb shell cat /proc/meminfo' to retrieve memory data.
I've also tried to make this more tolerant to unexpected data formats (if MemTotal is not found or some line in meminfo is not in an expected format, I'd prefer to simply not return any memory info, rather than raising an error and breaking tests).
https://treeherder.mozilla.org/#/jobs?repo=try&revision=09971cba1f0f723198f66f59242358210c248239
Attachment #8936727 -
Flags: review?(bob)
Comment 3•7 years ago
|
||
Comment on attachment 8936727 [details] [diff] [review]
use 'cat /proc/meminfo'
Review of attachment 8936727 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm. r+
Attachment #8936727 -
Flags: review?(bob) → review+
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/41d8dd58a696
Use cat /proc/meminfo rather than trying to pull it from device; r=bc
Comment 5•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•