提交 182841c3 编写于 作者: S sherman

6963156: TEST_BUG: Several tests under sun/nio/cs failed

Summary: Updated the test cases and removed them from ProblemList.txt
Reviewed-by: alanb
上级 ec8847a5
......@@ -533,18 +533,12 @@ com/sun/nio/sctp/SctpChannel/Bind.java generic-all
# Failed on OpenSolaris, java.lang.AssertionError: Unknown event type
com/sun/nio/sctp/SctpChannel/Receive.java generic-all
# Triggers a hotspot crash on Fedora 9 32bit -server and Windows X64 samevm
sun/nio/cs/TestUTF8.java generic-all
# Runtime exception on windows X64, samevm mode
java/nio/channels/Selector/WakeupNow.java generic-all
# Occasional errors, solarix x86, address already in use, othervm mode
java/nio/channels/Selector/SelectorTest.java generic-all
# Fails on Linux Fedora 9 X64
sun/nio/cs/FindDecoderBugs.java generic-all
# Solaris 11 gave assert error and "connection refused", samevm issues?
com/sun/nio/sctp/SctpServerChannel/NonBlockingAccept.java generic-all
......@@ -595,9 +589,6 @@ java/nio/channels/SocketChannel/FinishConnect.java windows-all
# Fails on all platforms due to overlap of JDK jar file contents:
sun/nio/cs/Test4200310.sh generic-all
# Depends on motif packages that do not exist all the time:
sun/nio/cs/TestX11CNS.java generic-all
############################################################################
# jdk_rmi
......
......@@ -298,7 +298,7 @@ public class FindDecoderBugs {
void testRandomly(byte[] prefix, int n) {
int len = prefix.length;
byte[] ia = Arrays.copyOf(prefix, len + n);
for (int i = 0; i < 10000; i++) {
for (int i = 0; i < 5000; i++) {
for (int j = 0; j < n; j++)
ia[len + j] = randomByte();
test(ia);
......@@ -435,6 +435,9 @@ public class FindDecoderBugs {
static void equal(Object x, Object y) {
if (x == null ? y == null : x.equals(y)) pass();
else fail(x + " not equal to " + y);}
static void equal(int x, int y) {
if (x == y) pass();
else fail(x + " not equal to " + y);}
public static void main(String[] args) throws Throwable {
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
......
......@@ -94,6 +94,8 @@ public class TestX11CNS {
}
static void compare(Charset newCS, Charset oldCS) throws Exception {
if (newCS == null)
return; // does not exist on this platform
char[] cc = getChars(newCS, oldCS);
System.out.printf(" Diff <%s> <%s>...%n", newCS.name(), oldCS.name());
......@@ -120,14 +122,22 @@ public class TestX11CNS {
}
}
private static Charset getCharset(String czName)
throws Exception {
try {
return (Charset)Class.forName(czName).newInstance();
} catch (ClassNotFoundException e){}
return null; // does not exist
}
public static void main(String[] args) throws Exception {
compare(new sun.awt.motif.X11CNS11643P1(),
compare(getCharset("sun.awt.motif.X11CNS11643P1"),
new X11CNS11643P1());
compare(new sun.awt.motif.X11CNS11643P2(),
compare(getCharset("sun.awt.motif.X11CNS11643P2"),
new X11CNS11643P2());
compare(new sun.awt.motif.X11CNS11643P3(),
compare(getCharset("sun.awt.motif.X11CNS11643P3"),
new X11CNS11643P3());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册