[foreign-jextract] Integrated: Test the Java VaList implementation on every platform

Jorn Vernee jvernee at openjdk.java.net
Fri Jul 17 10:55:04 UTC 2020


On Thu, 16 Jul 2020 20:07:30 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Hi,
> 
> This patch re-writes the VaListTest to try and test all the implementations on the different platforms, instead of just
> the implementation for the current platform.
> This results in 4 different versions of each test being run; once for each platform, where the reading of the VaList is
> done in Java as well, and then one native implementation (which corresponds to the status quo). The needed parameters
> are injected into tests using data providers. For the struct tests this was a little tricky, since we need to inject
> the platform specific C_INT/C_LONGLONG/C_FLOAT layouts into the struct layout. This resulted in the current code
> complexity. (As an aside, I think local interface and methods work from Amber could really help this use-case).
> Upcalls are still only tested for the current platform, since the creation of the va_list happens in native code, and
> we only have access to 1 platform in that case :)
> ---
> 
> I've also cleaned up the sumStack test, which wasn't actually using any part of our VaList implementation (it was
> testing varargs), as well as reduced some copy-pasted code which was previously used for debugging, but never collapsed
> back into for-loops afterwards.  Thanks,
> Jorn

This pull request has now been integrated.

Changeset: c2e1eeb2
Author:    Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/c2e1eeb2
Stats:     515 lines in 2 files changed: 53 ins; 335 del; 127 mod

Test the Java VaList implementation on every platform

Reviewed-by: psandoz

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

PR: https://git.openjdk.java.net/panama-foreign/pull/247


More information about the panama-dev mailing list