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

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Tue Oct 4 13:13:51 UTC 2016


> http://cr.openjdk.java.net/~iignatyev/8166925/webrev.00
Reviewed.

> 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?

Best regards,
Vladimir Ivanov


More information about the hotspot-dev mailing list