RFR: 8289612: Change hotspot/jtreg tests to not use Thread.stop
Alan Bateman
alanb at openjdk.org
Fri Jul 15 07:30:58 UTC 2022
On Fri, 15 Jul 2022 00:11:16 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
> The tests are updated to don't use Thread.stop(). Tests whose intention is to verify async exception updated to use jvmti StopThread.
Thanks for doing this. I agree with David that AsyncExceptionOnMonitorEnter AsyncExceptionTest doesn't really need to be started with -agentlib. The can_signal_thread capability can be obtained in the alive phase so JNI code can obtain a JVMTI environment and add this capability.
test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java line 58:
> 56: internalRun1();
> 57: } catch (ThreadDeath td) {
> 58: throw new RuntimeException("Catched ThreadDeath in run() instead of internalRun2() or internalRun1(). receivedThreadDeathinInternal1=" + receivedThreadDeathinInternal1 + "; receivedThreadDeathinInternal2=" + receivedThreadDeathinInternal2);
Drive-by comment: the exception messages mean the lines are 240+ characters line and make it impossible to see changes when using side-by-side diffs. Maybe someday it should be trimming down to something sane.
test/hotspot/jtreg/vmTestbase/gc/gctests/mallocWithGC2/mallocWithGC2.java line 118:
> 116: } catch (Exception e) {
> 117: throw new TestFailure("Test Failed.", e);
> 118: }
Drive-by comment on this source file is that it looks like it uses 8-space indent everywhere, maybe tabs were converted to 8 spaces by mistake?
test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack002.java line 155:
> 153: };
> 154: ***/
> 155: tester.stop = true;
Can the comment "The test hangs on JDK 1.2.2 Classic VM" be removed?
-------------
PR: https://git.openjdk.org/jdk/pull/9505
More information about the hotspot-dev
mailing list