[Git][java-team/jtreg7][master] 3 commits: add jtreg7 compatibility patches.
Emmanuel Bourg (@ebourg)
gitlab at salsa.debian.org
Tue Apr 9 13:16:06 BST 2024
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / jtreg7
Commits:
2fbe5374 by Vladimir Petko at 2024-02-19T12:35:50+13:00
add jtreg7 compatibility patches.
Disable jtreg7 self-tests failing due to SecurityManager changes in Java 21
- - - - -
192f8084 by Vladimir Petko at 2024-02-19T12:35:54+13:00
changelog
- - - - -
4fdcc13e by Emmanuel Bourg at 2024-04-09T12:15:57+00:00
Merge branch 'fix-java-21-ftbfs' into 'master'
Fix Java 21 ftbfs
See merge request java-team/jtreg7!2
- - - - -
5 changed files:
- debian/changelog
- + debian/patches/java21-codetools-7903645.patch
- + debian/patches/java21-codetools-7903646.patch
- + debian/patches/java21-this-escape.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+jtreg7 (7.3.1+1-2) UNRELEASED; urgency=medium
+
+ * d/p/java21-*: add Java 21 compatibility patches: fix this-escape
+ warning, disable tests failing due to SecurityManager changes
+ (Closes: #1057512).
+
+ -- Vladimir Petko <vladimir.petko at canonical.com> Tue, 30 Jan 2024 09:27:40 +1300
+
jtreg7 (7.3.1+1-1) unstable; urgency=medium
* New upstream release 7.3.1 build 1.
=====================================
debian/patches/java21-codetools-7903645.patch
=====================================
@@ -0,0 +1,67 @@
+Description: Disable tests failing due to SecurityManager changes
+ Java 21 requires -Djava.security.manager JVM argument to set security
+ manager (deprecated for removal). Otherwise it throws
+ UnsupportedOperationException. Disable affected tests pending bug fix as it
+ requires discussion with upstream on the best way to fix it.
+Author: Vladimir Petko <vladimir.petko at canonical.com>
+Bug: https://bugs.openjdk.org/browse/CODETOOLS-7903645
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057512
+Forwarded: not-needed
+Last-Update: 2024-01-26
+--- a/test/SecurityManager/SecurityManagerTests.gmk
++++ b/test/SecurityManager/SecurityManagerTests.gmk
+@@ -35,8 +35,8 @@
+ $(TESTDIR)/SecurityManager/pass
+ echo "test passed at `date`" > $@
+
+-TESTS.jtreg += \
+- $(BUILDTESTDIR)/GoodSecurityManagerTest.ok
++#TESTS.jtreg += \
++# $(BUILDTESTDIR)/GoodSecurityManagerTest.ok
+
+ #----------------------------------------------------------------------
+
+@@ -53,8 +53,8 @@
+ grep "Cannot reset security manager" $(@:%.ok=%)/work/error/BadSecurityManagerTest.jtr
+ echo "test passed at `date`" > $@
+
+-TESTS.jtreg += \
+- $(BUILDTESTDIR)/BadSecurityManagerTest.ok
++#TESTS.jtreg += \
++# $(BUILDTESTDIR)/BadSecurityManagerTest.ok
+
+ #----------------------------------------------------------------------
+
+@@ -72,8 +72,8 @@
+ grep "Test results: failed: 5" $(@:%.ok=%)/out.txt
+ echo "test passed at `date`" > $@
+
+-TESTS.jtreg += \
+- $(BUILDTESTDIR)/SecurityManagerTest_agentvm_forbid.ok
++#TESTS.jtreg += \
++# $(BUILDTESTDIR)/SecurityManagerTest_agentvm_forbid.ok
+
+ #----------------------------------------------------------------------
+
+@@ -87,8 +87,8 @@
+ $(TESTDIR)/SecurityManager
+ echo "test passed at `date`" > $@
+
+-TESTS.jtreg += \
+- $(BUILDTESTDIR)/SecurityManagerTest_othervm.ok
++#TESTS.jtreg += \
++# $(BUILDTESTDIR)/SecurityManagerTest_othervm.ok
+
+ #----------------------------------------------------------------------
+
+--- a/test/badtests/BadTests.gmk
++++ b/test/badtests/BadTests.gmk
+@@ -73,7 +73,4 @@
+ echo "test passed at `date`" > $@
+
+ ifneq ($(OS_NAME), windows)
+-TESTS.jtreg += \
+- $(BUILDTESTDIR)/BadTests.othervm.ok \
+- $(BUILDTESTDIR)/BadTests.agentvm.ok
+ endif
+
=====================================
debian/patches/java21-codetools-7903646.patch
=====================================
@@ -0,0 +1,24 @@
+Description: Disable tests failing due to SecurityManager changes in agentvm
+ In agentvm mode, the agent JVM does not set security manager for Java 18 + and
+ does not intercept System.exit() calls.
+ This causes agentvm mode behave differently from othervm - tests failing with
+ 'Unexpected test exit' produce an 'Unexpected EOF' error or a SocketException
+ error.
+ Disable affected tests pending bug fix as it requires discussion with upstream
+ on the best way to fix it.
+Author: Vladimir Petko <vladimir.petko at canonical.com>
+Bug: https://bugs.openjdk.org/browse/CODETOOLS-7903646
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057512
+Forwarded: not-needed
+Last-Update: 2024-01-26
+--- a/test/basic/Basic.gmk
++++ b/test/basic/Basic.gmk
+@@ -108,6 +108,6 @@
+ echo $@ passed at `date` > $@
+
+ INITIAL_TESTS += \
+- $(BUILDTESTDIR)/Basic.othervm.ok \
+- $(BUILDTESTDIR)/Basic.agentvm.ok
++ $(BUILDTESTDIR)/Basic.othervm.ok
++# $(BUILDTESTDIR)/Basic.agentvm.ok
+
=====================================
debian/patches/java21-this-escape.patch
=====================================
@@ -0,0 +1,106 @@
+Description: fix [this-escape] warnings by declaring classes final.
+ [this-escape] warning is generated when a class's constructor calls
+ a method that can be overriden.
+Author: Jonathan Gibbons <jjg at openjdk.org>
+Origin: upstream, https://github.com/openjdk/jtreg/commit/48935be4685ec5c99b3fe15c10439946944c9f7e
+Bug: https://bugs.openjdk.org/browse/CODETOOLS-7903516
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057511
+Forwarded: not-needed
+Applied-Upstream: 48935be4685ec5c99b3fe15c10439946944c9f7e
+--- a/src/share/classes/com/sun/javatest/regtest/agent/AgentServer.java
++++ b/src/share/classes/com/sun/javatest/regtest/agent/AgentServer.java
+@@ -57,7 +57,7 @@
+
+
+ @SuppressWarnings("removal") // Security Manager and related APIs
+-public class AgentServer implements ActionHelper.OutputHandler {
++public final class AgentServer implements ActionHelper.OutputHandler {
+
+ /**
+ * Main program used to invoke and run the server in child JVMs
+--- a/src/share/classes/com/sun/javatest/regtest/agent/SearchPath.java
++++ b/src/share/classes/com/sun/javatest/regtest/agent/SearchPath.java
+@@ -41,7 +41,7 @@
+ * A search path, as in an ordered set of file system locations,
+ * such as directories, zip files and jar files.
+ */
+-public class SearchPath {
++public final class SearchPath {
+ /**
+ * Creates an empty search path.
+ */
+--- a/src/share/classes/com/sun/javatest/regtest/config/Locations.java
++++ b/src/share/classes/com/sun/javatest/regtest/config/Locations.java
+@@ -47,7 +47,7 @@
+ /**
+ * Utilities to locate source and class files used by a test.
+ */
+-public class Locations {
++public final class Locations {
+ /**
+ * Used to report problems that are found.
+ */
+--- a/src/share/classes/com/sun/javatest/regtest/config/ParseException.java
++++ b/src/share/classes/com/sun/javatest/regtest/config/ParseException.java
+@@ -32,7 +32,7 @@
+ * parsing error may occur either during initial examination of the tags in
+ * the finder or during more extensive verification of the run action.
+ */
+-public class ParseException extends TestRunException
++public final class ParseException extends TestRunException
+ {
+ static final long serialVersionUID = 5598548899306920122L;
+ public ParseException(String msg) {
+@@ -42,7 +42,7 @@
+ public ParseException(Throwable t) {
+ super(PARSE_EXCEPTION + t.getMessage());
+ initCause(t);
+- } // ParseExeptionException()
++ }
+
+ //----------misc statics----------------------------------------------------
+
+--- a/src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java
++++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java
+@@ -72,7 +72,7 @@
+ import static com.sun.javatest.regtest.util.StringUtils.join;
+
+
+-public class RegressionParameters
++public final class RegressionParameters
+ extends BasicInterviewParameters
+ implements Parameters.EnvParameters
+ {
+--- a/src/share/classes/com/sun/javatest/regtest/config/RegressionTestFinder.java
++++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionTestFinder.java
+@@ -66,7 +66,7 @@
+ * @see com.sun.javatest.TestFinder
+ * @see com.sun.javatest.finder.TagTestFinder
+ */
+-public class RegressionTestFinder extends TagTestFinder
++public final class RegressionTestFinder extends TagTestFinder
+ {
+ /**
+ * Constructs the list of file names to exclude for pruning in the search
+--- a/src/share/classes/com/sun/javatest/regtest/config/RegressionTestSuite.java
++++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionTestSuite.java
+@@ -51,7 +51,7 @@
+ import com.sun.javatest.regtest.tool.RegressionContextManager;
+
+
+-public class RegressionTestSuite extends TestSuite
++public final class RegressionTestSuite extends TestSuite
+ {
+ static Map<File, SoftReference<RegressionTestSuite>> cache;
+
+--- a/src/share/classes/com/sun/javatest/regtest/util/StreamCopier.java
++++ b/src/share/classes/com/sun/javatest/regtest/util/StreamCopier.java
+@@ -34,7 +34,7 @@
+ /**
+ * A thread to copy an input stream/reader to an output stream/writer.
+ */
+-public class StreamCopier extends Thread {
++public final class StreamCopier extends Thread {
+
+ public StreamCopier(InputStream in, PrintWriter out, LineScanner scanner) {
+ super(Thread.currentThread().getName() + "_StreamCopier_" + (serial++));
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,6 @@
launchers.patch
do-not-export-headless-display.patch
reproducible-build.patch
+java21-this-escape.patch
+java21-codetools-7903645.patch
+java21-codetools-7903646.patch
View it on GitLab: https://salsa.debian.org/java-team/jtreg7/-/compare/e4bac6ebbd3a08f9f9dfbdc1a0e482a3d2f0088f...4fdcc13ef6e531b34851e960352b5814ff2fa677
--
View it on GitLab: https://salsa.debian.org/java-team/jtreg7/-/compare/e4bac6ebbd3a08f9f9dfbdc1a0e482a3d2f0088f...4fdcc13ef6e531b34851e960352b5814ff2fa677
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20240409/66eb9894/attachment.htm>
More information about the pkg-java-commits
mailing list