-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
Webrevs
|
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); | ||
} |
There was a problem hiding this comment.
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);
There was a problem hiding this comment.
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 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@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:
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
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 |
Thanks for the reviews ! /integrate |
Going to push as commit ebac7ee.
Your commit was automatically rebased without conflicts. |
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
Issue
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