Bug#1036065: jtreg6: errors in jasm tests despite libasmtools-java installed

Vladimir Petko vladimir.petko at canonical.com
Sun May 14 21:32:08 BST 2023


Source: jtreg6
Version: 6.1+2-1ubuntu1
Severity: normal
X-Debbugs-Cc: vladimir.petko at canonical.com

Dear Maintainer,

openjdk-8 adds asmtools dependency, but tests[1] requiring asmtools still fail,
e.g.

Error:  compiler/conversions/TestPrimitiveConversions.java

----------rerun:(4/368)*----------
cd /tmp/hotspot/JTwork/scratch && \\
    /build/openjdk-8-tuB2dS/openjdk-8-8u372-ga/build/bootcycle-
build/images/j2s>
    -classpath /usr/share/java/asmtools.jar \\
    org.openjdk.asmtools.jasm.Main -d
/tmp/hotspot/JTwork/classes/compiler/conv>
result: Error. can't find jasm


test result: Error. can't find jasm
--------------------
The errors apply to 11 and 17 as well.

In order to avoid this error, asmtools need to be present in the manfest of the
jtreg.jar, e.g. here is excerpt of the jtreg 6.2+1 MANIFEST.MF[2]
--------------------------------------
Class-Path: javatest.jar asmtools.jar
--------------------------------------
Please consider the attached patch to add asmtools.jar to the jtreg classpath.

[1]https://buildd.debian.org/status/fetch.php?pkg=openjdk-8&arch=all&ver=8u372-ga-1&stamp=1683819721&raw=0
[2] https://builds.shipilev.net/jtreg/jtreg-6.2%2B1.zip


-- System Information:
Debian Release: bookworm/sid
  APT prefers lunar-updates
  APT policy: (500, 'lunar-updates'), (500, 'lunar-security'), (500, 'lunar')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.2.0-20-generic (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
commit 2360ee1532ced475af53125f0bc13d1ec3c41e98
Author: Vladimir Petko <vladimir.petko at canonical.com>
Date:   Mon May 15 08:28:28 2023 +1200

    add asmtools to classpath

diff --git a/debian/control b/debian/control
index 2515941..269aa92 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends:
  libjtharness-java (>= 6.0),
  libxalan2-java,
  libhamcrest-java,
+ libasmtools-java,
  testng
 Standards-Version: 4.6.2
 Vcs-Git: https://salsa.debian.org/java-team/jtreg.git
@@ -28,7 +29,8 @@ Depends:
  javahelp2,
  libjtharness-java (>= 6.0),
  libhamcrest-java,
- libxalan2-java
+ libxalan2-java,
+ libasmtools-java,
 Recommends: testng
 Conflicts: jtreg
 Description: Regression Test Harness for the OpenJDK platform
diff --git a/debian/jtreg6.links b/debian/jtreg6.links
index 9693cd1..682feab 100644
--- a/debian/jtreg6.links
+++ b/debian/jtreg6.links
@@ -8,6 +8,7 @@ usr/share/java/jh.jar                   /usr/share/jtreg/lib/jh.jar
 usr/share/java/jtreg.jar                /usr/share/jtreg/lib/jtreg.jar
 usr/share/java/junit4.jar               /usr/share/jtreg/lib/junit.jar
 usr/share/java/testng.jar               /usr/share/jtreg/lib/testng.jar
+usr/share/java/asmtools.jar             /usr/share/jtreg/lib/asmtools.jar
 
 usr/share/java/hamcrest-core.jar        /usr/share/jtreg/share/java/hamcrest-core.jar
 usr/share/java/javatest.jar             /usr/share/jtreg/share/java/javatest.jar
@@ -16,3 +17,4 @@ usr/share/java/jh.jar                   /usr/share/jtreg/share/java/jh.jar
 usr/share/java/jtreg.jar                /usr/share/jtreg/share/java/jtreg.jar
 usr/share/java/junit4.jar               /usr/share/jtreg/share/java/junit.jar
 usr/share/java/testng.jar               /usr/share/jtreg/share/java/testng.jar
+usr/share/java/asmtools.jar             /usr/share/jtreg/share/java/asmtools.jar
diff --git a/debian/patches/add-asmtools-to-classpath.patch b/debian/patches/add-asmtools-to-classpath.patch
new file mode 100644
index 0000000..ee79b17
--- /dev/null
+++ b/debian/patches/add-asmtools-to-classpath.patch
@@ -0,0 +1,16 @@
+Description: Provide path to asmtools.jar
+ A number of hotspot tests use java asmtools. Provide path to asmtools.jar
+Author: Vladimir Petko <vladimir.petko at canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/jtreg6/+bug/2015011
+Last-Update: 2023-04-03
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -144,7 +144,7 @@
+             <manifest>
+                 <attribute name="Built-By" value="${user.name}"/>
+                 <attribute name="Main-Class" value="com.sun.javatest.regtest.Main"/>
+-                <attribute name="Class-Path" value="javatest.jar jh.jar junit.jar"/>
++                <attribute name="Class-Path" value="javatest.jar jh.jar junit.jar asmtools.jar"/>
+                 <attribute name="jtreg-Name" value="jtreg"/>
+                 <attribute name="jtreg-Version" value="${build.version}"/>
+                 <attribute name="jtreg-Milestone" value="${build.milestone}"/>
diff --git a/debian/patches/series b/debian/patches/series
index df57d95..d2c5b73 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 launchers.patch
 add-jcommander-to-classpath.patch
 use-release-instead-of-source-target.patch
+add-asmtools-to-classpath.patch


More information about the pkg-java-maintainers mailing list