Skip to content

linker: Add tests for various type comparisons#2613

Merged
s-perron merged 1 commit intoKhronosGroup:masterfrom
blue42u:linker_type_match_tests
May 24, 2019
Merged

linker: Add tests for various type comparisons#2613
s-perron merged 1 commit intoKhronosGroup:masterfrom
blue42u:linker_type_match_tests

Conversation

@blue42u
Copy link
Copy Markdown
Contributor

@blue42u blue42u commented May 22, 2019

This adds a number of tests that check that all types will match to identically written clones during linking, including nearly every Type and some combinations (e.g. Functions of Arrays of Floats). Intent is for use with #2580, however that PR focuses on issues with TypeArray whereas these tests are (more) comprehensive and test more subtle (and possibly incorrect) cases.

A number of these tests fail (and are disabled to pass CI checks), many are fixed by the aforementioned PR. Some additional tests involving TypeForwardPointer cause assertion failures, although the cases they describe are more rare.

This adds a number of tests that check that all types will match to
identically written clones during linking, including nearly every Type
and some combinations (e.g. Functions of Arrays of Floats). Intent is
for use with KhronosGroup#2580,
however that PR focuses on issues with TypeArray whereas these tests are
(more) comprehensive and test more subtle (and possibly incorrect)
cases.

A number of these tests fail, many are fixed by the aforementioned PR.
Some additional tests involving TypeForwardPointer are currently
disabled as they cause assertion failures.
@blue42u blue42u force-pushed the linker_type_match_tests branch from c25d1ab to fe5a18e Compare May 22, 2019 22:36
@blue42u
Copy link
Copy Markdown
Contributor Author

blue42u commented May 23, 2019

@pierremoreau please have a look and let me know if there are any mistakes. The tests are cases where the matched types are identical (byte-for-byte, but not just equivalent where for e.g. the constant’s types differ), so they should be helpful for development on #2580 etc.

@pierremoreau
Copy link
Copy Markdown
Contributor

Thanks, I’ll have a look at it tomorrow.

I have been re-writing the code in #2580 to have all the checking done in Array::IsSameImpl() rather than creating a separate function. I finally have something working, so this is going to be quite useful to test it out! (I’ll need to also add the ForwardPointer handling, but it should be relatively straightforward compared to the Array handling.)

@s-perron s-perron self-requested a review May 24, 2019 18:13
@s-perron s-perron merged commit 3b5ab54 into KhronosGroup:master May 24, 2019
@blue42u blue42u deleted the linker_type_match_tests branch May 29, 2019 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants