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

Jaikiran Pai jpai at openjdk.java.net
Fri Apr 29 12:54:42 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,

> Not sure if it's relevant, but did you consider doing this for Windows as well? The file is located at `"$WINDIR/System32/drivers/etc/hosts"`.

I hadn't investigated what the corresponding command would be for Windows, so had left it out. Quick question - the path you note, is that even applicable for x64? I see that it has a "System32" so just curious. I'll experiment a bit shortly against some CI setups to see how this goes on Windows.

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

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


More information about the core-libs-dev mailing list