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

> 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

Probably should have made it  clear in the main PR comment that
you are deleting a bad test.

Thumbs up. This is a trivial fix, but you should wait for a review from
a Serviceability team member.

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

Marked as reviewed by dcubed (Reviewer).

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

Reply via email to