Re: RFR: 8285915: failure_handler: gather the contents of /etc/hosts file [v2]

2022-05-02 Thread Jaikiran Pai
On Mon, 2 May 2022 06:25:28 GMT, Jaikiran Pai  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
>
> Jaikiran Pai has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   print contents of hosts file in windows failure handler

Thank you Erik and Daniel for the reviews.

-

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


Re: RFR: 8285915: failure_handler: gather the contents of /etc/hosts file [v2]

2022-05-02 Thread Erik Joelsson
On Mon, 2 May 2022 06:25:28 GMT, Jaikiran Pai  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
>
> Jaikiran Pai has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   print contents of hosts file in windows failure handler

Marked as reviewed by erikj (Reviewer).

-

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


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

2022-05-02 Thread Jaikiran Pai
On Fri, 29 Apr 2022 11:28:32 GMT, Jaikiran Pai  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=2

# 

# 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


Re: RFR: 8285915: failure_handler: gather the contents of /etc/hosts file [v2]

2022-05-02 Thread Jaikiran Pai
> 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

Jaikiran Pai has updated the pull request incrementally with one additional 
commit since the last revision:

  print contents of hosts file in windows failure handler

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8466/files
  - new: https://git.openjdk.java.net/jdk/pull/8466/files/673fd0bd..8591d0c0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8466=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8466=00-01

  Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8466.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8466/head:pull/8466

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


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

2022-04-29 Thread Erik Joelsson
On Fri, 29 Apr 2022 12:51:21 GMT, Jaikiran Pai  wrote:

> Quick question - the path you note, is that even applicable for x64? I see 
> that it has a "System32" so just curious. 

Yes, System32 is not related to 32 vs 64 bit. As I understand it, that name was 
introduced when moving from 16 to 32 bit.

-

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


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

2022-04-29 Thread Jaikiran Pai
On Fri, 29 Apr 2022 11:28:32 GMT, Jaikiran Pai  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


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

2022-04-29 Thread Erik Joelsson
On Fri, 29 Apr 2022 11:28:32 GMT, Jaikiran Pai  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

Marked as reviewed by erikj (Reviewer).

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"`.

-

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


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

2022-04-29 Thread Daniel Fuchs
On Fri, 29 Apr 2022 11:28:32 GMT, Jaikiran Pai  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

Thanks for doing this Jaikiran! That should be helpful. Please get approval 
from someone from build-dev before integrating.

-

Marked as reviewed by dfuchs (Reviewer).

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


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

2022-04-29 Thread Jaikiran Pai
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

-

Commit messages:
 - 8285915: failure_handler: gather the contents of /etc/hosts file

Changes: https://git.openjdk.java.net/jdk/pull/8466/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8466=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8285915
  Stats: 8 lines in 2 files changed: 6 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8466.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8466/head:pull/8466

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