RFR: Initial section on testing [v2]

Jesper Wilhelmsson jwilhelm at openjdk.java.net
Tue Oct 20 02:04:12 UTC 2020


On Mon, 19 Oct 2020 21:46:39 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

>> Changes requested by iignatyev (no project role).
>
>> > Besides the logistical information, I think it would be helpful to add
>> > some conceptual information about JDK testing.
>> 
>> Yes, I think this is a good idea. There is some of this in /doc/hotspot-unit-tests.md but it's GTest specific and very
>> HotSpot centric, so we should have something more generic and suitable for all. I have updated with a few sentences
>> about this. Let me know if you think this needs to be expanded more or have any other suggestions.
> 
> [Writing jtreg tests](https://openjdk.java.net/jtreg/writetests.html) provides generic guidelines about _good_ jtreg
> tests, but I'd say it's generic enough (as it should be as it's part of JTReg's documentation, not OpenJDK
> documentation) and doesn't talk about things which are specific to OpenJDK, e.g. keywords, best practices, common
> libraries, etc. [langtools guidelines]( https://openjdk.java.net/groups/compiler/tests.html), on the other hand,
> provides langtools specific guidelines, some of them are adopted by other test suites, some not. I think it makes sense
> for us to compose some OpenJDK-centric but generic enough guidelines and put them into either this guide or into
> `/doc/jtreg-tests.md` and also have component/area-specific guidelines in `/doc/`.

> 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`.

Ok, I get the high level of what you say here, but I don't have enough detail about how this works to be able to write
a comprehensive description about it.

> I'm totally fine w/ being an uncredited contributor, it's not about fame, it's about doing the right :)

Right. At some point I would like this project to have a few more Committers/Reviewers though, so it for purely selfish
reasons that I want you to be famous ;-)

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

PR: https://git.openjdk.java.net/guide/pull/30


More information about the guide-dev mailing list