[foreign] RFR 8214194: Make TestUpcall & TestDowncall more fine grained

Jorn Vernee jbvernee at xs4all.nl
Sun Nov 25 23:35:48 UTC 2018


Hi,

While in the process of fixing Windows bugs I ran into a crash with both 
TestUpcall and TestDowncall (since fixed).

The problem for me was that it was hard to tell which native function 
the test was actually crashing on, since the only thing that showed up 
in the report was the method filter used as a parameter to jextract.

I have changed these 2 tests to create a single TestNG test for each 
invoked native method, and added stderr prints so you can see when the 
test crashed e.g.

     Calling f11_I_IPS_PP......done
     Calling f15_P_PDS_PFI......done
     Calling f13_F_FSD_FD...

Will mean that the test 'f13_F_FSD_FD' crashed.

I'm also passing in the name of the method that's being called with a 
data provider since the parameters will show up in the test report, you 
can see exactly which methods failed (but didn't crash) e.g:

     test TestDowncall$DowncallTest.testDownCall("f3_V_FPD_"): success
     test TestDowncall$DowncallTest.testDownCall("f7_V_SFS_PII"): failed
     test TestDowncall$DowncallTest.testDownCall("f2_V_ISF_FDI"): success

This really helped me with debugging and it seems like a useful thing to 
have, so I'd like to offer it up as a contribution.

Bug: https://bugs.openjdk.java.net/browse/JDK-8214194
Webrev: 
http://cr.openjdk.java.net/~jvernee/panama/webrevs/maketests/webrev.00/

Cheers,
Jorn


More information about the panama-dev mailing list