Integrated: 8285383: vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java failed with "exit code: 96"

Alex Menkov amenkov at openjdk.org
Tue Sep 20 18:21:09 UTC 2022


On Fri, 16 Sep 2022 23:24:29 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

> The fix deletes bad test.
> 
> Background:
> The test does not work as described in the test summary.
> It supposed to redefine test class from ClassLoad/ClassFileLoadHook/ClassPrepare/ClassFileLoadHook callbacks and then suspend the thread and do PopFrame, but actually it does a single redefinition from ClassPrepare. Redefinition from ClassLoad never happens, redefinition from ClassFileLoadHook is commented out.
> 
> Actually the scenario is not good at all.
> ClassLoad, ClassPrepare and ClassFileLoadHook events are wrong places to redefine classes.
> When we redefine a class and try to redefine it again from ClassLoad we actually cannot redefine it. 2nd (3rd, etc.) redefinition should complete before the 1st one, and 2nd version of the class becomes obsolete immediately.
> ClassFileLoadHook can be used to replace class bytes, but it should return new class bytes via parameters instead of calling redefineClasses.
> Testing for PopFrame does not add any value. With the scenario all redefinition happen before the test object is created, so this PopFrame has nothing to do with class redefinition.
> Class redefinition when some methods of the class are executed is covered by other tests from vmTestbase/nsk/jvmti/scenarios/hotswap

This pull request has now been integrated.

Changeset: 21008cad
Author:    Alex Menkov <amenkov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/21008cad46d53a34715037d1ec1ca53a43a549db
Stats:     735 lines in 8 files changed: 0 ins; 735 del; 0 mod

8285383: vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java failed with "exit code: 96"

Reviewed-by: dcubed, lmesnik, sspitsyn

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

PR: https://git.openjdk.org/jdk/pull/10318


More information about the serviceability-dev mailing list