RFR: 8290497: some tests in com/sun/jdi fail on localized Windows platform
KIRIYAMA Takuya
duke at openjdk.org
Tue Jul 26 06:30:22 UTC 2022
On Wed, 20 Jul 2022 20:47:31 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> Failed tests call java.lang.ProcessBuilder in direct, so not used command options specified when jtreg command run.
>> To run non-localized tests, the locale options should be added in ProcessBuilder.
>>
>> Could you review this fix, please?
>
> It's unclear to me when/why this is needed. For example, I see we are doing something similar in list003 and repeat001, but these are both recently added tests. None of the other jdb tests are doing this, and I'm not sure what inspired the author of these 2 tests to add the locale support. Why is it that some jdb tests (and many non-jdb tests) require the -J-Duser.language=en -J-Duser.country=US and some don't? I'm just trying to better understand the problem.
>
> Also, can you include more log output in the CR if it would be useful in clarifying what is going wrong when running the test. Is there any useful output other than the exception, which isn't very informative.
@plummercj @alexmenkov
> Why is it that some jdb tests (and many non-jdb tests) require the -J-Duser.language=en -J-Duser.country=US and some don't? I'm just trying to better understand the problem.
This problem ocuurs only when the output of jdb command is localized, such as the usage. Some tests expect non-localized output, such as "Usage:"
> Also, can you include more log output in the CR if it would be useful in clarifying what is going wrong when running the test. Is there any useful output other than the exception, which isn't very informative.
Many tests use jdk.test.lib.process.OutputAnalyzer to check the output of jdb command. OutputAnalyzer prints the localized output of jdb command. We can use this output in the log.
> I agree with Chris, it would be nice to see the failure logs to understand the issue. Also I see 2 tests which use lib.jdb.Jdb class directly: JdbArgTest and JdbOptions. So it would be better to fix Jdb class itself and not JdbTest
The output of jdb command in JdbArgTest and JdbOptions is not localizes. Therefore, 2 tests are passed on localized environment. However, I think it would be better to fix Jdb class itself. I fixed it.
-------------
PR: https://git.openjdk.org/jdk/pull/9549
More information about the serviceability-dev
mailing list