diff options
3 files changed, 25 insertions, 5 deletions
diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java index 163db31..920f137 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java @@ -17,6 +17,7 @@ package org.apache.harmony.luni.tests.java.net; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargets; import dalvik.annotation.TestLevel; @@ -483,6 +484,12 @@ public class Inet4AddressTest extends junit.framework.TestCase { method = "equals", args = {java.lang.Object.class} ) + @KnownFailure("127.0.0 is not recognized as a valid IP address. " + + "Unfortunately, despite the fact that these IP address formats " + + "have been the cause of numerous phishing and security " + + "vulnerabilities in the past, and most other languages refuse " + + "them, the RI documentation explicitly specifies that they are " + + "supported. Fix the code to support these.") public void test_equals() throws Exception { InetAddress addr = Inet4Address.getByName("239.191.255.255"); assertTrue(addr.equals(addr)); @@ -501,6 +508,7 @@ public class Inet4AddressTest extends junit.framework.TestCase { method = "getHostAddress", args = {} ) + @KnownFailure("1, 1.1 and 1.1.1 are not recognized as valid IP addresses.") public void test_getHostAddress() throws Exception { InetAddress addr = Inet4Address.getByName("localhost"); assertEquals("127.0.0.1", addr.getHostAddress()); @@ -527,6 +535,7 @@ public class Inet4AddressTest extends junit.framework.TestCase { method = "hashCode", args = {} ) + @KnownFailure("1.1 and 1.1.1 are not recognized as valid IP addresses.") public void test_hashCode() throws Exception { InetAddress addr1 = Inet4Address.getByName("1.1"); InetAddress addr2 = Inet4Address.getByName("1.1.1"); diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet6AddressTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet6AddressTest.java index 498c486..62952d9 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet6AddressTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet6AddressTest.java @@ -17,6 +17,7 @@ package org.apache.harmony.luni.tests.java.net; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetNew; @@ -1152,6 +1153,12 @@ public class Inet6AddressTest extends junit.framework.TestCase { method = "equals", args = {java.lang.Object.class} ) + @KnownFailure("127.0.0 is not recognized as a valid IP address. " + + "Unfortunately, despite the fact that these IP address formats " + + "have been the cause of numerous phishing and security " + + "vulnerabilities in the past, and most other languages refuse " + + "them, the RI documentation explicitly specifies that they are " + + "supported. Fix the code to support these.") public void test_equals() throws Exception { InetAddress addr = Inet6Address.getByName("239.191.255.255"); assertTrue(addr.equals(addr)); @@ -1170,6 +1177,7 @@ public class Inet6AddressTest extends junit.framework.TestCase { method = "getHostAddress", args = {} ) + @KnownFailure("1, 1.1 and 1.1.1 are not recognized as valid IP addresses.") public void test_getHostAddress() throws Exception { InetAddress aAddr = Inet6Address.getByName("localhost"); assertEquals("127.0.0.1", aAddr.getHostAddress()); @@ -1230,6 +1238,7 @@ public class Inet6AddressTest extends junit.framework.TestCase { method = "hashCode", args = {} ) + @KnownFailure("1.1 and 1.1.1 are not recognized as valid IP addresses.") public void test_hashCode() throws Exception { InetAddress addr1 = Inet6Address.getByName("1.1"); InetAddress addr2 = Inet6Address.getByName("1.1.1"); diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java index a1c5f4f..5c8808c 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java @@ -18,6 +18,7 @@ package org.apache.harmony.luni.tests.java.net; import dalvik.annotation.BrokenTest; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargets; import dalvik.annotation.TestLevel; @@ -254,11 +255,12 @@ public class InetAddressTest extends junit.framework.TestCase { method = "getByName", args = {java.lang.String.class} ) - @BrokenTest("1.2.3 and 1.2 are not valid IP addresses and throw " + - "exceptions. These form of IP address has been the cause of " + - "various security vulnerabilities in the past, and all modern " + - "implementations refuse them. The test should be modified to " + - "require that they not function.") + @KnownFailure("1.2.3 and 1.2 are not recognized as valid IPv4 addresses. " + + "Unfortunately, despite the fact that these IP address formats " + + "have been the cause of numerous phishing and security " + + "vulnerabilities in the past, and most other languages refuse " + + "them, the RI documentation explicitly specifies that they are " + + "supported. Fix the code to support these.") public void test_getByNameLjava_lang_String() throws Exception { // Test for method java.net.InetAddress // java.net.InetAddress.getByName(java.lang.String) |