[foreign-memaccess+abi] Integrated: 8302990: Reduce duplication in test code
Jorn Vernee
jvernee at openjdk.org
Thu Feb 23 15:18:39 UTC 2023
On Tue, 21 Feb 2023 14:11:40 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> Change existing CallGeneratorHelper-based tests to use the new genTestValue/makeArgSaverCB method that was added as part of better testing for nested structs/unions. The new methods have a generic enough API so that each use-case can be served, and allows removing a bunch of code which generates test values, while at the same time making the test value generation random, which has a chance in the long term to find interesting failures for certain values.
>
> Two additional things in this patch:
> - I've removed the `ABI` field in `TestUpcallBase` in favor of using the already existing `Linker` field in `NativeTestHelper`.
> - I've changed the code that computes a padded layout for structs to call the method in `Utils` we have for that. This also addresses https://bugs.openjdk.org/browse/JDK-8293827
This pull request has now been integrated.
Changeset: f6269d77
Author: Jorn Vernee <jvernee at openjdk.org>
URL: https://git.openjdk.org/panama-foreign/commit/f6269d770067e34d04c2289cf246566445146d0f
Stats: 431 lines in 12 files changed: 92 ins; 256 del; 83 mod
8302990: Reduce duplication in test code
8293827: Padding computed by CallGeneratorHelper can be incorrect
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/panama-foreign/pull/804
More information about the panama-dev
mailing list