Bug 212978 - Use nonexistent.127.0.0.1 instead of nonexistent.localhost in our copy of wpt xhr tests
Summary: Use nonexistent.127.0.0.1 instead of nonexistent.localhost in our copy of wpt...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-09 11:04 PDT by Alex Christensen
Modified: 2020-06-09 13:43 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.64 KB, patch)
2020-06-09 11:07 PDT, Alex Christensen
ap: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2020-06-09 11:04:39 PDT
Use nonexistent.127.0.0.1 instead of nonexistent.localhost in our copy of wpt xhr tests
Comment 1 Alex Christensen 2020-06-09 11:07:18 PDT
Created attachment 401453 [details]
Patch
Comment 2 EWS Watchlist 2020-06-09 11:07:55 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 3 Darin Adler 2020-06-09 11:56:10 PDT
Comment on attachment 401453 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401453&action=review

> LayoutTests/imported/w3c/ChangeLog:3
> +        Use nonexistent.127.0.0.1 instead of nonexistent.localhost in our copy of wpt xhr tests

Why the "127.0.0.1" bit? This is not being treated as an IP address, so it seems that "nonexistent.0" would also work just as well, no?
Comment 4 Alex Christensen 2020-06-09 11:57:17 PDT
It would, but this makes it closer to what exists in the upstream repo, and easier to see the intent of this fake host.
Comment 5 Alexey Proskuryakov 2020-06-09 11:57:46 PDT
Comment on attachment 401453 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=401453&action=review

> LayoutTests/imported/w3c/ChangeLog:10
> +        We have some bots where a connection to nonexistent.localhost times out instead of fails.
> +        To cover this up, use a domain that will actually fail.

The tests still won't work as designed, because nonexistent.127.0.0.1 doesn't resolve to loopback on macOS.

I think that WPT tests are written with this expired draft in mind <https://tools.ietf.org/html/draft-west-let-localhost-be-localhost>, and work on platforms where localhost subdomains resolve to loopback. This patch will break that, because nonexistent.127.0.0.1 isn't supposed to work this way.
Comment 6 Alexey Proskuryakov 2020-06-09 11:59:32 PDT
I think that skipping these tests would be OK, even though they found something semi-relevant for us in <rdar://problem/63684261>.
Comment 7 Alex Christensen 2020-06-09 12:00:55 PDT
The intent of these tests is to check what happens when an XHR fails.  This keeps that.  Skipping these tests would just reduce test coverage.
Comment 8 Alexey Proskuryakov 2020-06-09 13:04:52 PDT
But the intent is certainly not that they are blocked as "external URL" by our script machinery.