[9] RFR of 8129510: java/net/Inet6Address/serialize/Inet6AddressSerializationTest.java should exclude testing the Teredo tunneling interface on Windows

Chris Hegarty chris.hegarty at oracle.com
Tue Jun 23 08:18:47 UTC 2015


Brian,

Your changes look ok to me.

-Chris.

On 22 Jun 2015, at 22:56, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:

> Please review this test-only change at your convenience.
> 
> Issue:	https://bugs.openjdk.java.net/browse/JDK-8129510
> Patch:	see diff below
> 
> The analysis in the comments on https://bugs.openjdk.java.net/browse/JDK-8042902 suggests that excluding testing of Teredo tunneling in this test might be appropriate and would produce a reliable test, hence this patch. Assuming that this is acceptable, the test should pass consistently and other issue could resolved as “Cannot Reproduce.”
> 
> Alternatively, the issue at hand may be inappropriate and applying the included diff could mask a real problem. If this latter is the consensus then this issue will be resolved as “Not an Issue."
> 
> Thanks,
> 
> Brian
> 
> — diff —
> 
> --- a/test/java/net/Inet6Address/serialize/Inet6AddressSerializationTest.java
> +++ b/test/java/net/Inet6Address/serialize/Inet6AddressSerializationTest.java
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
>   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>   *
>   * This code is free software; you can redistribute it and/or modify it
> @@ -49,6 +49,8 @@
>  
>      static boolean failed;
>  
> +    static boolean isWindows = System.getProperty("os.name").startsWith("Windows");
> +
>      public static final int LOOPBACK_SCOPE_ID = 0;
>  
>      public static final byte[] IN6ADDR_ANY_INIT = { (byte) 0x00, (byte) 0x00,
> @@ -175,6 +177,13 @@
>          for (Enumeration<NetworkInterface> e = NetworkInterface
>                  .getNetworkInterfaces(); e.hasMoreElements();) {
>              NetworkInterface netIF = e.nextElement();
> +            // Skip (Windows)Teredo Tunneling Pseudo-Interface
> +            if (isWindows) {
> +                String dName = netIF.getDisplayName();
> +                if (dName != null && dName.contains("Teredo")) {
> +                    continue;
> +                }
> +            }
>              for (Enumeration<InetAddress> iadrs = netIF.getInetAddresses(); iadrs
>                      .hasMoreElements();) {
>                  InetAddress iadr = iadrs.nextElement();



More information about the net-dev mailing list