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

Jorn Vernee jvernee at openjdk.java.net
Fri Jul 17 10:46:53 UTC 2020


> 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

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  Change the naming of test methods

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

Changes:
  - all: https://git.openjdk.java.net/panama-foreign/pull/247/files
  - new: https://git.openjdk.java.net/panama-foreign/pull/247/files/0a4715a5..33e88271

Webrevs:
 - full: https://webrevs.openjdk.java.net/panama-foreign/247/webrev.01
 - incr: https://webrevs.openjdk.java.net/panama-foreign/247/webrev.00-01

  Stats: 28 lines in 1 file changed: 0 ins; 0 del; 28 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/247.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/247/head:pull/247

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


More information about the panama-dev mailing list