[foreign-memaccess+abi] RFR: 8299730: Add trivial call linker option [v3]
Jorn Vernee
jvernee at openjdk.org
Tue Jan 24 19:51:34 UTC 2023
On Tue, 24 Jan 2023 18:30:44 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Javadoc nits
>>
>> Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore at users.noreply.github.com>
>
> test/jdk/java/foreign/trivial/TestTrivial.java line 46:
>
>> 44: import static org.testng.Assert.assertEquals;
>> 45:
>> 46: public class TestTrivial extends NativeTestHelper {
>
> Should we perhaps have another subclass of `TestDowncallBase` to test all combinations - just in case?
Seems like overkill, tbh, since `trivial` doesn't affect any of the classification logic. I'm already testing all the cases that are handled differently by the downcall stub (where `trivial` does matter).
Also, ultimately the stuff covered by TestDowncall is limited (no unions, nested structs, array members. Limited set of primitive types). I think long term I'd rather implement some kind of fuzzing-based test, where we generate an arbitrary FunctionDescriptor/linker options/C function, and then try to link and call that. But this requires generating and compiling C code on the fly during the tests (which I expect will be problematic to get working).
-------------
PR: https://git.openjdk.org/panama-foreign/pull/771
More information about the panama-dev
mailing list