[jdk8u-dev] RFR: 8208655: use JTreg skipped status in hotspot tests
Andrew John Hughes
andrew at openjdk.org
Wed Nov 22 06:05:26 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 through the enhancement [JDK-8152491](https://bugs.openjdk.org/browse/JDK-8152491): "Convert TracePageSizes to use UL"
Absent tests were omitted. Some may be worth a later backport and should ideally use `SkippedException` in backporting.
* `test/compiler/codecache/dtrace/SegmentedCodeCacheDtraceTest.java` - 8059625: JEP-197 JDK-8043304: Test task: DTrace- tests for segmented codecache feature
* `test/compiler/intrinsics/base64/TestBase64.java` - 8205528: Base64 encoding algorithm using AVX512 instructions
* `test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java` - 8136421: JEP 243: Java-Level JVM Compiler Interface
* `test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java` -- 8141445: Use of Solaris/SPARC M7 libadimalloc.so can generate unknown signal in hs_err file
* `test/runtime/signal/SigTestDriver.java` -- JDK-8200126 Open source VM runtime signal tests (needs dep JDK-8072842)
* `test/serviceability/jvmti/NotifyFramePop/NotifyFramePopTest.java` -- 8187289: NotifyFramePop request is not cleared if JVMTI_EVENT_FRAME_POP is disabled
* `test/serviceability/sa/ClhsdbCDSCore.java` -- 8174994: SA: clhsdb printmdo throws WrongTypeException when attached to a process with CDS
* `test/serviceability/sa/ClhsdbCDSJstackPrintAll.java` -- 8174994: SA: clhsdb printmdo throws WrongTypeException when attached to a process with CDS
* `test/serviceability/sa/ClhsdbInspect.java` -- 8192985: SA: Test cases for the clhsdb 'inspect', 'scanoops' and 'printas' commands
* `test/serviceability/sa/ClhsdbJdis.java` -- 8193124: SA: Testcases for clhsdb jdis and findpc commands
* `test/serviceability/sa/ClhsdbLongConstant.java` -- 8190198: SA: Framework for writing 'jhsdb clhsdb' commands tests and testcases for some of the commands
* `test/serviceability/sa/ClhsdbPrintAs.java` -- 8192985: SA: Test cases for the clhsdb 'inspect', 'scanoops' and 'printas' commands
* `test/serviceability/sa/ClhsdbRegionDetailsScanOopsForG1.java` -- 8175312: SA: clhsdb: Provide an improved heap summary for 'universe' for G1GC
* `test/serviceability/sa/ClhsdbScanOops.java` -- 8192985: SA: Test cases for the clhsdb 'inspect', 'scanoops' and 'printas' commands
* `test/serviceability/sa/DeadlockDetectionTest.java` -- 8086134: Deadlock detection fails to attach to core file
* `test/serviceability/sa/TestJmapCore.java` -- 8203491: [TESTBUG] Port heapdump tests into java
* `test/vmTestbase/gc/g1/unloading/UnloadingTest.java` -- 8199370: [TESTBUG] Open source vm testbase GC tests
* `test/vmTestbase/nsk/jdi/AttachingConnector/attach/attach004/TestDriver.java` -- 8199382: [TESTBUG] Open source VM testbase JDI tests
* `test/vmTestbase/nsk/monitoring/stress/thread/strace001.java` -- 8199375: [TESTBUG] Open source vm testbase monitoring tests
The following two are present, but in much older versions in different locations:
* `test/compiler/codegen/aes/TestAESMain.java` -> `./test/compiler/7184394/TestAESMain.java 8207153: Some intrinsic tests take long time to run`
* `test/compiler/codegen/aes/TestCipherBlockChainingEncrypt.java` -> `./test/compiler/8209951/TestCipherBlockChainingEncrypt.java` 8219513: compiler/codegen/aes/TestCipherBlockChainingEncrypt.java timeout on Solaris-sparc
-------------
Commit messages:
- 8213410: UseCompressedOops requirement check fails fails on 32-bit system
- 8208706: compiler/tiered/ConstantGettersTransitionsTest.java fails to compile
- 8208701: Fix for JDK-8208655 causes test failures in CI tier1
- Support vm.debug
- 8023735: [TESTBUG] runtime/XCheckJniJsig/XCheckJSig.java fails on MacOS X
- Backport 17b730d7edf7be91ee841180ea6a59b26c0c567a
Changes: https://git.openjdk.org/jdk8u-dev/pull/387/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=387&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8208655
Stats: 266 lines in 32 files changed: 114 ins; 85 del; 67 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