RFR: 8285915: failure_handler: gather the contents of /etc/hosts file

Jaikiran Pai jpai at openjdk.java.net
Mon May 2 06:25:33 UTC 2022


On Fri, 29 Apr 2022 11:28:32 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Can I please get a review of this change which addresses https://bugs.openjdk.java.net/browse/JDK-8285915?
> 
> With this change, the environment details collected by the failure handler will now include the contents of the `/etc/hosts/` file, which can be useful in certain cases when debugging network tests that fail.
> 
> Testing done (on macOS):
> 
> 
> cd test/failure_handler 
> make test
> 
> Then verified that the generated environment.html had the `/etc/hosts` file content

Hello Erik, I've updated the PR to include capturing the contents of hosts file even on Windows. I've tested this against an internal Windows system where it correct shows the content:


----------------------------------------
[2022-05-02 06:08:52] [C:\cygwin\bin\bash.exe, -c, cat $WINDIR/System32/drivers/etc/hosts] timeout=20000
----------------------------------------
# ....

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
----------------------------------------
[2022-05-02 06:08:52] exit code: 0 time: 57 ms
----------------------------------------

-------------

PR: https://git.openjdk.java.net/jdk/pull/8466



More information about the build-dev mailing list