[jdk8u-dev] RFR: 8208655: use JTreg skipped status in hotspot tests [v2]

Andrew John Hughes andrew at openjdk.org
Fri Nov 24 05:21:33 UTC 2023


> This backport brings in `jtreg.SkippedException` which is used by JDK-8308592 (and likely other potential future backports as well). It is a test-only change which allows a skipped test to be correctly reported to jtreg, rather than it appearing like a successful run.
> 
> The actual code changes to the HotSpot tests to use `SkippedException` were mostly clean. The main manual adaptations involved the placement of `import` statements (8u also doesn't have 8132919: 'Put compiler tests in packages') and copyright headers. Most tests also needed to have the library location `/test/lib` added. This is because the HotSpot tests are currently still using the HotSpot test library, not the top-level library. @zzambers work on this should eventually remove the need to reference both libraries. 
> 
> I've included with this change a number of follow-on changes which were necessary to make the changed tests pass. I don't know how the original version of 8208655 was committed as is, because it contains a number of typos and missing import statements which cause tests to fail.  The follow-up changes are:
> 
> * 8023735 backport. This change introduces the code which is altered by 8208655 to use `SkippedException`. The fix is simple enough to just backport with this change and fix the test in the process. It applied cleanly other than the `@ignore` line which has been replaced in 8u by a `ProblemList.txt` addition which is removed by this backport instead.
> * Addition of `vm.debug`; this is cherry-picked from 8155219: "[TESTBUG] Rewrite compiler/ciReplay/TestVM.sh in java" which first introduced it in later JDKs. The implementation needs to be adapted to work around the absence of `jdk.debug` (JDK-8139986). Using `java.vm.version` matches what happens in the `Platform.java` test library code.
> * 8208701: first fix for typos in 8208655 as committed. Some changes had to be manually applied due to context differences but otherwise a clean backport.
> * 8208706: fixes a missing `import` line in `ConstantGettersTransitionsTest.java`, which was applied manually due to differing context.
> * 8213410 backport which is necessary as 8208655 removes a number of checks altogether, replacing them with `@requires` statements. This is why we need `vm.debug` above and also this change due to the removed 32-bit check in `runtime/CompressedOops/CompressedClassPointers.java`
> * For consistency, the debug build check in `TestLargePageUseForAuxMemory.java` was replaced with vm.debug. In 11u, this is removed t...

Andrew John Hughes has updated the pull request incrementally with three additional commits since the last revision:

 - 8183503: Update hotspot tests to allow for unique test classes directory
 - 8186095: upgrade to jtreg 4.2 b08
 - 8129355: [TESTBUG] runtime FragmentMetaspaceSimple.java fails with java.lang.ClassNotFoundException: test.Empty

-------------

Changes:
  - all: https://git.openjdk.org/jdk8u-dev/pull/387/files
  - new: https://git.openjdk.org/jdk8u-dev/pull/387/files/dee3121f..2608b80d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=387&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=387&range=00-01

  Stats: 93 lines in 3 files changed: 80 ins; 3 del; 10 mod
  Patch: https://git.openjdk.org/jdk8u-dev/pull/387.diff
  Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/387/head:pull/387

PR: https://git.openjdk.org/jdk8u-dev/pull/387


More information about the jdk8u-dev mailing list