1 Star 0 Fork 81

wangyangdahai/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
add-missing-test-case.patch 4.46 KB
一键复制 编辑 原始数据 按行查看 历史
eapen 提交于 2021-05-19 17:01 . I3PQM1: update to 8u292-b10
From 696532135fb7dc62f4356531b6047d0620149447 Mon Sep 17 00:00:00 2001
Date: Fri, 16 Apr 2021 11:26:40 +0800
Subject: [PATCH 1/3] add missing test case
---
.../java/testlibrary/OutputAnalyzer.java | 2 +-
.../lookup/TestDefenderMethodLookup.java | 2 +
.../templates/SSLSocketSSLEngineTemplate.java | 17 +++++++-
.../com/huawei/openjdk/TestAdaptiveHeap.java | 42 +++++++++++++++++++
version.txt | 1 +
9 files changed, 61 insertions(+), 3 deletions(-)
create mode 100644 test/jdk/com/huawei/openjdk/TestAdaptiveHeap.java
create mode 100644 version.txt
diff --git a/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java b/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java
index 2132325f..2221ea4a 100644
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java
+++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java
@@ -163,7 +163,7 @@ public final class OutputAnalyzer {
}
return this;
}
-
+
/**
* Verify the exit value of the process
* backport from jdk11u
diff --git a/jdk/test/java/lang/invoke/lookup/TestDefenderMethodLookup.java b/jdk/test/java/lang/invoke/lookup/TestDefenderMethodLookup.java
index 2ee40289..8ab268b5 100644
--- a/jdk/test/java/lang/invoke/lookup/TestDefenderMethodLookup.java
+++ b/jdk/test/java/lang/invoke/lookup/TestDefenderMethodLookup.java
@@ -1,6 +1,8 @@
/*
* @test
+ * @author zhangli
* @bug 8203699
+ * @summary see https://code.huawei.com/HuaweiJDK/JVM-team/JVM/issues/1368
* @run testng/othervm test.java.lang.invoke.lookup.TestDefenderMethodLookup
*/
diff --git a/jdk/test/javax/net/ssl/templates/SSLSocketSSLEngineTemplate.java b/jdk/test/javax/net/ssl/templates/SSLSocketSSLEngineTemplate.java
index 54b4e3c6..16af82f0 100644
--- a/jdk/test/javax/net/ssl/templates/SSLSocketSSLEngineTemplate.java
+++ b/jdk/test/javax/net/ssl/templates/SSLSocketSSLEngineTemplate.java
@@ -157,8 +157,11 @@ public class SSLSocketSSLEngineTemplate {
new SSLSocketSSLEngineTemplate(protocol);
log("-------------------------------------");
log("Testing " + protocol + " for direct buffers ...");
- test.runTest(true);
-
+
+ test.runTest(true);
+ // invalid session
+
+ test.invalidSession();
log("---------------------------------------");
log("Testing " + protocol + " for indirect buffers ...");
test.runTest(false);
@@ -529,4 +532,14 @@ public class SSLSocketSSLEngineTemplate {
}
}
}
+
+ /*
+ * invalid session
+ */
+ private void invalidSession() {
+ if (sslSocket != null && sslSocket.getSession() != null) {
+ sslSocket.getSession().invalidate();
+ }
+ }
}
+
diff --git a/test/jdk/com/huawei/openjdk/TestAdaptiveHeap.java b/test/jdk/com/huawei/openjdk/TestAdaptiveHeap.java
new file mode 100644
index 00000000..bd22ba83
--- /dev/null
+++ b/test/jdk/com/huawei/openjdk/TestAdaptiveHeap.java
@@ -0,0 +1,42 @@
+package com.huawei.openjdk.adaptiveheap;
+ /**
+ * @test TestAdaptiveHeap.java
+ * @key gc
+ * @library /testlibrary
+ * @build com.huawei.openjdk.adaptiveheap.TestAdaptiveHeap
+ * @run main/othervm com.huawei.openjdk.adaptiveheap.TestAdaptiveHeap -Xms16G -Xmx16G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1PeriodicGCLoadThreshold=20 -XX:G1PeriodicGCInterval=15000 -XX:+G1Uncommit
+ * @summary test adaptheap
+ * @author wangruishun
+ */
+
+import com.oracle.java.testlibrary.OutputAnalyzer;
+import com.oracle.java.testlibrary.ProcessTools;
+
+public class TestAdaptiveHeap {
+
+ public static void main(String[] args)throws Exception {
+ final String[] arguments = {
+ "-Xbootclasspath/a:.",
+ "-Xmx16G",
+ ExeTest.class.getName(),
+ args[0],
+ args[1],
+ args[2],
+ args[3],
+ args[4],
+ args[5],
+ args[6]
+ };
+
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(arguments);
+ OutputAnalyzer output = new OutputAnalyzer(pb.start());
+ output.shouldHaveExitValue(0);
+ System.out.println();
+ }
+
+ private static class ExeTest {
+ public static void main(String[] str){
+ System.out.println();
+ }
+ }
+}
diff --git a/version.txt b/version.txt
new file mode 100644
index 00000000..9b614024
--- /dev/null
+++ b/version.txt
@@ -0,0 +1 @@
+8.292.8.0.13
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangyangdahai/openjdk-1.8.0.git
git@gitee.com:wangyangdahai/openjdk-1.8.0.git
wangyangdahai
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助