gecko-dev/netwerk/test
Valentin Gosu b9501927ed Bug 1616252 - Exclude domains in /etc/hosts from using TRR r=necko-reviewers,dragana
This patch adds a task that is dispatched to the background thread when TRR
is first enabled. This may mean during the TRRService initialization at
startup or later when the pref is flipped.

The task will call into rust_parse_etc_hosts which does the actual file
opening and parsing. We pass the path to the file, that being either
/etc/hosts or the Windows equivalent obtained by calling
SHGetSpecialFolderPathA.

The rust code opens the file and proceeds to read it line by line while
accumulating all the hostnames in an array. Since these files can be
quite large, on the order of several megabytes, we need to make sure we
don't block shutdown doing this - so once more than 100 domains have
accumulated in the array we call back into C++ code to add them to the
exclusion list. The callback will return true if we should continue to
parse the file or false otherwise.

We also change the tests to use "excluded" rather than localhost when
testing the excluded-domains prefs, since localhost is unually present
in /etc/hosts and may interfere with the test.

We also use an atomic sTRRServicePtr to make sure that we don't have
a data race between the TRRService being freed and the callbacks of the
parsing.

Differential Revision: https://phabricator.services.mozilla.com/D90663
2020-10-01 07:01:58 +00:00
..
browser Bug 1658563 - Support .lnk files in file: protocol r=necko-reviewers,dragana 2020-09-22 07:26:33 +00:00
crashtests Bug 1620679 - Use web progress listener for detecting load end in reftest-content.js. r=kmag,tnikkel 2020-05-30 17:19:54 +00:00
fuzz Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
gtest Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
http3server Bug 1668019 - Update neqo to version 0.4.12 r=necko-reviewers,valentin 2020-09-30 10:51:34 +00:00
http3serverDB Bug 1587353 - Add http3 tests r=valentin 2020-03-25 13:36:00 +00:00
httpserver Bug 1662855: Remove defunct httpd.manifest file. r=mccr8,necko-reviewers,valentin 2020-09-17 03:15:11 +00:00
mochitests Backed out changeset f12c895fc5e7 (bug 1605305) for causing bustage on nsHttpChannel.cpp on mc. CLOSED TREE 2020-09-25 09:58:22 +03:00
perf Bug 1662706 - add a fuzzy runner r=sparky,necko-reviewers,rstewart 2020-09-11 08:13:27 +00:00
reftest
unit Bug 1616252 - Exclude domains in /etc/hosts from using TRR r=necko-reviewers,dragana 2020-10-01 07:01:58 +00:00
unit_ipc Backed out changeset 0b7c8f6349b1 (bug 1667743) on request from kershaw for causing bug 1667801 2020-09-30 13:12:53 +02:00
moz.build Bug 1662706 - add a fuzzy runner r=sparky,necko-reviewers,rstewart 2020-09-11 08:13:27 +00:00