Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove printf and vprintf tests #536

Closed

Conversation

@JornVernee
Copy link
Member

@JornVernee JornVernee commented May 14, 2021

This patch removes the printf and vprintf tests, since the symbols are not available on Windows in the UCRT.

gmtime is similarly an inline function that maps to something else, but in that case there is a drop-in replacement symbol name _gmtime64 we can call instead.

This fixes the missing symbol errors in StdLibTest.


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/panama-foreign pull/536/head:pull/536
$ git checkout pull/536

Update a local copy of the PR:
$ git checkout pull/536
$ git pull https://git.openjdk.java.net/panama-foreign pull/536/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 536

View PR using the GUI difftool:
$ git pr show -t 536

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/panama-foreign/pull/536.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 14, 2021

👋 Welcome back jvernee! A progress list of the required criteria for merging this PR into foreign-memaccess+abi will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label May 14, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented May 14, 2021

Copy link
Collaborator

@mcimadamore mcimadamore left a comment

Rather than removing could we disable them on windows? On other platforms they give valuable feedback.

@JornVernee
Copy link
Member Author

@JornVernee JornVernee commented May 14, 2021

As discussed offline, rather than removing the tests, or disabling them on Windows, I've included a helper library that has a function that can give us pointers to generated inline code for the missing functions on Windows. This allows keeping the tests on all platforms.

Copy link
Collaborator

@mcimadamore mcimadamore left a comment

Looks good. One possible simplification would be, since you already have a supporting library for windows, to just define printf/vprintf/gmtime there, and then define a lookup that first looks in systemLookup and then falls back in the loader lookup. In fact, you could define the test lookup always in this way, and just do a System.loadLibrary in the windows case.

@openjdk
Copy link

@openjdk openjdk bot commented May 14, 2021

@JornVernee This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

Remove printf and vprintf tests

Reviewed-by: mcimadamore

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 99 new commits pushed to the foreign-memaccess+abi branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the foreign-memaccess+abi branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label May 14, 2021
test/jdk/java/foreign/StdLibTest.java Outdated Show resolved Hide resolved
test/jdk/java/foreign/NativeTestHelper.java Outdated Show resolved Hide resolved
@JornVernee
Copy link
Member Author

@JornVernee JornVernee commented May 14, 2021

/integrate

@openjdk openjdk bot closed this May 14, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels May 14, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 14, 2021

@JornVernee Since your change was applied there have been 99 commits pushed to the foreign-memaccess+abi branch:

Your commit was automatically rebased without conflicts.

Pushed as commit 5cf3217.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@JornVernee JornVernee deleted the Missing_Symbols branch Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants