RFR(S) : 8166925 : several native TESTs should be changed to TEST_VM

Igor Ignatyev igor.ignatyev at oracle.com
Tue Oct 4 18:08:10 UTC 2016


> On Oct 4, 2016, at 4:13 PM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
> 
>> http://cr.openjdk.java.net/~iignatyev/8166925/webrev.00
> Reviewed.
thank you for review.
> 
>> there are several tests which depend on initialized JVM, but do not declare it (by using TEST_VM macros). here is the list of those tests along w/ observations where/when they need JVM:
>> 
>> 1. all arrayOopDesc tests use arrayOopDesc::header_size_in_bytes which depends on a jvm state, it reads HeapWordSize and UseCompressedClassPointers and furthermore has an assert which checks that their values haven't changed.
>> 2. all utilities/json tests use tty variable (as JSON::_st field), tty initialization is a port of jvm initialization.
>> 3. SymbolTable.temp_new_symbol calls JavaThread::current()
>> 4. LogFileOutput tests use ResourceMark which calls JavaThread::current()
>> 5. LogDecorations.level, uptime, tags and timestamps tests directly or indirectly call os::javaTimeNanos() which assumes that some structures, e.g. Bsd::_timebase_info, are inited
>> 6. LogConfigurationTest tests require ResourceMark or os::javaTimeNanos
> 
> Maybe add these comments to the tests?
I don’t think it will give lots of good, since the mentioned problems are just the first which tests bumped into, there can be other problems in the same tests.
> 
> Best regards,
> Vladimir Ivanov



More information about the hotspot-dev mailing list