Closed Bug 1425471 Opened 7 years ago Closed 6 years ago

Marionette tests fail on Android 7: /system/bin/sh: /system/bin/netcfg: not found

Categories

(Firefox for Android Graveyard :: Testing, defect, P1)

defect

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file)

It looks like netcfg was replaced with ifconfig in Android 6: https://github.com/bbc/device_api-android/issues/92 https://stackoverflow.com/questions/36294085/how-to-debug-android-6-0-over-wi-fi-netcfg-issue Only Marionette seems to rely on this: https://treeherder.mozilla.org/logviewer.html#?job_id=151817064&repo=try [task 2017-12-15T16:15:20.832Z] 16:15:20 INFO - /system/bin/sh: /system/bin/netcfg: not found [task 2017-12-15T16:15:21.975Z] 16:15:21 INFO - /system/bin/sh: /system/bin/netcfg: not found [task 2017-12-15T16:15:23.111Z] 16:15:23 INFO - /system/bin/sh: /system/bin/netcfg: not found [task 2017-12-15T16:15:24.241Z] 16:15:24 INFO - /system/bin/sh: /system/bin/netcfg: not found [task 2017-12-15T16:15:25.257Z] 16:15:25 INFO - {"thread": "MainThread", "level": "ERROR", "pid": 1103, "source": "Marionette test runner", "time": 1513354525256, "action": "log", "message": "Failure during harness execution", "stack": "Traceback (most recent call last):\n\n File \"/builds/worker/workspace/build/tests/marionette/harness/marionette_harness/runtests.py\", line 92, in cli\n failed = harness_instance.run()\n\n File \"/builds/worker/workspace/build/tests/marionette/harness/marionette_harness/runtests.py\", line 72, in run\n runner.run_tests(tests)\n\n File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_harness/runner/base.py\", line 852, in run_tests\n self.marionette = self.driverclass(**self._build_kwargs())\n\n File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py\", line 621, in __init__\n self.start_binary(self.startup_timeout)\n\n File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py\", line 632, in start_binary\n self.instance.start()\n\n File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/geckoinstance.py\", line 351, in start\n self.runner.start()\n\n File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/mozrunner/base/device.py\", line 80, in start\n raise Exception(\"Network did not come up when starting device\")\n\nException: Error possibly due to runner or device args: Network did not come up when starting device\n"} I wonder if this is even necessary now.
$ ./mach android-emulator --version 4.3 ... $ adb shell /system/bin/netcfg sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00 eth0 UP 10.0.2.15/24 0x00001043 52:54:00:12:34:56 lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00 $ ./mach android-emulator --version 7.0 ... $ adb shell /system/bin/netcfg /system/bin/sh: /system/bin/netcfg: not found $ adb shell /system/bin/ifconfig eth0 Link encap:UNSPEC inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::5054:ff:fe12:3456/64 Scope: Link inet6 addr: fec0::5054:ff:fe12:3456/64 Scope: Site UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:32 errors:0 dropped:0 overruns:0 frame:0 TX packets:31 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7522 TX bytes:2808 lo Link encap:UNSPEC inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope: Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:248 TX bytes:248
Priority: -- → P1
I wonder if wait_for_net() is really needed at all, but I assume it was added for a good reason. Here I substitute "can we determine the device's ip address?" for "is the network up?"; I think that's reasonable. This allows Mn to run on Android 7 and doesn't break the Android 4.3 tests: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6b9aa141779a0ce82dca91ee863fb8217eb30348
Attachment #8987933 - Flags: review?(bob)
Comment on attachment 8987933 [details] [diff] [review] use ADBDevice's get_ip_address() instead Review of attachment 8987933 [details] [diff] [review]: ----------------------------------------------------------------- r+ lgtm.
Attachment #8987933 - Flags: review?(bob) → review+
Pushed by gbrown@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b077d4c0a0d8 Avoid use of netcfg in Android marionette tests; r=bc
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: