RFR: Initial section on testing [v5]

Igor Ignatyev igor.ignatyev at oracle.com
Tue Oct 20 00:38:29 UTC 2020



> On Oct 19, 2020, at 4:05 PM, Jesper Wilhelmsson <jwilhelm at openjdk.java.net> wrote:
> 
> On Mon, 19 Oct 2020 21:28:32 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:
> 
>>> Ok. The text has been updated to include this information.
>> 
>> Although you updated Gtest's introduction paragraph to reflect that as of now gtest is for hotspot only, I think it
>> needs to be said here as well.
>>> The Google Test (GTest) framework is intended for unit testing of the C++ native code.
>> 
>> this statement can also create an inadequate impression that you can't/shouldn't test native code w/ jtreg, this isn't
>> the case as one can a) test native code thru java API; b) use native test code in jtreg tests.
>> btw, point b) might deserve a sentence or two in JTreg section of this document.
> 
> Please provide a sentence or two about b).
what I meant by b) is to have C/C++ test code which calls functions exported by JDK/JVM (such as `JNI_CreateJavaVM`, `ZIP_Open`, `JAWT_DrawingSurfaceInfo::GetDrawingSurfaceInfo`, `jvmtiEnv::GetAllModules`, etc), have that code compiled into shared library and/or executable; and then use in a jtreg test which has `/native`. A simplest example would be `test/hotspot/jtreg/native_sanity/JniVersion.java` and `libJniVersion.c`.

> Or maybe add that as a separate change so that you get proper credit for it
> and can become a Committer soon :-)
> 
I'm totally fine w/ being an uncredited contributor, it's not about fame, it's about doing the right :)
> -------------
> 
> PR: https://git.openjdk.java.net/guide/pull/30



More information about the guide-dev mailing list