On Fri, 28 Apr 2023 12:59:26 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

>> This patch adds a dedicated jtreg property to check which CABI is being used 
>> by the JDK, which can be used both to check whether the foreign linker is 
>> supported, and whether the fallback linker is being used. (and, possibly it 
>> can also be use to check for a particular ABI in case we want to add ABI 
>> specific tests).
>> 
>> Checking whether the foreign linker is supported currently requires using an 
>> unwieldy expression that checks if we are running on a platform that has a 
>> foreign linker port. Checking for the fallback linker currently uses 
>> `vm.flavor != "zero"` which is not always correct, since the fallback linker 
>> can also be used on other platforms which are not `zero`.
>> 
>> To initialize the property, VMProps directly reads 
>> `jdk.internal.foreig.CABI::current()`. Since this class is in an internal 
>> package, `--add-exports` flags are added as javac flags and VM flags for the 
>> extra prop definitions class.
>
> Jorn Vernee has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains 44 commits:
> 
>  - Merge branch 'master' into VMProps
>  - use only jdk.CABI property
>  - use extra props to check for linker
>  - Add fallbackLinker vmprop
>  - Merge pull request #3 from JornVernee/IsForeignLinkerSupported
>    
>    rename has_port
>  - rename has_port
>  - Merge pull request #2 from JornVernee/WSL_BB
>    
>    account for missing functional in WSL in TestByteBuffer
>  - account for missing mincore on WSL in TestByteBuffer
>  - Merge branch 'master' into PR_21_V2
>  - 8305369: Issues in zero-length memory segment javadoc section
>  - ... and 34 more: https://git.openjdk.org/jdk/compare/b827ce83...8a6df30e

Thanks for the reveiw. I've added a comment that explains the property.

During testing after the merge I noticed that the `@requires` tags were 
checking against `"UNKNOWN"` while they should have been checking against 
`"UNSUPPORTED"`.

I've fixed this and re-tested on the following configurations:

- Windows/x64, tests full port
- Windows/x86, tests UNSUPPORTED (I also needed to fix an unrelated issues in 
one of the native test libraries for this to work. That is not included in this 
patch)
- Linux/x64 with CABI set to FALLBACK
- Linux/x64/zero (also FALLBACK)

For the latter two to pass, I had to fix an issue in `TestLinker` as well, 
where some test cases brought in by the merge with master were failing on the 
fallback linker, since it doesn't support by-value unions. The fix 
conditionally adds those test cases only when we are not running on the 
fallback linker.

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

PR Comment: https://git.openjdk.org/jdk/pull/13429#issuecomment-1529932049

Reply via email to