Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm包时区相关用例TestZoneRules.java、NegativeDSTTest.java报错 #184

Open
sendaoYan opened this issue Nov 28, 2023 · 1 comment
Open
Assignees

Comments

@sendaoYan
Copy link
Collaborator

x86: https://tone.aliyun-inc.com/ws/xesljfzh/test_result/248397?tab=1

【环境准备】

BINARY_URL=https://compiler-ci-bucket.oss-cn-hangzhou.aliyuncs.com/koji/20231120-141154-241-#9-linux.x86_64.release.fake_branch-java-17-alibaba-dragonwell-17.0.9.0.10.9.1.al8.jdk-rpm.tar.gz
TEST_IMAGE=oss://compiler-ci-bucket/dragonwell17/20231114-002504-781-#153-linux.x86_64.release.standard-effce46066d79b05140bee59cff5a8591bf9f1fe.test-image.tar.gz
git clone https://github.com/dragonwell-project/dragonwell17.git  jdk-repo
test=jdk-repo/test/jdk/java/time/test/java/time/zone/TestZoneRules.java
jtreg -va -nr -w tmp $test

【对比测试】

dragonwell17 tar版本没有问题.
wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/17.0.9.0.10%2B9/Alibaba_Dragonwell_Standard_17.0.9.0.10%2B9_x64_linux.tar.gz\

[root@iZbp1hmgsldsm4l82drivdZ bin]# ./java -version; ./java -Xinternalversion
openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment (Alibaba Dragonwell Standard Edition)-17.0.9.0.10+9-GA (build 17.0.9+9)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Standard Edition)-17.0.9.0.10+9-GA (build 17.0.9+9, mixed mode, sharing)
OpenJDK 64-Bit Server VM (17.0.9+9) for linux-amd64 JRE (17.0.9+9), built on Oct 17 2023 00:00:00 by "dragonwell" with gcc 7.5.0

temurin17 没有问题
wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.9%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.9_9.tar.gz

[root@iZbp1eqvwk9o1gtluk2ijpZ bin]# ./java -version; ./java -Xinternalversion
openjdk version "17.0.9" 2023-10-17
OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)
OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode, sharing)
OpenJDK 64-Bit Server VM (17.0.9+9) for linux-amd64 JRE (17.0.9+9), built on Oct 17 2023 00:00:00 by "admin" with gcc 10.3.0

【用例日志】

STDOUT:
test test.java.time.zone.TestZoneRules.test_EmptyTransitionList(7, 1, 2, -1, true): success
test test.java.time.zone.TestZoneRules.test_EmptyTransitionList(-7, 1, 1, 0, false): success
test test.java.time.zone.TestZoneRules.test_IsFixedOffset(java.time.zone.ZoneRules@4bc38c07, true): success
test test.java.time.zone.TestZoneRules.test_IsFixedOffset(java.time.zone.ZoneRules@49d79b4e, true): success
test test.java.time.zone.TestZoneRules.test_IsFixedOffset(java.time.zone.ZoneRules@6c2a4f6f, false): success
test test.java.time.zone.TestZoneRules.test_IsFixedOffset(java.time.zone.ZoneRules@25fb4913, false): success
test test.java.time.zone.TestZoneRules.test_IsFixedOffset(java.time.zone.ZoneRules@64a1ef9c, false): success
test test.java.time.zone.TestZoneRules.test_IsFixedOffset(java.time.zone.ZoneRules@74a81cfb, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Dublin, 1970-06-23, +01:00, Z, true): failure
java.lang.AssertionError: expected [Z] but found [+01:00]
        at org.testng.Assert.fail(Assert.java:99)
        at org.testng.Assert.failNotEquals(Assert.java:1037)
        at org.testng.Assert.assertEqualsImpl(Assert.java:140)
        at org.testng.Assert.assertEquals(Assert.java:122)
        at org.testng.Assert.assertEquals(Assert.java:617)
        at test.java.time.zone.TestZoneRules.test_NegativeDST(TestZoneRules.java:152)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.testng.TestRunner.privateRun(TestRunner.java:764)
        at org.testng.TestRunner.run(TestRunner.java:585)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:840)
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Dublin, 1971-06-23, +01:00, Z, true): failure
java.lang.AssertionError: expected [Z] but found [+01:00]
        at org.testng.Assert.fail(Assert.java:99)
        at org.testng.Assert.failNotEquals(Assert.java:1037)
        at org.testng.Assert.assertEqualsImpl(Assert.java:140)
        at org.testng.Assert.assertEquals(Assert.java:122)
        at org.testng.Assert.assertEquals(Assert.java:617)
        at test.java.time.zone.TestZoneRules.test_NegativeDST(TestZoneRules.java:152)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.testng.TestRunner.privateRun(TestRunner.java:764)
        at org.testng.TestRunner.run(TestRunner.java:585)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:840)
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Dublin, 1971-11-01, Z, Z, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Dublin, 2019-06-23, +01:00, Z, true): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Dublin, 2019-12-23, Z, Z, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Prague, 1946-09-30, +02:00, +01:00, true): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Prague, 1946-10-10, +01:00, +01:00, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Prague, 1946-12-03, Z, Z, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Prague, 1947-02-25, +01:00, +01:00, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Europe/Prague, 1947-04-30, +02:00, +01:00, true): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Windhoek, 1994-03-23, +01:00, +01:00, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Windhoek, 2016-09-23, +02:00, +01:00, true): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Casablanca, 1939-09-13, +01:00, Z, true): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Casablanca, 1939-11-20, Z, Z, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Casablanca, 2018-06-18, +01:00, Z, true): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Casablanca, 2019-01-01, +01:00, Z, true): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Casablanca, 2019-05-06, Z, Z, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Casablanca, 2037-10-05, Z, Z, false): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Casablanca, 2037-11-16, +01:00, Z, true): success
test test.java.time.zone.TestZoneRules.test_NegativeDST(Africa/Casablanca, 2038-11-08, +01:00, Z, true): success
test test.java.time.zone.TestZoneRules.test_TransitionBeyondDay(Asia/Tokyo, 1948-09-12T01:00, +10:00, +09:00): success
test test.java.time.zone.TestZoneRules.test_TransitionBeyondDay(Asia/Tokyo, 1949-09-11T01:00, +10:00, +09:00): success
test test.java.time.zone.TestZoneRules.test_TransitionBeyondDay(Asia/Tokyo, 1950-09-10T01:00, +10:00, +09:00): success
test test.java.time.zone.TestZoneRules.test_TransitionBeyondDay(Asia/Tokyo, 1951-09-09T01:00, +10:00, +09:00): success
test test.java.time.zone.TestZoneRules.test_TransitionLastRuleYear(): success

===============================================
java/time/test/java/time/zone/TestZoneRules.java
Total tests run: 33, Passes: 31, Failures: 2, Skips: 0
===============================================

STDERR:
java.lang.Exception: failures: 2
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
        at java.base/java.lang.Thread.run(Thread.java:840)

JavaTest Message: Test threw exception: java.lang.Exception: failures: 2
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 2


【版本信息】

[root@iZbp1hmgsldsm4l82drivdZ jtreg]# uname -a ; cat /etc/os-release ; free -h; lscpu| head -n 25;java -version; java -Xinternalversion
Linux iZbp1hmgsldsm4l82drivdZ 5.10.134-15.al8.x86_64 #1 SMP Thu Jul 20 00:44:04 CST 2023 x86_64 x86_64 x86_64 GNU/Linux
NAME="Alibaba Cloud Linux"
VERSION="3 (Soaring Falcon)"
ID="alinux"
ID_LIKE="rhel fedora centos anolis"
VERSION_ID="3"
PLATFORM_ID="platform:al8"
PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)"
ANSI_COLOR="0;31"
HOME_URL="https://www.aliyun.com/"

              total        used        free      shared  buff/cache   available
Mem:           61Gi       593Mi        52Gi       3.0Mi       8.1Gi        60Gi
Swap:            0B          0B          0B
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              16
On-line CPU(s) list: 0-15
Thread(s) per core:  2
Core(s) per socket:  8
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
BIOS Vendor ID:      Alibaba Cloud
CPU family:          6
Model:               143
Model name:          Intel(R) Xeon(R) Platinum 8475B
BIOS Model name:     pc-i440fx-2.1
Stepping:            8
CPU MHz:             3198.741
CPU max MHz:         3800.0000
CPU min MHz:         800.0000
BogoMIPS:            5400.00
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           48K
L1i cache:           32K
L2 cache:            2048K
openjdk version "17.0.9.9" 2023-11-17
OpenJDK Runtime Environment (Alibaba Dragonwell) (build 17.0.9.9+9)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell) (build 17.0.9.9+9, mixed mode)
OpenJDK 64-Bit Server VM (17.0.9.9+9) for linux-amd64 JRE (17.0.9.9+9), built on Nov 17 2023 03:05:05 by "mockbuild" with gcc 10.2.1 20200825 (Alibaba 10.2.1-3.5 2.32)

@JoshuaZhuwj
Copy link
Collaborator

JoshuaZhuwj commented Dec 18, 2023

TimeZone jtreg test failures were caused by tzdb.dat (timezone database).
The test cases in this issue could pass jtreg verification with lib/tzdb.dat in tar package.
However tzdb.dat file is a symbolic link once rpm package is installed.

/usr/lib/jvm/java-17-alibaba-dragonwell-17.0.9.0.10.9-1.al8.x86_64/lib/tzdb.dat -> /usr/share/javazi-1.8/tzdb.dat

It points to the tzdb.dat file from javazi instead of tzdb.dat generated in jdk building process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants