On Mon, 18 Sep 2023 18:49:43 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> > CDS tests are not happy with changing the class hierarchy of the 
> > LingeredApp. Unless it is easily solved for the CDS test I will revert 
> > those changes and have the 'TestObjectMonitorIterate' just do a less 
> > precise check of a lock on a Object. In the current JDK for LM_LEGACY and 
> > LM_LIGHTWEIGHT the `steadyStateObj` is the only Object object with a 
> > monitor when the SA agent queries.
> 
> I preferred your original fix to the test. Can you explain what the CDS issue 
> test was? The tests shouldn't be written in such a way that makes it hard to 
> extend functionality in LingeredApp.

I had the same issue when I fixed the InMemoryCompiler test lib we have. That 
time I had to update quite a few CDS files to make it work (so in the end the 
fix was rewritten to no change the class hierarchy). Is seems like the Strings 
for the `LingeredApp` CDS tests are all in one shared file. So I will update 
the relevant CDS file and test that it works. As revert the last changes. 

I agree that it is much better with a named class.

There are quite some parts of the test libraries that the CDS tests have 
dependencies on.

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

PR Comment: https://git.openjdk.org/jdk/pull/15782#issuecomment-1724955489

Reply via email to