Merge ~vpa1977/ubuntu/+source/jtreg6:switch-to-makefile into ubuntu/+source/jtreg6:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merged at revision: e0861fcc50cb64447cdfa321b0c282d0e81d33e1
Proposed branch: ~vpa1977/ubuntu/+source/jtreg6:switch-to-makefile
Merge into: ubuntu/+source/jtreg6:ubuntu/devel
Diff against target: 171 lines (+61/-38)
6 files modified
debian/changelog (+9/-0)
debian/control (+3/-1)
debian/patches/add-release-options.patch (+31/-0)
debian/patches/series (+1/-2)
debian/rules (+17/-13)
dev/null (+0/-22)
Reviewer Review Type Date Requested Status
Lukas Märdian (community) Approve
git-ubuntu import Pending
Review via email: mp+448997@code.launchpad.net

Description of the change

Changes:
 - use Makefile to build jtreg instead of ant build. See https://bugs.openjdk.org/browse/CODETOOLS-7903517

ppa: ppa:vpa1977/jtreg-makefile [1]

Testing:
 - rebuild openjdk-11 and openjdk-17 in ppa. Check that there are no regressions
related to jtreg configuration.
Results: no failures on amd64 for openjdk-11 and -17 which means that jtreg setup is correct and the testsuite can run successfully.

[1] https://launchpad.net/~vpa1977/+archive/ubuntu/jtreg-makefile

To post a comment you must log in.
Revision history for this message
Vladimir Petko (vpa1977) wrote (last edit ):
Download full text (23.0 KiB)

openjdk-11 test results

----------------cut----------------------------------------------
Platform: amd64
--------------- jtreg console summary for hotspot ---------------
Test results: passed: 1,958
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-11-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
--------------- jtreg console summary for langtools ---------------
Test results: passed: 3,926
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-11-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
--------------- jtreg console summary for jaxp ---------------
Test results: passed: 443
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-11-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
--------------- jtreg console summary for jdk ---------------
(xfwm4:461660): dbind-WARNING **: 03:02:00.761: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
(xfwm4:461660): xfwm4-WARNING **: 03:02:01.239: Another compositing manager is running on screen 0
(xfwm4:461660): xfwm4-WARNING **: 03:02:01.241: Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
Test results: passed: 5,345
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-11-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
Killed
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
 Command being timed: "/usr/bin/make -f debian/rules -k jtregcheck TEST_SUITES=hotspot langtools jaxp jdk JTREG_OPTIONS="
 User time (seconds): 20654.46
 System time (seconds): 1268.89
 Percent of CPU this job got: 320%
 Elapsed (wall clock) time (h:mm:ss or m:ss): 1:53:54
 Average shared text size (kbytes): 0
 Average unshared data size (kbytes): 0
 Average stack size (kbytes): 0
 Average total size (kbytes): 0
 Maximum resident set size (kbytes): 6547160
 Average resident set size (kbytes): 0
 Major (requiring I/O) page faults: 1216
 Minor (reclaiming a frame) page faults: 345030268
 Voluntary context switches: 46802256
 Involuntary context switches: 28465014
 Swaps: 0
 File system inputs: 2294976
 File system outputs: 69241168
 Socket messages sent: 0
 Socket messages received: 0
 Signals delivered: 0
 Page size (bytes): 4096
 Exit status: 0
--------------- jtreg console summary for hotspot ---------------
Test results: passed: 1,958
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-11-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
--------------- jtreg console summary for langtools ---------------
Test results...

Revision history for this message
Vladimir Petko (vpa1977) wrote :
Download full text (27.8 KiB)

openjdk-17 test
------------------
----------------cut----------------------------------------------
Platform: amd64
--------------- jtreg console summary for hotspot ---------------
Test results: passed: 2,549
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-17-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
--------------- jtreg console summary for langtools ---------------
Test results: passed: 4,243
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-17-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
--------------- jtreg console summary for jaxp ---------------
Test results: passed: 466
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-17-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
--------------- jtreg console summary for jdk ---------------
(xfwm4:1666673): dbind-WARNING **: 01:46:21.155: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
(xfwm4:1666673): xfwm4-WARNING **: 01:46:21.631: Another compositing manager is running on screen 0
(xfwm4:1666673): xfwm4-WARNING **: 01:46:21.633: Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
Test results: passed: 5,872
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-17-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
Killed
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
 Command being timed: "/usr/bin/make -f debian/rules -k jtregcheck TEST_SUITES=hotspot langtools jaxp jdk JTREG_OPTIONS="
 User time (seconds): 26585.88
 System time (seconds): 1724.57
 Percent of CPU this job got: 336%
 Elapsed (wall clock) time (h:mm:ss or m:ss): 2:20:22
 Average shared text size (kbytes): 0
 Average unshared data size (kbytes): 0
 Average stack size (kbytes): 0
 Average total size (kbytes): 0
 Maximum resident set size (kbytes): 7376500
 Average resident set size (kbytes): 0
 Major (requiring I/O) page faults: 693
 Minor (reclaiming a frame) page faults: 439677346
 Voluntary context switches: 73192259
 Involuntary context switches: 45968471
 Swaps: 0
 File system inputs: 3763336
 File system outputs: 176096576
 Socket messages sent: 0
 Socket messages received: 0
 Signals delivered: 0
 Page size (bytes): 4096
 Exit status: 0
--------------- jtreg console summary for hotspot ---------------
Test results: passed: 2,549
[debian/tests/jtreg-autopkgtest.sh] nothing to cleanup
Unable to compare jtreg results: no build jtreport found for hotspot/amd64.
Reason: '/usr/share/doc/openjdk-17-jre-headless//test-amd64/jtreport-hotspot.tar.gz' does not exist.
--------------- jtreg console summary for langtools ---------------...

Revision history for this message
Lukas Märdian (slyon) wrote :

Thank you, lgtm!

The change is reasonable, given "make" is the officially supported buildsystem upstream and the support for "ant" (make/build.xml) building got dropped with more recent versions.

diff'ing the resulting .deb binaries showed not unexpected changes on my side. Thank you for providing PPA test builds and running extensive test suites against openjdk-11 and openjdk-17! Those make me feel much more comfortable sponsoring this change.

A small nitpick are some trailing whitespace characters in your new patch (debian/patches/add-release-options.patch). I'm not going to block on this, but maybe you can update your tooling/editor, to highlight such things in the future. And kudos for providing proper DEP-3 headers!

One suggested I have for you, is to work with Debian to get this change accepted, too.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 66e66b2..21cc448 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+jtreg6 (6.1+2-1ubuntu3) mantic; urgency=medium
7+
8+ * Use Makefile to build jtreg (LP: #2031041).
9+ - Use --release option in Makefile compile options.
10+ - d/p/*: drop build.xml patches.
11+ - d/control: add libguice-java, zip.
12+
13+ -- Vladimir Petko <vladimir.petko@canonical.com> Fri, 11 Aug 2023 09:13:15 +1200
14+
15 jtreg6 (6.1+2-1ubuntu2) mantic; urgency=medium
16
17 * d/control: use Recommends: for libtestng7-java dependency (LP: #2026215).
18diff --git a/debian/control b/debian/control
19index f50fe30..cb573d7 100644
20--- a/debian/control
21+++ b/debian/control
22@@ -16,7 +16,9 @@ Build-Depends:
23 libhamcrest-java,
24 libtestng7-java,
25 libasmtools-java,
26- libjcommander-java
27+ libjcommander-java,
28+ libguice-java,
29+ zip
30 Standards-Version: 4.6.0
31 Vcs-Git: https://salsa.debian.org/java-team/jtreg.git
32 Vcs-Browser: https://salsa.debian.org/java-team/jtreg
33diff --git a/debian/patches/add-asmtools-to-classpath.patch b/debian/patches/add-asmtools-to-classpath.patch
34deleted file mode 100644
35index ee79b17..0000000
36--- a/debian/patches/add-asmtools-to-classpath.patch
37+++ /dev/null
38@@ -1,16 +0,0 @@
39-Description: Provide path to asmtools.jar
40- A number of hotspot tests use java asmtools. Provide path to asmtools.jar
41-Author: Vladimir Petko <vladimir.petko@canonical.com>
42-Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/jtreg6/+bug/2015011
43-Last-Update: 2023-04-03
44---- a/make/build.xml
45-+++ b/make/build.xml
46-@@ -144,7 +144,7 @@
47- <manifest>
48- <attribute name="Built-By" value="${user.name}"/>
49- <attribute name="Main-Class" value="com.sun.javatest.regtest.Main"/>
50-- <attribute name="Class-Path" value="javatest.jar jh.jar junit.jar"/>
51-+ <attribute name="Class-Path" value="javatest.jar jh.jar junit.jar asmtools.jar"/>
52- <attribute name="jtreg-Name" value="jtreg"/>
53- <attribute name="jtreg-Version" value="${build.version}"/>
54- <attribute name="jtreg-Milestone" value="${build.milestone}"/>
55diff --git a/debian/patches/add-release-options.patch b/debian/patches/add-release-options.patch
56new file mode 100644
57index 0000000..f34a5b5
58--- /dev/null
59+++ b/debian/patches/add-release-options.patch
60@@ -0,0 +1,31 @@
61+Description: Set release option to be able to compile with default-jdk
62+ jtreg6 does not set release option and produces class files corresponding
63+ to the compiling jdk. This is expected behavior and patch is not
64+ needed upstream.
65+ We require this patch only to avoid dependency on openjdk-8.
66+Author: Vladimir Petko <vladimir.petko@canonical.com>
67+Forwarded: not-needed
68+Last-Update: 2023-08-11
69+--- a/make/Defs.gmk
70++++ b/make/Defs.gmk
71+@@ -149,7 +149,7 @@
72+
73+ # Only use -source -target, to support legacy platforms, when building with JDK 8
74+ # Otherwise, use default values for $JDKHOME/bin/javac
75+-SUPPORT_OLD_SOURCE_TARGET = $(shell $(JDKJAVAC) -version 2>&1 | grep '[8]' > /dev/null && echo true )
76++SUPPORT_OLD_SOURCE_TARGET = $(shell $(JDKJAVAC) -version 2>&1 | grep '1\.8\.' > /dev/null && echo true )
77+ ifneq ($(SUPPORT_OLD_SOURCE_TARGET),)
78+ OLD_JAVAC_SOURCE_TARGET = -source 1.2 -target 1.1
79+ AGENT_JAVAC_SOURCE_TARGET = -source 5 -target 5
80+@@ -157,7 +157,10 @@
81+ REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS =
82+ else
83+ EXTRA_LINT_OPTS = -rawtypes,-unchecked
84+- REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS = --patch-module java.base=$(JAVADIR)
85++ REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS =
86++ OLD_JAVAC_SOURCE_TARGET = --release 8
87++ AGENT_JAVAC_SOURCE_TARGET = --release 8
88++ TOOL_JAVAC_SOURCE_TARGET = --release 8
89+ endif
90+
91+ ifdef JDK5HOME
92diff --git a/debian/patches/series b/debian/patches/series
93index e8a711b..bd5ef3d 100644
94--- a/debian/patches/series
95+++ b/debian/patches/series
96@@ -1,5 +1,4 @@
97+add-release-options.patch
98 launchers.patch
99 add-jcommander-to-classpath.patch
100-use-release-instead-of-source-target.patch
101-add-asmtools-to-classpath.patch
102 add-logger-to-classpath.patch
103diff --git a/debian/patches/use-release-instead-of-source-target.patch b/debian/patches/use-release-instead-of-source-target.patch
104deleted file mode 100644
105index a0ca08a..0000000
106--- a/debian/patches/use-release-instead-of-source-target.patch
107+++ /dev/null
108@@ -1,22 +0,0 @@
109-Description: use 'release' instead of 'target' and 'source'
110- When running jtreg with openjdk-8 and the agentvm it will fail to run with
111- "java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer".
112- An easy fix is to replace "source=1.7 target=1.7" with "release=7" in the
113- ant build script.
114-Author: Tiago Stürmer Daitx <tiago.daitx@ubuntu.com>
115-Bug-Debian: https://bugs.debian.org/913853
116-Bug-Ubuntu: https://launchpad.net/bugs/1803628
117-Last-Update: 2018-11-01
118----
119-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
120---- a/make/build.xml
121-+++ b/make/build.xml
122-@@ -172,7 +172,7 @@
123-
124- <target name="-compile-jtreg.classes">
125- <mkdir dir="${build.classes.dir}"/>
126-- <javac encoding="iso-8859-1" source="1.8" target="1.8"
127-+ <javac encoding="iso-8859-1" release="8"
128- debug="true" debuglevel="source,lines"
129- srcdir="${src.classes.dir}"
130- destdir="${build.classes.dir}"
131diff --git a/debian/rules b/debian/rules
132index 405fe3f..dca8f04 100755
133--- a/debian/rules
134+++ b/debian/rules
135@@ -11,19 +11,23 @@ DATE := $(shell dpkg-parsechangelog --show-field Date)
136 dh $@ --with javahelper
137
138 override_dh_auto_build:
139- ant -f make/build.xml \
140- -Dant.jar=/usr/share/java/ant.jar \
141- -Djtreg.build.resources=/usr/share/java \
142- -Djh.jar=/usr/share/java/jh.jar \
143- -Djhall.jar=/usr/share/java/jhall.jar \
144- -Djunit.jar=/usr/share/java/junit4.jar \
145- -Dtestng.jar=/usr/share/java/testng.jar \
146- -Djavatest.jar=/usr/share/java/javatest.jar \
147- -Dasmtools.jar=/usr/share/java/asmtools.jar \
148- -Dbuild.date.time='$(DATE)' \
149- -Dbuild.version=$(VERSION) \
150- -Dbuild.milestone=src \
151- -Dbuild.number=$(BUILD_NUMBER)
152+ cd make && \
153+ make ANT=/usr/share/ant \
154+ ANT_JAR=/usr/share/java/ant.jar \
155+ ASMTOOLS_JAR=/usr/share/java/asmtools.jar \
156+ BUILDDIR=../dist \
157+ BUILD_MILESTONE=src \
158+ BUILD_NUMBER=$(BUILD_NUMBER) \
159+ BUILD_VERSION=$(VERSION) \
160+ BUILD_VERSION_STRING="$(VERSION)+$(BUILD_NUMBER)" \
161+ GOOGLE_GUICE_JAR=/usr/share/java/guice.jar \
162+ HAMCREST_JAR=/usr/share/java/hamcrest.jar \
163+ JAVATEST_JAR=/usr/share/java/javatest.jar \
164+ JCOMMANDER_JAR=/usr/share/java/jcommander.jar \
165+ JDKHOME=$(JAVA_HOME) \
166+ JUNIT_JAR=/usr/share/java/junit4.jar \
167+ TESTNG_JAR=/usr/share/java/testng.jar
168+ mv dist/images/jtreg dist/
169 dh_auto_build
170
171 # Generate the manpages

Subscribers

People subscribed via source and target branches