Open Bug 1560213 Opened 6 years ago Updated 5 years ago

"get_ip()" fails on MacOS without any network available with: "NetworkError: Unable to obtain network address"

Categories

(Testing :: Mozbase, defect, P3)

All
macOS
defect

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

Details

With Wifi turned off and no network cable attached, I can see the following failure in moznetwork, and not returning me the 127.0.0.1 IP but fails instead:

NetworkError: Unable to obtain network address

File "/Users/henrik/code/gecko/testing/web-platform/mach_commands.py", line 307, in run_wpt
return self.run_web_platform_tests(**params)
File "/Users/henrik/code/gecko/testing/web-platform/mach_commands.py", line 299, in run_web_platform_tests
return wpt_runner.run(logger, **params)
File "/Users/henrik/code/gecko/testing/web-platform/mach_commands_base.py", line 40, in run
result = wptrunner.start(**kwargs)
File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py", line 343, in start
return not run_tests(**kwargs)
File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py", line 139, in run_tests
product = products.load_product(config, product, load_cls=True)
File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/products.py", line 53, in load_product
rv = Product(config, product)
File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/products.py", line 40, in init
self.env_options = getattr(module, data["env_options"])()
File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/fennec.py", line 84, in env_options
return {"server_host": moznetwork.get_ip(),
File "/Users/henrik/code/gecko/testing/mozbase/moznetwork/moznetwork/moznetwork.py", line 148, in get_ip
raise NetworkError('Unable to obtain network address')

The priority flag is not set for this bug.
:gbrown, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gbrown)
Flags: needinfo?(gbrown)
Priority: -- → P3

Isn't this expected? After all there is no network and no ip address and NetworkError('Unable to obtain network address') seems appropriate.

Oh, I see you want 127.0.0.1 if no external network is available.

Exactly, and which is the default behavior for Linux.

OS: Unspecified → macOS
Hardware: Unspecified → All
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.