Running a mochitest on Android x86 emulator with no internet connection crashes with MOZ_CRASH(Attempting to connect to non-local address!)
Categories
(Testing :: General, defect, P3)
Tracking
(Not tracked)
People
(Reporter: botond, Unassigned)
Details
(Whiteboard: dev-prod-2020)
Steps to reproduce
- Do an Android x86 build and install it on the emulator
- Disable internet connection
- Try to run a mochitest, e.g.
./mach mochitest gfx/layers/apz/test/mochitest/test_group_zoom.html.
Expected results
The mochitest runs, even in the absence of an internet connection.
Actual results
The test run crashes, with the following appearing in the logcat:
F MOZ_CRASH: Hit MOZ_CRASH(Attempting to connect to non-local address!) at /home/botond/dev/projects/mozilla/refactoring/netwerk/base/nsSocketTransport2.cpp:1285
Comment 1•6 years ago
|
||
Android mochitest serves mochitest content from httpd.js running on the desktop host. The remote mochitest profile includes network proxies which redirect test addresses like mochi.test to the network address of the desktop host. I find the non-local address exception curious, but if that was avoided, tests would still fail without a network connection between the emulator and the host.
| Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #1)
I find the non-local address exception curious, but if that was avoided, tests would still fail without a network connection between the emulator and the host.
But a network connection between the emulator and the host doesn't require internet access, right?
Comment 3•6 years ago
|
||
Oh, right! The emulator can see the host with the special 10.0.2.2 address. So you can run
mach mochitest <test> --remote-webserver=10.0.2.2
even with no internet connection. That works for me.
| Reporter | ||
Comment 4•6 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #3)
Oh, right! The emulator can see the host with the special 10.0.2.2 address. So you can run
mach mochitest <test> --remote-webserver=10.0.2.2
even with no internet connection. That works for me.
I can confirm that this works, thanks!
So, I guess the request in this bug report would be to make it "just work" without requiring this extra argument. (And accordingly this is now a lower priority request.)
Updated•5 years ago
|
Updated•5 years ago
|
Description
•