Skip to content

Conversation

@sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Sep 23, 2025

Hi all,

Currently the fatal error message was print to stderr, shows as below. I think it's bettor to print the fatal error message to stderr.

unset JAVA_HOME ; jtreg -version
No java executable at java

unset JAVA_HOME ; jtreg -version > /dev/null
#nothing

The >&2 usage for echo both works on linux and cygwin. I do not have other OS system to verify this change, but I think the risk of this change is low.


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

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 290

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jtreg/pull/290.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 23, 2025

👋 Welcome back syan! 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
Copy link

openjdk bot commented Sep 23, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 23, 2025
@mlbridge
Copy link

mlbridge bot commented Sep 23, 2025

Webrevs

@jaikiran
Copy link
Member

jaikiran commented Sep 26, 2025

Hello @sendaoYan, can you add some more details about what prompted this change? I can understand that printing an error to stderr would seem more logical. However, given that it has been this way forever, if there is no strong reason for changing this, then I think it would be better to leave this as-is.

@sendaoYan
Copy link
Member Author

sendaoYan commented Sep 26, 2025

Hello @sendaoYan, can you add some more details about what prompted this change? I can understand that printing an error to stderr would seem more logical. However, given that it has been this way forever, if there is no strong reason for changing this, then I think it would be better to leave this as-is.

Hi @jaikiran

I want to make this change because I want to use jtreg -version to check if the current jtreg command works properly. Therefore, I'll use the following code to perform a check. If all is well, I'll proceed with the script. The check script is as follows. Why is stdout redirected to /dev/null? In this case, we're not interested in the jtreg version number; we're only interested in the error message when jtreg -version fails to start properly. Currently, all normal and abnormal logs are output to stdout, so it's impossible to disable only the normal version output.

if ! jtreg -version > /dev/null ; then
    echo jtreg -version check fail! >&2
    exit 1
fi
Do the following...Such as running the specific jtreg tests.

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 24, 2025

@sendaoYan This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@sendaoYan
Copy link
Member Author

/touch

@openjdk
Copy link

openjdk bot commented Oct 25, 2025

@sendaoYan The pull request is being re-evaluated and the inactivity timeout has been reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants