JDK-8212932 : [TESTBUG] Clean up TestVirtualSpaceNode test
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-10-24
  • Updated: 2019-08-15
  • Resolved: 2019-02-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b11Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
TestVirtualSpaceNode tests have been disabled by JDK-8198423 and some of its asserts aren't true anymore, the tests should be cleaned up or removed for good. 
Comments
No problem!
27-02-2019

Sorry, I got confused.
27-02-2019

Not sure what you mean with src/hotspot/share/memory/metaspace/virtualSpaceNode.hpp src/hotspot/share/memory/metaspace/virtualSpaceNode.cpp these are implementation files for the metaspace, there are no tests?
27-02-2019

[~stuefe] There are 2 tests: test/hotspot/gtest/memory/test_virtualSpaceNode.cpp and src/hotspot/share/memory/metaspace/virtualSpaceNode.hpp src/hotspot/share/memory/metaspace/virtualSpaceNode.cpp Are we talking here about removing both of them?
27-02-2019

Yes!
27-02-2019

[~stuefe] Is your opinion unchanged that we should remove the test, instead of cleaning it up?
27-02-2019

from 8177711 RFR [~stuefe]: I feel that since 8198423 its usefulness is greatly diminished, and there is a bit of a danger of getting it wrong, messing up global structures in metaspace and affecting follow up tests. Metaspace is not (anymore) designed to be used on this isolated level. I really thought long and hard about this. Unfortunately, this test cannot be done in an isolated fashion anymore without affecting global metaspace - sure you encountered that yourself, hence the terrible (sorry :-) ChunkManagerRestorer workaround. And I do not see a better way to do this. All these tests do now is to ensure that a particular notion of chunk geometry and allocation behavior is adhered to - stuff which may change anyway since it is implementation detail. I do not see any really worthwhile tests. And the fact that since 8198423 any allocation from a VirtualSpaceNode can cause allocation of padding chunks, which get added to the global freelist and hence change global state, makes matters quite complicated. If you want to get ahead with this change, here some remarks: ---- all_vsn_is_committed_half_is_used_by_chunks - can be completely removed IMHO. ---- MetachunkRemover seems to be nowhere used, can this be removed? ---- does this compile with non-pch? Test file seems to miss some headers, e.g. virtualSpaceNode.hpp. Not sure if they come in implicitly. ---- But still, bottomline, I'd rather remove the test. When doing 8198423, I added a new gtest to make up for the now-teethless VSN gtest, see test_metaspace_allocation.cpp. There, I still stress Metaspace but a layer higher, using the same code paths the rest of the code uses when allocating metaspace.
01-11-2018