8129510: java/net/Inet6Address/serialize/Inet6AddressSerializationTest.java should exclude testing the Teredo tunneling interface on Windows
Summary: Suppress testing the Teredo tunneling interface on Windows.
Reviewed-by: chegar
--- a/jdk/test/java/net/Inet6Address/serialize/Inet6AddressSerializationTest.java Tue Jun 23 16:36:04 2015 +0300
+++ b/jdk/test/java/net/Inet6Address/serialize/Inet6AddressSerializationTest.java Tue Jun 23 09:46:22 2015 -0700
@@ -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();