Add a test to ensure loopback host names cannot be overridden
Categories
(Core :: Networking: DNS, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: fredw, Assigned: fredw)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by rmaries@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6e7c2bd7d2f7 Add a test to ensure loopback host names cannot be overridden, r=valentin,necko-reviewers
Comment 3•4 years ago
|
||
Backed out for failures on test_dns_override_for_localhost.js
backout: https://hg.mozilla.org/integration/autoland/rev/034317140549d9021ec0017ae5bf401aaa9a53b1
push with tier 1 failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=6de570466e661b7ce1b61c81587b5c5ae9506765&test_paths=netwerk%2Ftest%2Funit%2Fxpcshell.ini&selectedTaskRun=WVx5x_DaRgOsRA_WRo7T4Q.0
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=319894261&repo=autoland&lineNumber=4635
[task 2020-10-27T17:45:51.547Z] 17:45:51 INFO - TEST-START | netwerk/test/unit/test_dns_override_for_localhost.js
[task 2020-10-27T17:45:51.719Z] 17:45:51 WARNING - TEST-UNEXPECTED-FAIL | netwerk/test/unit/test_dns_override_for_localhost.js | xpcshell return code: 0
[task 2020-10-27T17:45:51.719Z] 17:45:51 INFO - TEST-INFO took 173ms
[task 2020-10-27T17:45:51.719Z] 17:45:51 INFO - >>>>>>>
[task 2020-10-27T17:45:51.719Z] 17:45:51 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2020-10-27T17:45:51.719Z] 17:45:51 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2020-10-27T17:45:51.719Z] 17:45:51 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2020-10-27T17:45:51.719Z] 17:45:51 INFO - running event loop
[task 2020-10-27T17:45:51.719Z] 17:45:51 INFO - netwerk/test/unit/test_dns_override_for_localhost.js | Starting test_
[task 2020-10-27T17:45:51.720Z] 17:45:51 INFO - (xpcshell/head.js) | test test_ pending (2)
[task 2020-10-27T17:45:51.720Z] 17:45:51 INFO - (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2020-10-27T17:45:51.720Z] 17:45:51 WARNING - TEST-UNEXPECTED-FAIL | netwerk/test/unit/test_dns_override_for_localhost.js | test_ - [test_ : 63] localhost is not overridden - ["127.0.0.1"] deepEqual ["127.0.0.1","::1"]
[task 2020-10-27T17:45:51.720Z] 17:45:51 INFO - Z:/task_1603819874/build/tests/xpcshell/tests/netwerk/test/unit/test_dns_override_for_localhost.js:test_:63
[task 2020-10-27T17:45:51.720Z] 17:45:51 INFO - Z:\task_1603819874\build\tests\xpcshell\head.js:_do_main:248
[task 2020-10-27T17:45:51.720Z] 17:45:51 INFO - Z:\task_1603819874\build\tests\xpcshell\head.js:_execute_test:577
[task 2020-10-27T17:45:51.720Z] 17:45:51 INFO - -e:null:1
[task 2020-10-27T17:45:51.720Z] 17:45:51 INFO - exiting test
Assignee | ||
Comment 4•4 years ago
|
||
(In reply to Natalia Csoregi [:nataliaCs] from comment #3)
[task 2020-10-27T17:45:51.720Z] 17:45:51 WARNING - TEST-UNEXPECTED-FAIL | netwerk/test/unit/test_dns_override_for_localhost.js | test_ - [test_ : 63] localhost is not overridden - ["127.0.0.1"] deepEqual ["127.0.0.1","::1"]
So it looks like windows only resolve to IPv4 loopback, not IPv6.
@valentin Do you have idea why? Should I try to relax the test equality? Or instead add specific failure expectation on Windows?
It seems the problem stems from here:
https://searchfox.org/mozilla-central/rev/c409dd9235c133ab41eba635f906aa16e050c197/testing/xpcshell/head.js#128
Not exactly sure why that is.
I guess you can just set the pref to "" at the start of the test for now.
Could you also do a try push removing that line from head.js to see what fails? It's not clear to me why that happens. Maybe we can fix it in a followup bug.
Assignee | ||
Comment 6•4 years ago
|
||
(In reply to Valentin Gosu [:valentin] (he/him) from comment #5)
It seems the problem stems from here:
https://searchfox.org/mozilla-central/rev/c409dd9235c133ab41eba635f906aa16e050c197/testing/xpcshell/head.js#128
Not exactly sure why that is.
Could you also do a try push removing that line from head.js to see what fails? It's not clear to me why that happens. Maybe we can fix it in a followup bug.
This seems quite old code. I pushed this: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b23ff519ac9de21557f31d6216ec5532b0228507
I guess you can just set the pref to "" at the start of the test for now.
OK, I'll try that. Thanks!
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cef3f7c75bc0 Add a test to ensure loopback host names cannot be overridden, r=valentin,necko-reviewers
Comment 8•4 years ago
|
||
bugherder |
Description
•