Skip to content

Conversation

@magicus
Copy link
Member

@magicus magicus commented May 27, 2025

This is a redo of JDK-8357048, which had to backed out since it caused testing errors in higher tiers.

The problem was that JTREG_PROBLEM_LIST_PREFIX was not defined before it was used, and when JTREG_BASIC_OPTIONS were no longer implicitly declared as a macro, but instead got a definite assignment, the value of JTREG_PROBLEM_LIST_PREFIX was empty at the time of evaluation.

I have now manually checked each and every += assignment to $1_JTREG_BASIC_OPTIONS, and verified that all variables present is defined earlier.

Here is the original description from JBS:

When building $1_JTREG_BASIC_OPTIONS, it is assumed that the variable is recursively defined and that thus += is lazy.

$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
        -verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
        -concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
        -vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) \
        -vmoption:-Dtest.boot.jdk="$$(BOOT_JDK)" \
        -vmoption:-Djava.io.tmpdir="$$($1_TEST_TMP_DIR)"

If += is eagerly evaluated, the option -timeoutFactor: will get an empty argument and fail.

The problem is the line: $$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS)) might create the variable $1_JTREG_BASIC_OPTIONS "simply expanded" (the expansion will create an assignment using :=). Whereas if the variable is not created the first += will be recursive and will work as expected.

One solution to this problem is replacing the three assignments in SetJtregValue from := to =. This might have other side effects.

A more conservative solution might be to create another macro (thus not changing behaviour where strict evaluation might be needed):

define SetJtregRecursiveValue
  ifneq ($$($2), )
    $1_$2 = $$($2)
  else
    ifneq ($$($$($1_COMPONENT)_$2), )
      $1_$2 = $$($$($1_COMPONENT)_$2)
    else
      ifneq ($3, )
        $1_$2 = $3
      endif
    endif
  endif
endef

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-8357510: [REDO] RunTest variables should always be assigned (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 25475

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 27, 2025

👋 Welcome back ihse! 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 May 27, 2025

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

8357510: [REDO] RunTest variables should always be assigned

Reviewed-by: erikj

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 22 new commits pushed to the master 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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label May 27, 2025
@openjdk
Copy link

openjdk bot commented May 27, 2025

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

  • build

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 build build-dev@openjdk.org label May 27, 2025
@mlbridge
Copy link

mlbridge bot commented May 28, 2025

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 28, 2025
@magicus
Copy link
Member Author

magicus commented May 28, 2025

/integrate

@openjdk
Copy link

openjdk bot commented May 28, 2025

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 28, 2025

@magicus Pushed as commit a4f870d.

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

@magicus magicus deleted the redo-RunTest-assigned branch May 30, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build build-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants