In `SetJtregValue` and `SetMicroValue`, if a default or user-supplied value was given, the corresponding "local" variable was assigned using :=, which will force future eager evaluation of the variable, most notably `+=`. However, if no default nor user-assigned value was given, the variable was not defined at all, which would lead the first `+=` to create a lazy evaluated definition (a macro).
Since this was the common behavior for `JTREG_BASIC_OPTIONS`, we did not notice that `JTREG_TIMEOUT_FACTOR` did not have a value when it was used, but that it was assigned later. This made the evaluation broke when we set that variable on the command line and thus forcing eager definition. The fix is to make sure JTREG_TIMEOUT_FACTOR is defined before use. I also changed so SetJtregValue always assigns with :=, so a similar problem could not creep in again. The same problem also existed in SetMicroValue, so I fixed it there too. (There were no bugs caused by this, though.) ------------- Commit messages: - 8357048: RunTest variables should always be assigned Changes: https://git.openjdk.org/jdk/pull/25327/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25327&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8357048 Stats: 6 lines in 1 file changed: 5 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/25327.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25327/head:pull/25327 PR: https://git.openjdk.org/jdk/pull/25327