On Tue, 31 May 2022 22:34:11 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> Gaurav Chaudhari has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   8285838: Corrected month comparison check for TZ DST
>
> I tried out your patch on my local Linux machine, but the new test failed 
> with the following exception:
> 
> ACTION: main -- Failed. Execution failed: `main' threw exception: 
> java.lang.RuntimeException: Expected to get exit value of [0]
> REASON: User specified action: run main/othervm CustomTzIDCheckDST 
> TIME:   1.564 seconds
> messages:
> command: main CustomTzIDCheckDST
> reason: User specified action: run main/othervm CustomTzIDCheckDST 
> Mode: othervm [/othervm specified]
> elapsed time (seconds): 1.564
> configuration:
> STDOUT:
> Command line: 
> [/home/nsato/projects/jdk/git/jdk/build/linux-x64/images/jdk/bin/java -cp 
> /home/nsato/projects/jdk/git/jdk/build/linux-x64/test-support/jtreg_open_test_jdk_java_util_TimeZone/classes/0/java/util/TimeZone/CustomTzIDCheckDST.d:/home/nsato/projects/jdk/git/jdk/open/test/jdk/java/util/TimeZone:/home/nsato/projects/jdk/git/jdk/build/linux-x64/test-support/jtreg_open_test_jdk_java_util_TimeZone/classes/0/test/lib:/home/nsato/projects/jdk/git/jdk/open/test/lib:/var/tmp/jib-nsato/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/javatest.jar:/var/tmp/jib-nsato/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/jtreg.jar
>  CustomTzIDCheckDST runTZTest ]
> [2022-05-31T22:27:05.958567816Z] Gathering output for process 14771
> [2022-05-31T22:27:06.635595481Z] Waiting for completion for process 14771
> [2022-05-31T22:27:06.635976964Z] Waiting for completion finished for process 
> 14771
> Output and diagnostic info for process 14771 was saved into 
> 'pid-14771-output.log'
> [2022-05-31T22:27:06.663087767Z] Waiting for completion for process 14771
> [2022-05-31T22:27:06.663360403Z] Waiting for completion finished for process 
> 14771
> [2022-05-31T22:27:06.663754609Z] Waiting for completion for process 14771
> [2022-05-31T22:27:06.663869034Z] Waiting for completion finished for process 
> 14771
> STDERR:
>  stdout: [];
>  stderr: [Exception in thread "main" java.time.DateTimeException: Invalid ID 
> for offset-based ZoneId: GMT-22:00
>       at java.base/java.time.ZoneId.ofWithPrefix(ZoneId.java:436)
>       at java.base/java.time.ZoneId.of(ZoneId.java:406)
>       at java.base/java.time.ZoneId.of(ZoneId.java:358)
>       at java.base/java.time.ZoneId.of(ZoneId.java:314)
>       at java.base/java.util.TimeZone.toZoneId0(TimeZone.java:581)
>       at java.base/java.util.TimeZone.toZoneId(TimeZone.java:558)
>       at java.base/java.util.TimeZone.toZoneId0(TimeZone.java:570)
>       at java.base/java.util.TimeZone.toZoneId(TimeZone.java:558)
>       at java.base/java.time.ZoneId.systemDefault(ZoneId.java:274)
>       at CustomTzIDCheckDST.runTZTest(CustomTzIDCheckDST.java:64)
>       at CustomTzIDCheckDST.main(CustomTzIDCheckDST.java:51)
> Caused by: java.time.DateTimeException: Zone offset hours not in valid range: 
> value -22 is not in the range -18 to 18
>       at java.base/java.time.ZoneOffset.validate(ZoneOffset.java:373)
>       at 
> java.base/java.time.ZoneOffset.ofHoursMinutesSeconds(ZoneOffset.java:326)
>       at java.base/java.time.ZoneOffset.of(ZoneOffset.java:257)
>       at java.base/java.time.ZoneId.ofWithPrefix(ZoneId.java:430)
>       ... 10 more
> ]
>  exitValue = 1
> 
> java.lang.RuntimeException: Expected to get exit value of [0]
> 
>       at 
> jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:489)
>       at CustomTzIDCheckDST.main(CustomTzIDCheckDST.java:49)
>       at 
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:578)
>       at 
> com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
>       at java.base/java.lang.Thread.run(Thread.java:1585)
> 
> JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected 
> to get exit value of [0]
> 
> JavaTest Message: shutting down test
> 
> STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Expected to 
> get exit value of [0]

Hi @naotoj ,
I am unable to reproduce the above error you are seeing, and it is passing on 
my linux machine. What is the system default timezone on your local machine? 
Wondering if it will help me see what you are seeing (even though the timezone 
should be overriden via the TZ variable). Looks like the test is not even 
reaching the checks and failing at the point where its simply trying to 
retrieve the current time.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8661

Reply via email to