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

JDK-8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH #13041

Closed
wants to merge 2 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Mar 15, 2023

The test fails on Alpine Linux 3.17, when checking the environment variable LD_LIBRARY_PATH; looks like the actual env variable is much longer than the test expects. It turned out that at least on Linux (probably also on other OS like AIX) the actual env variable has the expected string at it's end, but might contain more path entries ( LD_LIBRARY_PATH can be adjusted by jvm - https://github.com/openjdk/jdk/blob/master/src/java.base/unix/native/libjli/java_md.c ).


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/13041/head:pull/13041
$ git checkout pull/13041

Update a local copy of the PR:
$ git checkout pull/13041
$ git pull https://git.openjdk.org/jdk pull/13041/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13041

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13041.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 15, 2023

👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into master 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 Pull request is ready for review label Mar 15, 2023
@openjdk
Copy link

openjdk bot commented Mar 15, 2023

@MBaesken The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Mar 15, 2023
@mlbridge
Copy link

mlbridge bot commented Mar 15, 2023

Webrevs

Comment on lines 86 to 93
String msg = String.format("Check value of %s env variable", envVarName);
if (TKit.isLinux()) {
if (! actualEnvVarValue.endsWith(expectedEnvVarValue)) {
TKit.assertTrue(false, msg);
}
} else {
TKit.assertEquals(expectedEnvVarValue, actualEnvVarValue, msg);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep the check as a single statement:

TKit.assertTextStream(expectedEnvVarValue)
    .predicate(TKit.isLinux() ? String::endsWith : String::equals)
    .label(String.format("value of %s env variable", envVarName))
    .apply(Stream.of(actualEnvVarValue));

It also will produce a nicer log record than TKit.assertTrue(false, msg);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Alexey, I adjusted the check following your advice .

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@openjdk
Copy link

openjdk bot commented Mar 16, 2023

@MBaesken 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:

8304063: tools/jpackage/share/AppLauncherEnvTest.java fails when checking LD_LIBRARY_PATH

Reviewed-by: asemenyuk, almatvee

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 23 new commits pushed to the master branch:

  • a487a27: 8303150: DCmd framework unnecessarily creates a DCmd instance on registration
  • 2e987d7: 8304360: Test to ensure ConstantDescs fields work
  • 2f23c80: 8304225: Remove javax/script/Test7.java from ProblemList
  • 96889bf: 8191565: Last-ditch Full GC should also move humongous objects
  • f629152: 8304055: G1: Remove OldGCAllocRegion::release
  • b5108b4: 8303749: Serial: Use more strict card table API
  • 7dbab81: 8304161: Add TypeKind.from to derive from TypeDescriptor.OfField
  • d4eb395: 8303684: Lift upcall sharing mechanism to AbstractLinker (mainline)
  • dfc7214: 8304283: Modernize the switch statements in jdk.internal.foreign
  • 7277bb1: 8293324: ciField.hpp has two methods to return field's offset
  • ... and 13 more: https://git.openjdk.org/jdk/compare/349139b2ccec57ad5d500b81b1d225af9e17a5e7...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 16, 2023
@MBaesken
Copy link
Member Author

Thanks for the reviews !

/integrate

@openjdk
Copy link

openjdk bot commented Mar 17, 2023

Going to push as commit ebac7ee.
Since your change was applied there have been 26 commits pushed to the master branch:

  • 36995c5: 8304242: CPUInfoTest fails because "serialize" CPU feature is not known
  • 6b42275: 7154070: in SwingSet2, switching between LaFs it's easy to lose JTable dividers
  • 8eed7de: 8304146: Refactor VisibleMemberTable (LocalMemberTable)
  • a487a27: 8303150: DCmd framework unnecessarily creates a DCmd instance on registration
  • 2e987d7: 8304360: Test to ensure ConstantDescs fields work
  • 2f23c80: 8304225: Remove javax/script/Test7.java from ProblemList
  • 96889bf: 8191565: Last-ditch Full GC should also move humongous objects
  • f629152: 8304055: G1: Remove OldGCAllocRegion::release
  • b5108b4: 8303749: Serial: Use more strict card table API
  • 7dbab81: 8304161: Add TypeKind.from to derive from TypeDescriptor.OfField
  • ... and 16 more: https://git.openjdk.org/jdk/compare/349139b2ccec57ad5d500b81b1d225af9e17a5e7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 17, 2023
@openjdk openjdk bot closed this Mar 17, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 17, 2023
@openjdk
Copy link

openjdk bot commented Mar 17, 2023

@MBaesken Pushed as commit ebac7ee.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants