Bug 219198 - [GTK] [WPE] Add entries on the bots' /etc/hosts file for testing purpose
Summary: [GTK] [WPE] Add entries on the bots' /etc/hosts file for testing purpose
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 219257
Blocks: 127676
  Show dependency treegraph
 
Reported: 2020-11-20 03:20 PST by Frédéric Wang (:fredw)
Modified: 2022-09-09 09:48 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2020-11-20 03:20:54 PST
This can be a preliminary step for bug 127676.

It would also allow to rewrite our GTK API test for WebKitInsecureContentEvent without relying on "localhost" and "127.0.0.1" (which are supposed not to be treated as mixed content, see bug 171934).

Unfortunately Philippe mentioned that /etc/hosts in the flatpak sandbox is readonly.

Opening this to track the issue and discuss ideas on how to address it.
Comment 1 Michael Catanzaro 2020-11-20 05:55:21 PST
Suggestion: you can write a GResolver that wraps the default GResolver and just specially resolves some extra host. Compile it into a shared object and have the run-[gtk,wpe]-tests scripts set GIO_EXTRA_MODULES to point to it. Then you won't wind up with a test that breaks when not run on a specially-configured bot.
Comment 2 Michael Catanzaro 2021-01-22 07:15:04 PST
(In reply to Michael Catanzaro from comment #1)
> Suggestion: you can write a GResolver that wraps the default GResolver and
> just specially resolves some extra host. Compile it into a shared object and
> have the run-[gtk,wpe]-tests scripts set GIO_EXTRA_MODULES to point to it.
> Then you won't wind up with a test that breaks when not run on a
> specially-configured bot.

Yeah this seems like a much better approach. It's not *too* complicated, and otherwise the affected tests will never pass when not run on bots. Surely we don't want to tell devs to edit their /etc/hosts.
Comment 3 Patrick Griffis 2022-09-09 09:48:47 PDT
Fixed by bug 243428. It now exposes a generic way to add domains for testing.