Compare commits

...

55 Commits

Author SHA1 Message Date
Anton Bobrov
1bb3ed339b 8314164: java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java fails intermittently in timeout
Backport-of: fbaaac63d4
2024-02-27 12:21:58 +00:00
Aleksey Shipilev
d2d988af90 8292182: [TESTLIB] Enhance JAXPPolicyManager to setup required permissions for jtreg version 7 jar
Backport-of: aa5b718933
2024-02-27 10:28:55 +00:00
Aleksey Shipilev
64269a3c5a 8285756: clean up use of bad arguments for @clean in langtools tests
Backport-of: 3312d8c620
2024-02-27 10:20:22 +00:00
Amos Shi
7bed7f1b2d 8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11
Reviewed-by: mbaesken
Backport-of: d6ad2f1715
2024-02-27 09:53:45 +00:00
Aleksey Shipilev
10f08844e5 8207855: Make applications/jcstress invoke tests in batches
Backport-of: 4805473049
2024-02-27 09:37:45 +00:00
Anton Bobrov
a855cab3e3 8308336: Test java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java failed: java.net.BindException: Address already in use
Backport-of: a48bcf3671
2024-02-27 09:26:38 +00:00
Sergey Bylokhov
a60a5c4305 8321151: JDK-8294427 breaks Windows L&F on all older Windows versions
Backport-of: f695ca5884
2024-02-26 18:20:14 +00:00
Anton Bobrov
93c5f7c50d 8326503: [11u] java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java fail because of package org.junit.jupiter.api does not exist
Reviewed-by: sgehwolf
2024-02-26 15:50:06 +00:00
Aleksey Shipilev
8dc28922c2 8323515: Create test alias "all" for all test roots
Reviewed-by: phh
Backport-of: 8b9bf75880
2024-02-26 08:53:41 +00:00
Andrew Lu
e075097dc8 8294158: HTML formatting for PassFailJFrame instructions
Backport-of: 14090ef603
2024-02-26 07:07:45 +00:00
Andrew John Hughes
ea06b5c966 8321480: ISO 4217 Amendment 176 Update
Reviewed-by: goetz
Backport-of: 223018a3aa
2024-02-23 17:20:35 +00:00
Andrew Lu
776f1e31a9 8294535: Add screen capture functionality to PassFailJFrame
Backport-of: dbb788f34d
2024-02-23 09:06:04 +00:00
Goetz Lindenmaier
6711fc8da7 8321408: Add Certainly roots R1 and E1
Reviewed-by: shade
Backport-of: e8f7eaeefe
2024-02-23 08:46:52 +00:00
Andrew Lu
43a56c89c6 8307299: Move more DnD tests to open
Backport-of: 950c5df859
2024-02-23 07:54:04 +00:00
Andrew Lu
fe8c20c8de 8306681: Open source more AWT DnD related tests
Backport-of: 05af487a2d
2024-02-23 02:29:30 +00:00
SendaoYan
30dfe8115d 8323640: [TESTBUG]testMemoryFailCount in jdk/internal/platform/docker/TestDockerMemoryMetrics.java always fail because OOM killed
Backport-of: 791b427f44
2024-02-22 18:04:31 +00:00
Anton Bobrov
1b207cc9cc 8054022: HttpURLConnection timeouts with Expect: 100-Continue and no chunking
Backport-of: 78839e9815
2024-02-22 09:53:46 +00:00
Amos Shi
f4cf239df1 8315602: Open source swing security manager test
Reviewed-by: rrich
Backport-of: fd6442c079
2024-02-22 07:53:30 +00:00
Andrew Lu
398f486c2a 8306812: Open source several AWT Miscellaneous tests
Backport-of: c494770ca0
2024-02-22 02:59:43 +00:00
Andrew Lu
aeb6381306 8306640: Open source several AWT TextArea related tests
Backport-of: 169a7c27a7
2024-02-22 02:56:17 +00:00
Andrew Lu
97241329cf 8306752: Open source several container and component AWT tests
Backport-of: 88d9ebf8e8
2024-02-22 02:55:56 +00:00
Andrew Lu
c9052141c1 8306755: Open source few Swing JComponent and AbstractButton tests
Backport-of: f3e8bd1d11
2024-02-22 02:55:28 +00:00
Andrew John Hughes
382942dffb 8326109: GCC 13 reports maybe-uninitialized warnings for jni.cpp with dtrace enabled
Reviewed-by: phh
2024-02-21 16:44:58 +00:00
Andrew Lu
de3ae6f265 8318468: compiler/tiered/LevelTransitionTest.java fails with -XX:CompileThreshold=100 -XX:TieredStopAtLevel=1
Backport-of: 61d0db3838
2024-02-19 09:34:42 +00:00
Amos Shi
38a60d78c4 8318983: Fix comment typo in PKCS12Passwd.java
Backport-of: 949846986f
2024-02-19 08:45:07 +00:00
Amos Shi
cc88c3ca4e 8317307: test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java fails with ConnectException: Connection timed out: no further information
Backport-of: b9b82631bf
2024-02-19 08:44:50 +00:00
Amos Shi
ccd4c98e39 8319668: Fixup of jar filename typo in BadFactoryTest.sh
Backport-of: 63ad868e18
2024-02-19 08:43:14 +00:00
Amos Shi
a5e6577c5b 8315680: java/lang/ref/ReachabilityFenceTest.java should run with -Xbatch
Backport-of: a290256bbf
2024-02-19 08:41:58 +00:00
Amos Shi
92cb5eb766 8319456: jdk/jfr/event/gc/collection/TestGCCauseWith[Serial|Parallel].java : GC cause 'GCLocker Initiated GC' not in the valid causes
Backport-of: 7c7f8ea30d
2024-02-19 08:41:41 +00:00
Johannes Bechberger
ddc3e41100 8318736: com/sun/jdi/JdwpOnThrowTest.java failed with "transport error 202: bind failed: Address already in use"
Reviewed-by: mbaesken
Backport-of: 28e1a33856
2024-02-19 08:37:57 +00:00
Amos Shi
6ecf198c7c 8316001: GC: Make TestArrayAllocatorMallocLimit use createTestJvm
Backport-of: 86dde5e02b
2024-02-19 08:36:41 +00:00
Amos Shi
f7cd14cc2b 8307123: Fix deprecation warnings in DPrinter
Backport-of: b76f320e76
2024-02-19 08:35:20 +00:00
Sergey Bylokhov
8af22e796a 8324347: Enable "maybe-uninitialized" warning for FreeType 2.13.1
Backport-of: 781f368d42
2024-02-17 11:26:43 +00:00
Goetz Lindenmaier
10894a07f0 8304314: StackWalkTest.java fails after CODETOOLS-7903373
Backport-of: d5a150706e
2024-02-16 09:56:50 +00:00
Sergey Bylokhov
1047521856 8318603: Parallelize sun/java2d/marlin/ClipShapeTest.java
Reviewed-by: phh
Backport-of: 6c7029ffd4
2024-02-16 04:49:34 +00:00
Jonathan Dowland
1f516f62f2 8324307: [11u] hotspot fails to build with GCC 12 and newer (non-static data member initializers)
Reviewed-by: sgehwolf
2024-02-15 21:50:46 +00:00
Jonathan Dowland
bcdad92ce0 8249087: Always initialize _body[0..1] in Symbol constructor
Reviewed-by: sgehwolf
Backport-of: 112bbcb396
2024-02-15 21:50:29 +00:00
Johannes Bechberger
daf393a3fa 8304725: AsyncGetCallTrace can cause SIGBUS on M1
Reviewed-by: phh, jbachorik
Backport-of: d8af7a6014
2024-02-15 17:08:28 +00:00
Jonathan Dowland
621048ac87 8247818: GCC 10 warning stringop-overflow with symbol code
Reviewed-by: andrew, stuefe
Backport-of: ed31b661d3
2024-02-15 09:06:29 +00:00
Dan Lutker
a60fb5a71d 8325150: (tz) Update Timezone Data to 2024a
Reviewed-by: phh
Backport-of: 917838e0a5
2024-02-09 18:52:12 +00:00
Elif Aslan
1f85c15d3b 8318608: Enable parallelism in vmTestbase/nsk/stress/threads tests
Backport-of: cee44a6255
2024-02-07 07:42:39 +00:00
Elif Aslan
5aa8538b17 8318607: Enable parallelism in vmTestbase/nsk/stress/jni tests
Backport-of: 43f31d7385
2024-02-07 07:42:18 +00:00
Aleksey Shipilev
54d1857208 8325096: Test java/security/cert/CertPathBuilder/akiExt/AKISerialNumber.java is failing
Backport-of: ac1cd31949
2024-02-07 07:37:42 +00:00
Amos Shi
4c25b228c9 8287113: JFR: Periodic task thread uses period for method sampling events
Backport-of: 8122466fbb
2024-02-06 08:07:21 +00:00
Andrew Lu
9be4891909 8323243: JNI invocation of an abstract instance method corrupts the stack
Backport-of: 71d9a83dec
2024-02-06 02:03:01 +00:00
Andrew Lu
77c0da4b01 8306683: Open source several clipboard and color AWT tests
Backport-of: 1c2dadc31e
2024-02-06 02:01:52 +00:00
Andrew Lu
38c11fd645 8315415: OutputAnalyzer.shouldMatchByLine() fails in some cases
Backport-of: 7b1e2bfe0f
2024-02-06 02:01:39 +00:00
Jonathan Dowland
0dc17ca068 8315731: Open source several Swing Text related tests
Reviewed-by: serb
Backport-of: d475f61fd5
2024-02-05 14:46:45 +00:00
Amos Shi
191b074a79 8315611: Open source swing text/html and tree test
Backport-of: ae08143d3d
2024-02-01 08:15:22 +00:00
Amos Shi
9276ded252 8309104: [JVMCI] compiler/unsafe/UnsafeGetStableArrayElement test asserts wrong values with Graal
Backport-of: 11fb5b2209
2024-02-01 08:13:51 +00:00
Amos Shi
433c10b07f 8265349: vmTestbase/../stress/compiler/deoptimize/Test.java fails with OOME due to CodeCache exhaustion.
Reviewed-by: lucy
Backport-of: 880c138b58
2024-01-31 13:09:51 +00:00
Andrew Lu
57e3a82b70 8314144: gc/g1/ihop/TestIHOPStatic.java fails due to extra concurrent mark with -Xcomp
Backport-of: 1925508425
2024-01-31 02:15:43 +00:00
Andrew Lu
54ada10524 8309778: java/nio/file/Files/CopyAndMove.java fails when using second test directory
Backport-of: cfae6ef2f6
2024-01-31 02:15:25 +00:00
Andrew Lu
6922a6035a 8156889: ListKeychainStore.sh fails in some virtualized environments
Backport-of: 82c8b28f40
2024-01-31 02:15:08 +00:00
Andrew Lu
9379be4e03 8309870: Using -proc:full should be considered requesting explicit annotation processing
Backport-of: 3ce1240ca1
2024-01-31 02:13:58 +00:00
156 changed files with 8735 additions and 70285 deletions

View File

@@ -0,0 +1,20 @@
Owner: CN=Certainly Root E1, O=Certainly, C=US
Issuer: CN=Certainly Root E1, O=Certainly, C=US
Serial number: 62533b1470333275cf98d9ab9bfccf8
Valid from: Thu Apr 01 00:00:00 GMT 2021 until: Sun Apr 01 00:00:00 GMT 2046
Signature algorithm name: SHA384withECDSA
Subject Public Key Algorithm: 384-bit EC (secp384r1) key
Version: 3
-----BEGIN CERTIFICATE-----
MIIB9zCCAX2gAwIBAgIQBiUzsUcDMydc+Y2aub/M+DAKBggqhkjOPQQDAzA9MQsw
CQYDVQQGEwJVUzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0YWlu
bHkgUm9vdCBFMTAeFw0yMTA0MDEwMDAwMDBaFw00NjA0MDEwMDAwMDBaMD0xCzAJ
BgNVBAYTAlVTMRIwEAYDVQQKEwlDZXJ0YWlubHkxGjAYBgNVBAMTEUNlcnRhaW5s
eSBSb290IEUxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE3m/4fxzf7flHh4axpMCK
+IKXgOqPyEpeKn2IaKcBYhSRJHpcnqMXfYqGITQYUBsQ3tA3SybHGWCA6TS9YBk2
QNYphwk8kXr2vBMj3VlOBF7PyAIcGFPBMdjaIOlEjeR2o0IwQDAOBgNVHQ8BAf8E
BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ygYy2R17ikq6+2uI1g4
hevIIgcwCgYIKoZIzj0EAwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozm
ut6Dacpps6kFtZaSF4fC0urQe87YQVt8rgIwRt7qy12a7DLCZRawTDBcMPPaTnOG
BtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR
-----END CERTIFICATE-----

View File

@@ -0,0 +1,38 @@
Owner: CN=Certainly Root R1, O=Certainly, C=US
Issuer: CN=Certainly Root R1, O=Certainly, C=US
Serial number: 8e0ff94b907168653354f4d44439b7e0
Valid from: Thu Apr 01 00:00:00 GMT 2021 until: Sun Apr 01 00:00:00 GMT 2046
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 4096-bit RSA key
Version: 3
-----BEGIN CERTIFICATE-----
MIIFRzCCAy+gAwIBAgIRAI4P+UuQcWhlM1T01EQ5t+AwDQYJKoZIhvcNAQELBQAw
PTELMAkGA1UEBhMCVVMxEjAQBgNVBAoTCUNlcnRhaW5seTEaMBgGA1UEAxMRQ2Vy
dGFpbmx5IFJvb3QgUjEwHhcNMjEwNDAxMDAwMDAwWhcNNDYwNDAxMDAwMDAwWjA9
MQswCQYDVQQGEwJVUzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0
YWlubHkgUm9vdCBSMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANA2
1B/q3avk0bbm+yLA3RMNansiExyXPGhjZjKcA7WNpIGD2ngwEc/csiu+kr+O5MQT
vqRoTNoCaBZ0vrLdBORrKt03H2As2/X3oXyVtwxwhi7xOu9S98zTm/mLvg7fMbed
aFySpvXl8wo0tf97ouSHocavFwDvA5HtqRxOcT3Si2yJ9HiG5mpJoM610rCrm/b0
1C7jcvk2xusVtyWMOvwlDbMicyF0yEqWYZL1LwsYpfSt4u5BvQF5+paMjRcCMLT5
r3gajLQ2EBAHBXDQ9DGQilHFhiZ5shGIXsXwClTNSaa/ApzSRKft43jvRl5tcdF5
cBxGX1HpyTfcX35pe0HfNEXgO4T0oYoKNp43zGJS4YkNKPl6I7ENPT2a/Z2B7yyQ
wHtETrtJ4A5KVpK8y7XdeReJkd5hiXSSqOMyhb5OhaRLWcsrxXiOcVTQAjeZjOVJ
6uBUcqQRBi8LjMFbvrWhsFNunLhgkR9Za/kt9JQKl7XsxXYDVBtlUrpMklZRNaBA
2CnbrlJ2Oy0wQJuK0EJWtLeIAaSHO1OWzaMWj/Nmqhexx2DgwUMFDO6bW2BvBlyH
Wyf5QBGenDPBt+U1VwV/J84XIIwc/PH72jEpSe31C4SnT8H2TsIonPru4K8H+zMR
eiFPCyEQtkA6qyI6BJyLm4SGcprSp6XEtHWRqSsjAgMBAAGjQjBAMA4GA1UdDwEB
/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTgqj8ljZ9EXME66C6u
d0yEPmcM9DANBgkqhkiG9w0BAQsFAAOCAgEAuVevuBLaV4OPaAszHQNTVfSVcOQr
PbA56/qJYv331hgELyE03fFo8NWWWt7CgKPBjcZq91l3rhVkz1t5BXdm6ozTaw3d
8VkswTOlMIAVRQdFGjEitpIAq5lNOo93r6kiyi9jyhXWx8bwPWz8HA2YEGGeEaIi
1wrykXprOQ4vMMM2SZ/g6Q8CRFA3lFV96p/2O7qUpUzpvD5RtOjKkjZUbVwlKNrd
rRT90+7iIgXr0PK3aBLXWopBGsaSpVo7Y0VPv+E6dyIvXL9G+VoDhRNCX8reU9di
taY1BMJH/5n9hN9czulegChB8n3nHpDYT3Y+gjwN/KUD+nsa2UUeYNrEjvn8K8l7
lcUq/6qJ34IxD3L/DCfXCh5WAFAeDJDBlrXYFIW7pw0WwfgHJBu6haEaBQmAupVj
yTrsJZ9/nbqkRxWbRHDxakvWOF5D8xh+UG7pWijmZeZ3Gzr9Hb4DJqPb1OG7fpYn
Kx3upPvaJVQTA945xsMfTZDsjxtK0hzthZU4UHlG1sGQUDGpXJpuHfUzVounmdLy
yCwzk5Iwx06MZTMQZBf9JBeW0Y3COmor6xOLRPIh80oat3df1+2IpHLlOR+Vnb5n
wXARPbv0+Em34yaXOp/SX3z7wJl8OSngex2/DaeP0ik0biQVy96QXr8axGbqwua6
OV+KmalBWQewLK8=
-----END CERTIFICATE-----

View File

@@ -32,7 +32,7 @@ formatVersion=3
# Version of the currency code information in this class.
# It is a serial number that accompanies with each amendment.
dataVersion=175
dataVersion=176
# List of all valid ISO 4217 currency codes.
# To ensure compatibility, do not remove codes.
@@ -55,7 +55,7 @@ all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036
SRD968-SRG740-SSP728-STD678-STN930-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
UYU858-UZS860-VEB862-VED926-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
XBB956-XBC957-XBD958-XCD951-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
XBB956-XBC957-XBD958-XCD951-XCG532-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZMW967-ZWD716-ZWL932-\
ZWN942-ZWR935
@@ -189,11 +189,11 @@ CR=CRC
# COTE D'IVOIRE
CI=XOF
# CROATIA
HR=HRK;2022-12-31-23-00-00;EUR
HR=EUR
# CUBA
CU=CUP
# Cura\u00e7ao
CW=ANG
CW=ANG;2025-04-01-04-00-00;XCG
# CYPRUS
CY=EUR
# CZECHIA
@@ -510,7 +510,7 @@ SR=SRD
# SVALBARD AND JAN MAYEN
SJ=NOK
# Sint Maarten (Dutch part)
SX=ANG
SX=ANG;2025-04-01-04-00-00;XCG
# ESWATINI
SZ=SZL
# SWEDEN

View File

@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2023d
tzdata2024a

View File

@@ -53,6 +53,10 @@
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
# https://www.jstor.org/stable/1774359
#
# For the 1911/1912 establishment of standard time in French possessions, see:
# Société Française de Physique, Recueil de constantes physiques (1913),
# page 752, 18b.
#
# European-style abbreviations are commonly used along the Mediterranean.
# For sub-Saharan Africa abbreviations were less standardized.
# Previous editions of this database used WAT, CAT, SAT, and EAT
@@ -136,7 +140,7 @@ Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia
# Chad
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena
Zone Africa/Ndjamena 1:00:12 - LMT 1912 Jan 1 # N'Djamena
1:00 - WAT 1979 Oct 14
1:00 1:00 WAST 1980 Mar 8
1:00 - WAT
@@ -162,7 +166,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena
# Inaccessible, Nightingale: uninhabited
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Abidjan -0:16:08 - LMT 1912
Zone Africa/Abidjan -0:16:08 - LMT 1912 Jan 1
0:00 - GMT
###############################################################################

View File

@@ -2480,18 +2480,33 @@ Zone Asia/Amman 2:23:44 - LMT 1931
# effective December 21st, 2018....
# http://adilet.zan.kz/rus/docs/P1800000817 (russian language).
# From Zhanbolat Raimbekov (2024-01-19):
# Kazakhstan (all parts) switching to UTC+5 on March 1, 2024
# https://www.gov.kz/memleket/entities/mti/press/news/details/688998?lang=ru
# [in Russian]
# (2024-01-20): https://primeminister.kz/ru/decisions/19012024-20
#
# From Alexander Krivenyshev (2024-01-19):
# According to a different news and the official web site for the Ministry of
# Trade and Integration of the Republic of Kazakhstan:
# https://en.inform.kz/news/kazakhstan-to-switch-to-single-hour-zone-mar-1-54ad0b/
# Zone NAME STDOFF RULES FORMAT [UNTIL]
#
# Almaty (formerly Alma-Ata), representing most locations in Kazakhstan
# This includes KZ-AKM, KZ-ALA, KZ-ALM, KZ-AST, KZ-BAY, KZ-VOS, KZ-ZHA,
# KZ-KAR, KZ-SEV, KZ-PAV, and KZ-YUZ.
# This includes Abai/Abay (ISO 3166-2 code KZ-10), Aqmola/Akmola (KZ-11),
# Almaty (KZ-19), Almaty city (KZ-75), Astana city (KZ-71),
# East Kazkhstan (KZ-63), Jambyl/Zhambyl (KZ-31), Jetisu/Zhetysu (KZ-33),
# Karaganda (KZ-35), North Kazakhstan (KZ-59), Pavlodar (KZ-55),
# Shyumkent city (KZ-79), Turkistan (KZ-61), and Ulytau (KZ-62).
Zone Asia/Almaty 5:07:48 - LMT 1924 May 2 # or Alma-Ata
5:00 - +05 1930 Jun 21
6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s
5:00 RussiaAsia +05/+06 1992 Jan 19 2:00s
6:00 RussiaAsia +06/+07 2004 Oct 31 2:00s
6:00 - +06
# Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) (KZ-KZY)
6:00 - +06 2024 Mar 1 0:00
5:00 - +05
# Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) (KZ-43)
Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2
4:00 - +04 1930 Jun 21
5:00 - +05 1981 Apr 1
@@ -2504,8 +2519,7 @@ Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2
5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s
6:00 - +06 2018 Dec 21 0:00
5:00 - +05
#
# Qostanay (aka Kostanay, Kustanay) (KZ-KUS)
# Qostanay (aka Kostanay, Kustanay) (KZ-39)
# The 1991/2 rules are unclear partly because of the 1997 Turgai
# reorganization.
Zone Asia/Qostanay 4:14:28 - LMT 1924 May 2
@@ -2516,9 +2530,9 @@ Zone Asia/Qostanay 4:14:28 - LMT 1924 May 2
5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s
4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s
5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s
6:00 - +06
# Aqtöbe (aka Aktobe, formerly Aktyubinsk) (KZ-AKT)
6:00 - +06 2024 Mar 1 0:00
5:00 - +05
# Aqtöbe (aka Aktobe, formerly Aktyubinsk) (KZ-15)
Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2
4:00 - +04 1930 Jun 21
5:00 - +05 1981 Apr 1
@@ -2528,7 +2542,7 @@ Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2
4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s
5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s
5:00 - +05
# Mangghystaū (KZ-MAN)
# Mangghystaū (KZ-47)
# Aqtau was not founded until 1963, but it represents an inhabited region,
# so include timestamps before 1963.
Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2
@@ -2540,7 +2554,7 @@ Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2
5:00 RussiaAsia +05/+06 1994 Sep 25 2:00s
4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s
5:00 - +05
# Atyraū (KZ-ATY) is like Mangghystaū except it switched from
# Atyraū (KZ-23) is like Mangghystaū except it switched from
# +04/+05 to +05/+06 in spring 1999, not fall 1994.
Zone Asia/Atyrau 3:27:44 - LMT 1924 May 2
3:00 - +03 1930 Jun 21
@@ -2551,7 +2565,7 @@ Zone Asia/Atyrau 3:27:44 - LMT 1924 May 2
5:00 RussiaAsia +05/+06 1999 Mar 28 2:00s
4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s
5:00 - +05
# West Kazakhstan (KZ-ZAP)
# West Kazakhstan (KZ-27)
# From Paul Eggert (2016-03-18):
# The 1989 transition is from USSR act No. 227 (1989-03-14).
Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk
@@ -3453,19 +3467,26 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# ... winter time will begin in Palestine from Saturday 10-28-2023,
# 02:00 AM by 60 minutes back.
#
# From Paul Eggert (2023-03-22):
# From Heba Hamad (2024-01-25):
# the summer time for the years 2024,2025 will begin in Palestine
# from Saturday at 02:00 AM by 60 minutes forward as shown below:
# year date
# 2024 2024-04-20
# 2025 2025-04-12
#
# From Paul Eggert (2024-01-25):
# For now, guess that spring and fall transitions will normally
# continue to use 2022's rules, that during DST Palestine will switch
# to standard time at 02:00 the last Saturday before Ramadan and back
# to DST at 02:00 the first Saturday after Ramadan, and that
# to DST at 02:00 the second Saturday after Ramadan, and that
# if the normal spring-forward or fall-back transition occurs during
# Ramadan the former is delayed and the latter advanced.
# To implement this, I predicted Ramadan-oriented transition dates for
# 2023 through 2086 by running the following program under GNU Emacs 28.2,
# 2026 through 2086 by running the following program under GNU Emacs 29.2,
# with the results integrated by hand into the table below.
# Predictions after 2086 are approximated without Ramadan.
#
# (let ((islamic-year 1444))
# (let ((islamic-year 1447))
# (require 'cal-islam)
# (while (< islamic-year 1510)
# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year)))
@@ -3474,6 +3495,7 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# (while (/= saturday (mod (setq a (1- a)) 7)))
# (while (/= saturday (mod b 7))
# (setq b (1+ b)))
# (setq b (+ 7 b))
# (setq a (calendar-gregorian-from-absolute a))
# (setq b (calendar-gregorian-from-absolute b))
# (insert
@@ -3524,84 +3546,84 @@ Rule Palestine 2021 only - Oct 29 1:00 0 -
Rule Palestine 2022 only - Mar 27 0:00 1:00 S
Rule Palestine 2022 2035 - Oct Sat<=30 2:00 0 -
Rule Palestine 2023 only - Apr 29 2:00 1:00 S
Rule Palestine 2024 only - Apr 13 2:00 1:00 S
Rule Palestine 2025 only - Apr 5 2:00 1:00 S
Rule Palestine 2024 only - Apr 20 2:00 1:00 S
Rule Palestine 2025 only - Apr 12 2:00 1:00 S
Rule Palestine 2026 2054 - Mar Sat<=30 2:00 1:00 S
Rule Palestine 2036 only - Oct 18 2:00 0 -
Rule Palestine 2037 only - Oct 10 2:00 0 -
Rule Palestine 2038 only - Sep 25 2:00 0 -
Rule Palestine 2039 only - Sep 17 2:00 0 -
Rule Palestine 2039 only - Oct 22 2:00 1:00 S
Rule Palestine 2039 2067 - Oct Sat<=30 2:00 0 -
Rule Palestine 2040 only - Sep 1 2:00 0 -
Rule Palestine 2040 only - Oct 13 2:00 1:00 S
Rule Palestine 2040 only - Oct 20 2:00 1:00 S
Rule Palestine 2040 2067 - Oct Sat<=30 2:00 0 -
Rule Palestine 2041 only - Aug 24 2:00 0 -
Rule Palestine 2041 only - Sep 28 2:00 1:00 S
Rule Palestine 2041 only - Oct 5 2:00 1:00 S
Rule Palestine 2042 only - Aug 16 2:00 0 -
Rule Palestine 2042 only - Sep 20 2:00 1:00 S
Rule Palestine 2042 only - Sep 27 2:00 1:00 S
Rule Palestine 2043 only - Aug 1 2:00 0 -
Rule Palestine 2043 only - Sep 12 2:00 1:00 S
Rule Palestine 2043 only - Sep 19 2:00 1:00 S
Rule Palestine 2044 only - Jul 23 2:00 0 -
Rule Palestine 2044 only - Aug 27 2:00 1:00 S
Rule Palestine 2044 only - Sep 3 2:00 1:00 S
Rule Palestine 2045 only - Jul 15 2:00 0 -
Rule Palestine 2045 only - Aug 19 2:00 1:00 S
Rule Palestine 2045 only - Aug 26 2:00 1:00 S
Rule Palestine 2046 only - Jun 30 2:00 0 -
Rule Palestine 2046 only - Aug 11 2:00 1:00 S
Rule Palestine 2046 only - Aug 18 2:00 1:00 S
Rule Palestine 2047 only - Jun 22 2:00 0 -
Rule Palestine 2047 only - Jul 27 2:00 1:00 S
Rule Palestine 2047 only - Aug 3 2:00 1:00 S
Rule Palestine 2048 only - Jun 6 2:00 0 -
Rule Palestine 2048 only - Jul 18 2:00 1:00 S
Rule Palestine 2048 only - Jul 25 2:00 1:00 S
Rule Palestine 2049 only - May 29 2:00 0 -
Rule Palestine 2049 only - Jul 3 2:00 1:00 S
Rule Palestine 2049 only - Jul 10 2:00 1:00 S
Rule Palestine 2050 only - May 21 2:00 0 -
Rule Palestine 2050 only - Jun 25 2:00 1:00 S
Rule Palestine 2050 only - Jul 2 2:00 1:00 S
Rule Palestine 2051 only - May 6 2:00 0 -
Rule Palestine 2051 only - Jun 17 2:00 1:00 S
Rule Palestine 2051 only - Jun 24 2:00 1:00 S
Rule Palestine 2052 only - Apr 27 2:00 0 -
Rule Palestine 2052 only - Jun 1 2:00 1:00 S
Rule Palestine 2052 only - Jun 8 2:00 1:00 S
Rule Palestine 2053 only - Apr 12 2:00 0 -
Rule Palestine 2053 only - May 24 2:00 1:00 S
Rule Palestine 2053 only - May 31 2:00 1:00 S
Rule Palestine 2054 only - Apr 4 2:00 0 -
Rule Palestine 2054 only - May 16 2:00 1:00 S
Rule Palestine 2055 only - May 1 2:00 1:00 S
Rule Palestine 2056 only - Apr 22 2:00 1:00 S
Rule Palestine 2057 only - Apr 7 2:00 1:00 S
Rule Palestine 2058 max - Mar Sat<=30 2:00 1:00 S
Rule Palestine 2054 only - May 23 2:00 1:00 S
Rule Palestine 2055 only - May 8 2:00 1:00 S
Rule Palestine 2056 only - Apr 29 2:00 1:00 S
Rule Palestine 2057 only - Apr 14 2:00 1:00 S
Rule Palestine 2058 only - Apr 6 2:00 1:00 S
Rule Palestine 2059 max - Mar Sat<=30 2:00 1:00 S
Rule Palestine 2068 only - Oct 20 2:00 0 -
Rule Palestine 2069 only - Oct 12 2:00 0 -
Rule Palestine 2070 only - Oct 4 2:00 0 -
Rule Palestine 2071 only - Sep 19 2:00 0 -
Rule Palestine 2072 only - Sep 10 2:00 0 -
Rule Palestine 2072 only - Oct 15 2:00 1:00 S
Rule Palestine 2072 only - Oct 22 2:00 1:00 S
Rule Palestine 2072 max - Oct Sat<=30 2:00 0 -
Rule Palestine 2073 only - Sep 2 2:00 0 -
Rule Palestine 2073 only - Oct 7 2:00 1:00 S
Rule Palestine 2073 only - Oct 14 2:00 1:00 S
Rule Palestine 2074 only - Aug 18 2:00 0 -
Rule Palestine 2074 only - Sep 29 2:00 1:00 S
Rule Palestine 2074 only - Oct 6 2:00 1:00 S
Rule Palestine 2075 only - Aug 10 2:00 0 -
Rule Palestine 2075 only - Sep 14 2:00 1:00 S
Rule Palestine 2075 only - Sep 21 2:00 1:00 S
Rule Palestine 2076 only - Jul 25 2:00 0 -
Rule Palestine 2076 only - Sep 5 2:00 1:00 S
Rule Palestine 2076 only - Sep 12 2:00 1:00 S
Rule Palestine 2077 only - Jul 17 2:00 0 -
Rule Palestine 2077 only - Aug 28 2:00 1:00 S
Rule Palestine 2077 only - Sep 4 2:00 1:00 S
Rule Palestine 2078 only - Jul 9 2:00 0 -
Rule Palestine 2078 only - Aug 13 2:00 1:00 S
Rule Palestine 2078 only - Aug 20 2:00 1:00 S
Rule Palestine 2079 only - Jun 24 2:00 0 -
Rule Palestine 2079 only - Aug 5 2:00 1:00 S
Rule Palestine 2079 only - Aug 12 2:00 1:00 S
Rule Palestine 2080 only - Jun 15 2:00 0 -
Rule Palestine 2080 only - Jul 20 2:00 1:00 S
Rule Palestine 2080 only - Jul 27 2:00 1:00 S
Rule Palestine 2081 only - Jun 7 2:00 0 -
Rule Palestine 2081 only - Jul 12 2:00 1:00 S
Rule Palestine 2081 only - Jul 19 2:00 1:00 S
Rule Palestine 2082 only - May 23 2:00 0 -
Rule Palestine 2082 only - Jul 4 2:00 1:00 S
Rule Palestine 2082 only - Jul 11 2:00 1:00 S
Rule Palestine 2083 only - May 15 2:00 0 -
Rule Palestine 2083 only - Jun 19 2:00 1:00 S
Rule Palestine 2083 only - Jun 26 2:00 1:00 S
Rule Palestine 2084 only - Apr 29 2:00 0 -
Rule Palestine 2084 only - Jun 10 2:00 1:00 S
Rule Palestine 2084 only - Jun 17 2:00 1:00 S
Rule Palestine 2085 only - Apr 21 2:00 0 -
Rule Palestine 2085 only - Jun 2 2:00 1:00 S
Rule Palestine 2085 only - Jun 9 2:00 1:00 S
Rule Palestine 2086 only - Apr 13 2:00 0 -
Rule Palestine 2086 only - May 18 2:00 1:00 S
Rule Palestine 2086 only - May 25 2:00 1:00 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
@@ -3629,7 +3651,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# Philippines
# From Paul Eggert (2018-11-18):
# From Paul Eggert (2024-01-21):
# The Spanish initially used American (west-of-Greenwich) time.
# It is unknown what time Manila kept when the British occupied it from
# 1762-10-06 through 1764-04; for now assume it kept American time.
@@ -3637,7 +3659,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct
# Philippines, issued a proclamation announcing that 1844-12-30 was to
# be immediately followed by 1845-01-01; see R.H. van Gent's
# History of the International Date Line
# https://www.staff.science.uu.nl/~gent0113/idl/idl_philippines.htm
# https://webspace.science.uu.nl/~gent0113/idl/idl_philippines.htm
# The rest of the data entries are from Shanks & Pottenger.
# From Jesper Nørgaard Welen (2006-04-26):
@@ -4064,7 +4086,8 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
# The English-language name of Vietnam's most populous city is "Ho Chi Minh
# City"; use Ho_Chi_Minh below to avoid a name of more than 14 characters.
# From Paul Eggert (2022-07-27) after a 2014 heads-up from Trần Ngọc Quân:
# From Paul Eggert (2024-01-14) after a 2014 heads-up from Trần Ngọc Quân
# and a 2024-01-14 heads-up from Đoàn Trần Công Danh:
# Trần Tiến Bình's authoritative book "Lịch Việt Nam: thế kỷ XX-XXI (1901-2100)"
# (Nhà xuất bản Văn Hoá - Thông Tin, Hanoi, 2005), pp 49-50,
# is quoted verbatim in:
@@ -4094,14 +4117,35 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
#
# Trần cites the following sources; it's unclear which supplied the info above.
#
# Hoàng Xuân Hãn: "Lịch và lịch Việt Nam". Tập san Khoa học Xã hội,
# No. 9, Paris, February 1982.
# Hoàng Xuân Hãn: "Lịch và lịch Việt Nam". Tập san Khoa học Xã hội,
# No. 9, Paris, February 1982.
#
# Lê Thành Lân: "Lịch và niên biểu lịch sử hai mươi thế kỷ (0001-2010)",
# NXB Thống kê, Hanoi, 2000.
# Lê Thành Lân: "Lịch và niên biểu lịch sử hai mươi thế kỷ (0001-2010)",
# NXB Thống kê, Hanoi, 2000.
#
# Lê Thành Lân: "Lịch hai thế kỷ (1802-2010) và các lịch vĩnh cửu",
# NXB Thuận Hoá, Huế, 1995.
# Lê Thành Lân: "Lịch hai thế kỷ (1802-2010) và các lịch vĩnh cửu",
# NXB Thuận Hoá, Huế, 1995.
#
# Here is the decision for the September 1945 transition:
# Võ Nguyên Giáp, Việt Nam Dân Quốc Công Báo, No. 1 (1945-09-29), page 13
# http://baochi.nlv.gov.vn/baochi/cgi-bin/baochi?a=d&d=JwvzO19450929.2.5&dliv=none
# It says that on 1945-09-01 at 24:00, Vietnam moved back two hours, to +07.
# It also mentions a 1945-03-29 decree (by a Japanese Goveror-General)
# to set the time zone to +09, but does not say whether that decree
# merely legalized an earlier change to +09.
#
# July 1955 transition:
# Ngô Đình Diệm, Công Báo Việt Nam, No. 92 (1955-07-02), page 1780-1781
# Ordinance (Dụ) No. 46 (1955-06-25)
# http://ddsnext.crl.edu/titles/32341#?c=0&m=29&s=0&cv=4&r=0&xywh=-89%2C342%2C1724%2C1216
# It says that on 1955-07-01 at 01:00, South Vietnam moved back 1 hour (to +07).
#
# December 1959 transition:
# Ngô Đình Diệm, Công Báo Việt Nam Cộng Hòa, 1960 part 1 (1960-01-02), page 62
# Decree (Sắc lệnh) No. 362-TTP (1959-12-30)
# http://ddsnext.crl.edu/titles/32341#?c=0&m=138&s=0&cv=793&r=0&xywh=-54%2C1504%2C1705%2C1202
# It says that on 1959-12-31 at 23:00, South Vietnam moved forward 1 hour (to +08).
# Zone NAME STDOFF RULES FORMAT [UNTIL]
#STDOFF 7:06:30.13
@@ -4109,9 +4153,9 @@ Zone Asia/Ho_Chi_Minh 7:06:30 - LMT 1906 Jul 1
7:06:30 - PLMT 1911 May 1 # Phù Liễn MT
7:00 - +07 1942 Dec 31 23:00
8:00 - +08 1945 Mar 14 23:00
9:00 - +09 1945 Sep 2
9:00 - +09 1945 Sep 1 24:00
7:00 - +07 1947 Apr 1
8:00 - +08 1955 Jul 1
8:00 - +08 1955 Jul 1 01:00
7:00 - +07 1959 Dec 31 23:00
8:00 - +08 1975 Jun 13
7:00 - +07

View File

@@ -443,11 +443,11 @@ Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
# French Polynesia
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct # Rikitea
Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct 1 # Rikitea
-9:00 - -09
Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct
Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct 1
-9:30 - -0930
Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct # Papeete
Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct 1 # Papeete
-10:00 - -10
# Clipperton (near North America) is administered from French Polynesia;
# it is uninhabited.
@@ -825,7 +825,7 @@ Zone Pacific/Apia 12:33:04 - LMT 1892 Jul 5
# Solomon Is
# excludes Bougainville, for which see Papua New Guinea
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara
Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct 1 # Honiara
11:00 - +11
# Tokelau
@@ -986,6 +986,10 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
# https://www.jstor.org/stable/1774359
#
# For the 1911/1912 establishment of standard time in French possessions, see:
# Société Française de Physique, Recueil de constantes physiques (1913),
# page 752, 18b.
#
# A reliable and entertaining source about time zones is
# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
#
@@ -2062,7 +2066,7 @@ Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
# ordaining - by a masterpiece of diplomatic flattery - that
# the Fourth of July should be celebrated twice in that year."
# This happened in 1892, according to the Evening News (Sydney) of 1892-07-20.
# https://www.staff.science.uu.nl/~gent0113/idl/idl.htm
# https://webspace.science.uu.nl/~gent0113/idl/idl_alaska_samoa.htm
# Although Shanks & Pottenger says they both switched to UT -11:30
# in 1911, and to -11 in 1950. many earlier sources give -11

View File

@@ -28,7 +28,7 @@
# These entries are for uses not otherwise covered by the tz database.
# Their main practical use is for platforms like Android that lack
# support for POSIX-style TZ strings. On such platforms these entries
# support for POSIX.1-2017-style TZ strings. On such platforms these entries
# can be useful if the timezone database is wrong or if a ship or
# aircraft at sea is not in a timezone.

View File

@@ -1013,9 +1013,34 @@ Zone Europe/Sofia 1:33:16 - LMT 1880
# Czech Republic (Czechia)
# Slovakia
#
# From Paul Eggert (2018-04-15):
# The source for Czech data is: Kdy začíná a končí letní čas. 2018-04-15.
# From Ivan Benovic (2024-01-30):
# https://www.slov-lex.sk/pravne-predpisy/SK/ZZ/1946/54/
# (This is an official link to the Czechoslovak Summer Time Act of
# March 8, 1946 that authorizes the Czechoslovak government to set the
# exact dates of change to summer time and back to Central European Time.
# The act also implicitly confirms Central European Time as the
# official time zone of Czechoslovakia and currently remains in force
# in both the Czech Republic and Slovakia.)
# https://www.psp.cz/eknih/1945pns/tisky/t0216_00.htm
# (This is a link to the original legislative proposal dating back to
# February 22, 1946. The accompanying memorandum to the proposal says
# that an advisory committee on European railroad transportation that
# met in Brussels in October 1945 decided that the change of time
# should be carried out in all participating countries in a strictly
# coordinated manner....)
#
# From Paul Eggert (2024-01-30):
# The source for Czech data is: Kdy začíná a končí letní čas.
# https://kalendar.beda.cz/kdy-zacina-a-konci-letni-cas
# Its main text disagrees with its quoted sources only in 1918,
# where the main text says spring and autumn transitions
# occurred at 02:00 and 03:00 respectively (as usual),
# whereas the 1918 source "Oznámení o zavedení letního času v roce 1918"
# says transitions were at 01:00 and 02:00 respectively.
# As the 1918 source appears to be a humorous piece, and it is
# unlikely that Prague would have disagreed with its neighbors by an hour,
# go with the main text for now.
#
# We know of no English-language name for historical Czech winter time;
# abbreviate it as "GMT", as it happened to be GMT.
#

View File

@@ -26,13 +26,10 @@
# This file is in the public domain.
# This file is generated automatically from the data in the public-domain
# NIST format leap-seconds.list file, which can be copied from
# <ftp://ftp.nist.gov/pub/time/leap-seconds.list>
# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>.
# The NIST file is used instead of its IERS upstream counterpart
# NIST/IERS format leap-seconds.list file, which can be copied from
# <https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list>
# because under US law the NIST file is public domain
# whereas the IERS file's copyright and license status is unclear.
# or, in a variant with different comments, from
# <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>.
# For more about leap-seconds.list, please see
# The NTP Timescale and Leap Seconds
# <https://www.eecis.udel.edu/~mills/leap.html>.
@@ -95,11 +92,11 @@ Leap 2016 Dec 31 23:59:60 + S
# Any additional leap seconds will come after this.
# This Expires line is commented out for now,
# so that pre-2020a zic implementations do not reject this file.
#Expires 2024 Jun 28 00:00:00
#Expires 2024 Dec 28 00:00:00
# POSIX timestamps for the data in this file:
#updated 1467936000 (2016-07-08 00:00:00 UTC)
#expires 1719532800 (2024-06-28 00:00:00 UTC)
#updated 1704708379 (2024-01-08 10:06:19 UTC)
#expires 1735344000 (2024-12-28 00:00:00 UTC)
# Updated through IERS Bulletin C66
# File expires on: 28 June 2024
# Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat)
# File expires on 28 December 2024

View File

@@ -1291,6 +1291,10 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# <http://cs.ucla.edu/~eggert/The-Waste-of-Daylight-19th.pdf>
# [PDF] (1914-03)
#
# For the 1911/1912 establishment of standard time in French possessions, see:
# Société Française de Physique, Recueil de constantes physiques (1913),
# page 752, 18b.
#
# See the 'europe' file for Greenland.
# Canada
@@ -1377,7 +1381,7 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# From Paul Eggert (2014-10-18):
# H. David Matthews and Mary Vincent's map
# "It's about TIME", _Canadian Geographic_ (September-October 1998)
# http://www.canadiangeographic.ca/Magazine/SO98/alacarte.asp
# https://web.archive.org/web/19990827055050/https://canadiangeographic.ca/SO98/geomap.htm
# contains detailed boundaries for regions observing nonstandard
# time and daylight saving time arrangements in Canada circa 1998.
#
@@ -1665,6 +1669,15 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9
# Some cities in the United States have pushed the deadline back
# three weeks and will change over from daylight saving in October.
# From Chris Walton (2024-01-09):
# The [Toronto] changes in 1947, 1948, and 1949 took place at 2:00 a.m. local
# time instead of midnight.... Toronto Daily Star - ...
# April 2, 1947 - Page 39 ... April 7, 1948 - Page 13 ...
# April 2, 1949 - Page 1 ... April 7, 1949 - Page 24 ...
# November 25, 1949 - Page 52 ... April 21, 1950 - Page 14 ...
# September 19, 1950 - Page 46 ... September 20, 1950 - Page 3 ...
# November 24, 1950 - Page 21
# From Arthur David Olson (2010-07-17):
#
# "Standard Time and Time Zones in Canada" appeared in
@@ -1726,13 +1739,9 @@ Rule Toronto 1927 1937 - Sep Sun>=25 2:00 0 S
Rule Toronto 1928 1937 - Apr Sun>=25 2:00 1:00 D
Rule Toronto 1938 1940 - Apr lastSun 2:00 1:00 D
Rule Toronto 1938 1939 - Sep lastSun 2:00 0 S
Rule Toronto 1945 1946 - Sep lastSun 2:00 0 S
Rule Toronto 1946 only - Apr lastSun 2:00 1:00 D
Rule Toronto 1947 1949 - Apr lastSun 0:00 1:00 D
Rule Toronto 1947 1948 - Sep lastSun 0:00 0 S
Rule Toronto 1949 only - Nov lastSun 0:00 0 S
Rule Toronto 1950 1973 - Apr lastSun 2:00 1:00 D
Rule Toronto 1950 only - Nov lastSun 2:00 0 S
Rule Toronto 1945 1948 - Sep lastSun 2:00 0 S
Rule Toronto 1946 1973 - Apr lastSun 2:00 1:00 D
Rule Toronto 1949 1950 - Nov lastSun 2:00 0 S
Rule Toronto 1951 1956 - Sep lastSun 2:00 0 S
# Shanks & Pottenger say Toronto ended DST a week early in 1971,
# namely on 1971-10-24, but Mark Brader wrote (2003-05-31) that this
@@ -3455,7 +3464,7 @@ Zone America/Jamaica -5:07:10 - LMT 1890 # Kingston
# Martinique
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Martinique -4:04:20 - LMT 1890 # Fort-de-France
-4:04:20 - FFMT 1911 May # Fort-de-France MT
-4:04:20 - FFMT 1911 May 1 # Fort-de-France MT
-4:00 - AST 1980 Apr 6
-4:00 1:00 ADT 1980 Sep 28
-4:00 - AST
@@ -3562,7 +3571,7 @@ Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan
# St Pierre and Miquelon
# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
Zone America/Miquelon -3:44:40 - LMT 1911 Jun 15 # St Pierre
-4:00 - AST 1980 May
-3:00 - -03 1987
-3:00 Canada -03/-02

View File

@@ -1593,8 +1593,11 @@ Zone Atlantic/Stanley -3:51:24 - LMT 1890
-3:00 - -03
# French Guiana
# For the 1911/1912 establishment of standard time in French possessions, see:
# Société Française de Physique, Recueil de constantes physiques (1913),
# page 752, 18b.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Cayenne -3:29:20 - LMT 1911 Jul
Zone America/Cayenne -3:29:20 - LMT 1911 Jul 1
-4:00 - -04 1967 Oct
-3:00 - -03

View File

@@ -40,6 +40,10 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
# Need extra inlining to collapse all marking code into the hot marking loop
BUILD_LIBJVM_shenandoahConcurrentMark.cpp_CXXFLAGS := --param inline-unit-growth=1000
endif
ifeq ($(call check-jvm-feature, dtrace), true)
# DTRACE_PROBE macros trigger a maybe-uninitialized warning on 'ret'
BUILD_LIBJVM_jni.cpp_CXXFLAGS := -Wno-maybe-uninitialized
endif
endif
LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NONE)

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@ import java.io.FileNotFoundException;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
@@ -312,9 +313,15 @@ public class GenerateCurrencyData {
validCurrencyCodes.substring(i * 7 + 3, i * 7 + 6));
checkCurrencyCode(currencyCode);
int tableEntry = mainTable[(currencyCode.charAt(0) - 'A') * A_TO_Z + (currencyCode.charAt(1) - 'A')];
if (tableEntry == INVALID_COUNTRY_ENTRY ||
(tableEntry & SPECIAL_CASE_COUNTRY_MASK) != 0 ||
(tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) != (currencyCode.charAt(2) - 'A')) {
// Do not allow a future currency to be classified as an otherCurrency,
// otherwise it will leak out into Currency:getAvailableCurrencies
boolean futureCurrency = Arrays.asList(specialCaseNewCurrencies).contains(currencyCode);
boolean simpleCurrency = (tableEntry & SIMPLE_CASE_COUNTRY_FINAL_CHAR_MASK) == (currencyCode.charAt(2) - 'A');
// If neither a simple currency, or one defined in the future
// then the current currency is applicable to be added to the otherTable
if (!futureCurrency && !simpleCurrency) {
if (otherCurrenciesCount == maxOtherCurrencies) {
throw new RuntimeException("too many other currencies");
}

View File

@@ -516,7 +516,6 @@ else
LIBFREETYPE_LIBS := -lfreetype
endif
# gcc_ftobjs.c := maybe-uninitialized required for GCC 7 builds.
$(eval $(call SetupJdkLibrary, BUILD_LIBFREETYPE, \
NAME := freetype, \
OPTIMIZATION := HIGHEST, \
@@ -529,7 +528,6 @@ else
DISABLED_WARNINGS_microsoft := 4018 4267 4244 4312 4819, \
DISABLED_WARNINGS_gcc := implicit-fallthrough cast-function-type bad-function-cast, \
DISABLED_WARNINGS_clang := missing-declarations, \
DISABLED_WARNINGS_gcc_ftobjs.c := maybe-uninitialized, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
))

View File

@@ -105,11 +105,11 @@ class CgroupV1Subsystem: public CgroupSubsystem {
private:
/* controllers */
CachingCgroupController* _memory = NULL;
CgroupV1Controller* _cpuset = NULL;
CachingCgroupController* _cpu = NULL;
CgroupV1Controller* _cpuacct = NULL;
CgroupV1Controller* _pids = NULL;
CachingCgroupController* _memory;
CgroupV1Controller* _cpuset;
CachingCgroupController* _cpu;
CgroupV1Controller* _cpuacct;
CgroupV1Controller* _pids;
char * pids_max_val();

View File

@@ -51,10 +51,10 @@ class CgroupV2Controller: public CgroupController {
class CgroupV2Subsystem: public CgroupSubsystem {
private:
/* One unified controller */
CgroupController* _unified = NULL;
CgroupController* _unified;
/* Caching wrappers for cpu/memory metrics */
CachingCgroupController* _memory = NULL;
CachingCgroupController* _cpu = NULL;
CachingCgroupController* _memory;
CachingCgroupController* _cpu;
char *mem_limit_val();
char *mem_swp_limit_val();

View File

@@ -1862,7 +1862,11 @@ PcDesc* PcDescContainer::find_pc_desc_internal(address pc, bool approximate, con
if (match_desc(upper, pc_offset, approximate)) {
assert(upper == linear_search(search, pc_offset, approximate), "search ok");
_pc_desc_cache.add_pc_desc(upper);
if (!Thread::current_in_asgct()) {
// we don't want to modify the cache if we're in ASGCT
// which is typically called in a signal handler
_pc_desc_cache.add_pc_desc(upper);
}
return upper;
} else {
assert(NULL == linear_search(search, pc_offset, approximate), "search ok");

View File

@@ -40,9 +40,13 @@ Symbol::Symbol(const u1* name, int length, int refcount) {
_refcount = refcount;
_length = length;
_identity_hash = (short)os::random();
for (int i = 0; i < _length; i++) {
byte_at_put(i, name[i]);
}
// _body[0..1] are allocated in the header just by coincidence in the current
// implementation of Symbol. They are read by identity_hash(), so make sure they
// are initialized.
// No other code should assume that _body[0..1] are always allocated. E.g., do
// not unconditionally read base()[0] as that will be invalid for an empty Symbol.
_body[0] = _body[1] = 0;
memcpy(_body, name, length);
}
void* Symbol::operator new(size_t sz, int len, TRAPS) throw() {

View File

@@ -128,11 +128,6 @@ class Symbol : public MetaspaceObj {
return (int)heap_word_size(byte_size(length));
}
void byte_at_put(int index, int value) {
assert(index >=0 && index < _length, "symbol index overflow");
_body[index] = value;
}
Symbol(const u1* name, int length, int refcount);
void* operator new(size_t size, int len, TRAPS) throw();
void* operator new(size_t size, int len, Arena* arena, TRAPS) throw();

View File

@@ -554,8 +554,9 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
return;
}
// !important! make sure all to call thread->set_in_asgct(false) before every return
thread->set_in_asgct(true);
// signify to other code in the VM that we're in ASGCT
ThreadInAsgct tia(thread);
switch (thread->thread_state()) {
case _thread_new:
@@ -614,7 +615,6 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
trace->num_frames = ticks_unknown_state; // -7
break;
}
thread->set_in_asgct(false);
}

View File

@@ -1168,6 +1168,11 @@ static void jni_invoke_nonstatic(JNIEnv *env, JavaValue* result, jobject receive
}
}
if (selected_method->is_abstract()) {
ResourceMark rm(THREAD);
THROW_MSG(vmSymbols::java_lang_AbstractMethodError(), selected_method->name()->as_C_string());
}
methodHandle method(THREAD, selected_method);
// Create object to hold arguments for the JavaCall, and associate it with

View File

@@ -321,6 +321,7 @@ Thread::Thread() {
}
MACOS_AARCH64_ONLY(DEBUG_ONLY(_wx_init = false));
_in_asgct = false;
}
void Thread::initialize_thread_current() {

View File

@@ -762,6 +762,31 @@ protected:
void init_wx();
WXMode enable_wx(WXMode new_state);
#endif // __APPLE__ && AARCH64
private:
bool _in_asgct;
public:
bool in_asgct() const { return _in_asgct; }
void set_in_asgct(bool value) { _in_asgct = value; }
static bool current_in_asgct() {
Thread *cur = Thread::current_or_null_safe();
return cur != NULL && cur->in_asgct();
}
};
class ThreadInAsgct {
private:
Thread* _thread;
public:
ThreadInAsgct(Thread* thread) : _thread(thread) {
assert(thread != NULL, "invariant");
assert(!thread->in_asgct(), "invariant");
thread->set_in_asgct(true);
}
~ThreadInAsgct() {
assert(_thread->in_asgct(), "invariant");
_thread->set_in_asgct(false);
}
};
// Inline implementation of Thread::current()

View File

@@ -1261,53 +1261,74 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
}
private void expect100Continue() throws IOException {
// Expect: 100-Continue was set, so check the return code for
// Acceptance
int oldTimeout = http.getReadTimeout();
boolean enforceTimeOut = false;
boolean timedOut = false;
if (oldTimeout <= 0) {
// 5s read timeout in case the server doesn't understand
// Expect: 100-Continue
http.setReadTimeout(5000);
enforceTimeOut = true;
// Expect: 100-Continue was set, so check the return code for
// Acceptance
int oldTimeout = http.getReadTimeout();
boolean timedOut = false;
boolean tempTimeOutSet = false;
if (oldTimeout <= 0 || oldTimeout > 5000) {
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("Timeout currently set to " +
oldTimeout + " temporarily setting it to 5 seconds");
}
// 5s read timeout in case the server doesn't understand
// Expect: 100-Continue
http.setReadTimeout(5000);
tempTimeOutSet = true;
}
try {
http.parseHTTP(responses, pi, this);
} catch (SocketTimeoutException se) {
if (!enforceTimeOut) {
throw se;
}
timedOut = true;
http.setIgnoreContinue(true);
try {
http.parseHTTP(responses, pi, this);
} catch (SocketTimeoutException se) {
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("SocketTimeoutException caught," +
" will attempt to send body regardless");
}
if (!timedOut) {
// Can't use getResponseCode() yet
String resp = responses.getValue(0);
// Parse the response which is of the form:
// HTTP/1.1 417 Expectation Failed
// HTTP/1.1 100 Continue
if (resp != null && resp.startsWith("HTTP/")) {
String[] sa = resp.split("\\s+");
responseCode = -1;
try {
// Response code is 2nd token on the line
if (sa.length > 1)
responseCode = Integer.parseInt(sa[1]);
} catch (NumberFormatException numberFormatException) {
timedOut = true;
}
if (!timedOut) {
// Can't use getResponseCode() yet
String resp = responses.getValue(0);
// Parse the response which is of the form:
// HTTP/1.1 417 Expectation Failed
// HTTP/1.1 100 Continue
if (resp != null && resp.startsWith("HTTP/")) {
String[] sa = resp.split("\\s+");
responseCode = -1;
try {
// Response code is 2nd token on the line
if (sa.length > 1)
responseCode = Integer.parseInt(sa[1]);
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("response code received " + responseCode);
}
}
if (responseCode != 100) {
throw new ProtocolException("Server rejected operation");
} catch (NumberFormatException numberFormatException) {
}
}
if (responseCode != 100) {
// responseCode will be returned to caller
throw new ProtocolException("Server rejected operation");
}
}
// If timeout was changed, restore to original value
if (tempTimeOutSet) {
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("Restoring original timeout : " + oldTimeout);
}
http.setReadTimeout(oldTimeout);
}
responseCode = -1;
responses.reset();
// Proceed
// Ignore any future 100 continue messages
http.setIgnoreContinue(true);
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("Set Ignore Continue to true");
}
responseCode = -1;
responses.reset();
// Proceed
}
/*
@@ -1369,7 +1390,6 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
boolean expectContinue = false;
String expects = requests.findValue("Expect");
if ("100-Continue".equalsIgnoreCase(expects) && streaming()) {
http.setIgnoreContinue(false);
expectContinue = true;
}
@@ -1378,6 +1398,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
}
if (expectContinue) {
http.setIgnoreContinue(false);
expect100Continue();
}
ps = (PrintStream)http.getOutputStream();
@@ -1419,6 +1440,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
}
}
// Streaming returns true if there is a request body to send
public boolean streaming () {
return (fixedContentLength != -1) || (fixedContentLengthLong != -1) ||
(chunkLength != -1);

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -266,6 +266,7 @@ XBB=XBB
XBC=XBC
XBD=XBD
XCD=XCD
XCG=XCG
XDR=XDR
XFO=XFO
XFU=XFU
@@ -491,6 +492,7 @@ xbb=European Monetary Unit
xbc=European Unit of Account (XBC)
xbd=European Unit of Account (XBD)
xcd=East Caribbean Dollar
xcg=Caribbean Guilder
xdr=Special Drawing Rights
xfo=French Gold Franc
xfu=French UIC-Franc

View File

@@ -90,6 +90,7 @@ typedef HRESULT(__stdcall *PFNCLOSETHEMEDATA)(HTHEME hTheme);
typedef HRESULT(__stdcall *PFNDRAWTHEMEBACKGROUND)(HTHEME hTheme, HDC hdc,
int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect);
typedef HTHEME(__stdcall *PFNOPENTHEMEDATA)(HWND hwnd, LPCWSTR pszClassList);
typedef HTHEME(__stdcall *PFNOPENTHEMEDATAFORDPI)(HWND hwnd, LPCWSTR pszClassList, UINT dpi);
typedef HRESULT (__stdcall *PFNDRAWTHEMETEXT)(HTHEME hTheme, HDC hdc,
@@ -134,6 +135,7 @@ typedef HRESULT (__stdcall *PFNGETTHEMETRANSITIONDURATION)
(HTHEME hTheme, int iPartId, int iStateIdFrom, int iStateIdTo,
int iPropId, DWORD *pdwDuration);
static PFNOPENTHEMEDATA OpenThemeDataFunc = NULL;
static PFNOPENTHEMEDATAFORDPI OpenThemeDataForDpiFunc = NULL;
static PFNDRAWTHEMEBACKGROUND DrawThemeBackground = NULL;
static PFNCLOSETHEMEDATA CloseThemeData = NULL;
@@ -154,13 +156,17 @@ static PFNISTHEMEBACKGROUNDPARTIALLYTRANSPARENT
//this function might not exist on Windows XP
static PFNGETTHEMETRANSITIONDURATION GetThemeTransitionDuration = NULL;
constexpr unsigned int defaultDPI = 96;
BOOL InitThemes() {
static BOOL InitThemes() {
static HMODULE hModThemes = NULL;
hModThemes = JDK_LoadSystemLibrary("UXTHEME.DLL");
DTRACE_PRINTLN1("InitThemes hModThemes = %x\n", hModThemes);
if(hModThemes) {
DTRACE_PRINTLN("Loaded UxTheme.dll\n");
OpenThemeDataFunc = (PFNOPENTHEMEDATA)GetProcAddress(hModThemes,
"OpenThemeData");
OpenThemeDataForDpiFunc = (PFNOPENTHEMEDATAFORDPI)GetProcAddress(
hModThemes, "OpenThemeDataForDpi");
DrawThemeBackground = (PFNDRAWTHEMEBACKGROUND)GetProcAddress(
@@ -198,7 +204,7 @@ BOOL InitThemes() {
(PFNGETTHEMETRANSITIONDURATION)GetProcAddress(hModThemes,
"GetThemeTransitionDuration");
if(OpenThemeDataForDpiFunc
if((OpenThemeDataForDpiFunc || OpenThemeDataFunc)
&& DrawThemeBackground
&& CloseThemeData
&& DrawThemeText
@@ -218,10 +224,12 @@ BOOL InitThemes() {
DTRACE_PRINTLN("Loaded function pointers.\n");
// We need to make sure we can load the Theme.
// Use the default DPI value of 96 on windows.
constexpr unsigned int defaultDPI = 96;
HTHEME hTheme = OpenThemeDataForDpiFunc (
AwtToolkit::GetInstance().GetHWnd(),
L"Button", defaultDPI);
HTHEME hTheme = OpenThemeDataForDpiFunc
? OpenThemeDataForDpiFunc(AwtToolkit::GetInstance().GetHWnd(),
L"Button", defaultDPI)
: OpenThemeDataFunc(AwtToolkit::GetInstance().GetHWnd(),
L"Button");
if(hTheme) {
DTRACE_PRINTLN("Loaded Theme data.\n");
CloseThemeData(hTheme);
@@ -285,11 +293,13 @@ JNIEXPORT jlong JNICALL Java_sun_awt_windows_ThemeReader_openTheme
JNU_ThrowOutOfMemoryError(env, 0);
return 0;
}
// We need to open the Theme on a Window that will stick around.
// The best one for that purpose is the Toolkit window.
HTHEME htheme = OpenThemeDataForDpiFunc(
AwtToolkit::GetInstance().GetHWnd(),
str, dpi);
HTHEME htheme = OpenThemeDataForDpiFunc
? OpenThemeDataForDpiFunc(AwtToolkit::GetInstance().GetHWnd(), str, dpi)
: OpenThemeDataFunc(AwtToolkit::GetInstance().GetHWnd(), str);
JNU_ReleaseStringPlatformChars(env, widget, str);
return (jlong) htheme;
}
@@ -469,9 +479,14 @@ JNIEXPORT void JNICALL Java_sun_awt_windows_ThemeReader_paintBackground
rect.left = 0;
rect.top = 0;
rect.bottom = rectBottom;
rect.right = rectRight;
if (OpenThemeDataForDpiFunc) {
rect.bottom = rectBottom;
rect.right = rectRight;
} else {
rect.bottom = h;
rect.right = w;
}
ZeroMemory(pSrcBits,(BITS_PER_PIXEL>>3)*w*h);
HRESULT hres = DrawThemeBackground(hTheme, memDC, part, state, &rect, NULL);
@@ -494,6 +509,28 @@ JNIEXPORT void JNICALL Java_sun_awt_windows_ThemeReader_paintBackground
ReleaseDC(NULL,defaultDC);
}
static void rescale(SIZE *size) {
static int dpiX = -1;
static int dpiY = -1;
if (dpiX == -1 || dpiY == -1) {
HWND hWnd = ::GetDesktopWindow();
HDC hDC = ::GetDC(hWnd);
dpiX = ::GetDeviceCaps(hDC, LOGPIXELSX);
dpiY = ::GetDeviceCaps(hDC, LOGPIXELSY);
::ReleaseDC(hWnd, hDC);
}
if (dpiX !=0 && dpiX != defaultDPI) {
float invScaleX = (float) defaultDPI / dpiX;
size->cx = (int) round(size->cx * invScaleX);
}
if (dpiY != 0 && dpiY != defaultDPI) {
float invScaleY = (float) defaultDPI / dpiY;
size->cy = (int) round(size->cy * invScaleY);
}
}
jobject newInsets(JNIEnv *env, jint top, jint left, jint bottom, jint right) {
if (env->EnsureLocalCapacity(2) < 0) {
return NULL;
@@ -785,6 +822,10 @@ JNIEXPORT jobject JNICALL Java_sun_awt_windows_ThemeReader_getPartSize
CHECK_NULL_RETURN(dimMID, NULL);
}
if (!OpenThemeDataForDpiFunc) {
rescale(&size);
}
jobject dimObj = env->NewObject(dimClassID, dimMID, size.cx, size.cy);
if (safe_ExceptionOccurred(env)) {
env->ExceptionDescribe();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1290,7 +1290,10 @@ public class JavaCompiler {
options.isSet(PROCESSOR_PATH) ||
options.isSet(PROCESSOR_MODULE_PATH) ||
options.isSet(PROC, "only") ||
options.isSet(PROC, "full") ||
options.isSet(A) ||
options.isSet(XPRINT);
// Skipping -XprintRounds and -XprintProcessorInfo
}
public void setDeferredDiagnosticHandler(Log.DeferredDiagnosticHandler deferredDiagnosticHandler) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -81,6 +81,11 @@ import static com.sun.tools.javac.main.Option.OptionKind.*;
* {@code handleOption} then calls {@link #process process} providing a suitable
* {@link OptionHelper} to provide access the compiler state.
*
*
* <p>Maintenance note: when adding new annotation processing related
* options, the list of options regarded as requesting explicit
* annotation processing in JavaCompiler should be updated.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change

View File

@@ -80,7 +80,7 @@ public final class MetadataRepository {
// annotations, such as Period and Threshold.
if (pEventType.hasPeriod()) {
pEventType.setEventHook(true);
if (!(Type.EVENT_NAME_PREFIX + "ExecutionSample").equals(type.getName())) {
if (!pEventType.isMethodSampling()) {
requestHooks.add(new RequestHook(pEventType));
}
}

View File

@@ -278,4 +278,8 @@ public final class PlatformEventType extends Type {
public int getStackTraceOffset() {
return stackTraceOffset;
}
public boolean isMethodSampling() {
return isMethodSampling;
}
}

View File

@@ -21,6 +21,11 @@
# questions.
#
# All tests
all = \
:hotspot_all
hotspot_all = \
/
@@ -28,6 +33,8 @@ hotspot_all_no_apps = \
/ \
-applications
# Component test groups
hotspot_compiler = \
compiler
@@ -417,6 +424,21 @@ hotspot_rest_runtime = \
-:hotspot_nmt \
-:hotspot_tier2_runtime_platform_agnostic
jcstress_part1 = \
applications/jcstress/seqcst.java
jcstress_part2 = \
applications/jcstress/accessAtomic.java \
applications/jcstress/acqrel.java \
applications/jcstress/atomics.java \
applications/jcstress/coherence.java \
applications/jcstress/locks.java
jcstress_part3 = \
applications/jcstress \
-:jcstress_part1 \
-:jcstress_part2
# Stress tests against information provided by VM via JMX
vmTestbase_nsk_monitoring = \
vmTestbase/nsk/monitoring

View File

@@ -29,6 +29,7 @@ import jdk.test.lib.process.ProcessTools;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.file.Files;
@@ -51,11 +52,6 @@ import java.util.function.Predicate;
* Use jcstress test suite to generate jtreg tests in 'test.src' or current
* directory. Used version is defined in JcstressRunner class.
*
* Each generated jtreg test file will contain several tests. Subdirectories are
* used to allow running all tests from a file using command line. 'copy',
* 'acqrel', 'fences', 'atomicity', 'seqcst.sync', 'seqcst.volatiles' and
* 'other' tests will be generated.
*
* This generator depends on testlibrary, therefore it should be compiled and
* added to classpath. One can replace @notest by @test in jtreg test
* description above to run this class with jtreg.
@@ -97,58 +93,18 @@ public class TestGenerator {
" */\n\n", years);
}
private static enum JcstressGroup {
MEMEFFECTS("memeffects"),
COPY("copy"),
ACQREL("acqrel"),
FENCES("fences"),
ATOMICITY("atomicity"),
SEQCST_SYNC("seqcst.sync"),
SEQCST_VOLATILES("seqcst.volatiles"),
OTHER("other", JcstressGroup.otherFilter());
private final String groupName;
private final Predicate<String> filter;
private JcstressGroup(String groupName, Predicate<String> filter) {
this.groupName = groupName;
this.filter = filter;
}
private JcstressGroup(String groupName) {
this(groupName, JcstressGroup.nameFilter(groupName));
}
private static Predicate<String> nameFilter(String group) {
return s -> s.startsWith("org.openjdk.jcstress.tests." + group + ".");
}
private static Predicate<String> otherFilter() {
return (s) -> {
for (JcstressGroup g : EnumSet.complementOf(EnumSet.of(OTHER))) {
if (g.filter.test(s)) {
return false;
}
}
return true;
};
}
}
public static String DESC_FORMAT = "\n"
+ "/**\n"
+ " * @test %1$s\n"
+ " * @library /test/lib /\n"
+ " * @run driver/timeout=2400 " + JcstressRunner.class.getName()
+ " * @run driver/timeout=21600 " + JcstressRunner.class.getName()
// verbose output
+ " -v"
// test mode preset
+ " -m default"
// test name
+ " -t %1$s\n"
+ " -t org.openjdk.jcstress.tests.%1$s\\.\n"
+ " */\n";
public static void main(String[] args) {
public static void main(String[] args) throws IOException {
Path path = JcstressRunner.pathToArtifact();
Path output;
try {
@@ -162,56 +118,32 @@ public class TestGenerator {
} catch (Exception e) {
throw new Error("Can not get list of tests", e);
}
for (JcstressGroup group : JcstressGroup.values()) {
try {
try (BufferedReader reader = Files.newBufferedReader(output)) {
// skip first 4 lines: name, -{80}, revision and empty line
for (int i = 0; i < 4; ++i) {
reader.readLine();
}
new TestGenerator(group).generate(reader);
}
} catch (IOException e) {
throw new Error("Generating tests for " + group.name()
+ " has failed", e);
}
}
BufferedReader reader = Files.newBufferedReader(output);
reader.lines()
.skip(4) // skip first 4 lines: name, -{80}, revision and empty line
.map(s -> s.split("\\.")[4]) // group by the package name following "org.openjdk.jcstress.tests."
.distinct()
.filter(s -> !s.startsWith("sample")) // skip sample test
.forEach(TestGenerator::generate);
output.toFile().delete();
}
private final JcstressGroup group;
private TestGenerator(JcstressGroup group) {
this.group = group;
}
private void generate(BufferedReader reader) throws IOException {
// array is needed to change value inside a lambda
long[] count = {0L};
String root = Utils.TEST_SRC;
Path testFile = Paths.get(root)
.resolve(group.groupName)
.resolve("Test.java");
File testDir = testFile.getParent().toFile();
if (!testDir.mkdirs() && !testDir.exists()) {
throw new Error("Can not create directories for "
+ testFile.toString());
}
private static void generate(String group) {
Path testFile = Paths.get(Utils.TEST_SRC).resolve(group + ".java");
System.out.println("Generating " + testFile);
try (PrintStream ps = new PrintStream(testFile.toFile())) {
ps.print(COPYRIGHT);
ps.printf("/* DO NOT MODIFY THIS FILE. GENERATED BY %s */\n",
getClass().getName());
TestGenerator.class.getName());
reader.lines()
.filter(group.filter)
.forEach(s -> {
count[0]++;
ps.printf(DESC_FORMAT, s);
});
ps.printf(DESC_FORMAT, group);
ps.print('\n');
} catch (FileNotFoundException e) {
System.out.println("Failed to generate tests for " + group);
}
System.out.printf("%d tests generated in %s%n",
count[0], group.groupName);
}
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test accessAtomic
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.accessAtomic\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test acqrel
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.acqrel\.
*/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test atomicity
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.atomicity\.
*/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test atomics
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.atomics\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test causality
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.causality\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test coherence
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.coherence\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test copy
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.copy\.
*/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test countdownlatch
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.countdownlatch\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test defaultValues
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.defaultValues\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test executors
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.executors\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test fences
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.fences\.
*/

View File

@@ -1,829 +0,0 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test org.openjdk.jcstress.tests.fences.FencedAcquireReleaseTest
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.FencedAcquireReleaseTest
*/
/**
* @test org.openjdk.jcstress.tests.fences.FencedDekkerTest
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.FencedDekkerTest
*/
/**
* @test org.openjdk.jcstress.tests.fences.FencedPublicationTest
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.FencedPublicationTest
*/
/**
* @test org.openjdk.jcstress.tests.fences.FencedReadTwiceTest
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.FencedReadTwiceTest
*/
/**
* @test org.openjdk.jcstress.tests.fences.UnfencedAcquireReleaseTest
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.UnfencedAcquireReleaseTest
*/
/**
* @test org.openjdk.jcstress.tests.fences.UnfencedDekkerTest
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.UnfencedDekkerTest
*/
/**
* @test org.openjdk.jcstress.tests.fences.UnfencedPublicationTest
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.UnfencedPublicationTest
*/
/**
* @test org.openjdk.jcstress.tests.fences.UnfencedReadTwiceTest
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.UnfencedReadTwiceTest
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.AcquireFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.FullFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadLoadFenceTest.LoadLoadFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.FullFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest1.ReleaseFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.AcquireFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.LoadStoreFenceTest2.FullFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreLoadFenceTest.FullFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.FullFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.ReleaseFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest1.StoreStoreFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.FullFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.ReleaseFenceString
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceBoolean
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceBoolean
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceByte
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceByte
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceChar
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceChar
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceDouble
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceDouble
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceFloat
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceFloat
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceInt
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceInt
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceLong
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceLong
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceShort
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceShort
*/
/**
* @test org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceString
* @library /test/lib /
* @run driver/timeout=2400 applications.jcstress.JcstressRunner -v -m default -t org.openjdk.jcstress.tests.fences.varHandles.StoreStoreFenceTest2.StoreStoreFenceString
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test future
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.future\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test init
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.init\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test initClass
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.initClass\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test initLen
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.initLen\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test interrupt
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.interrupt\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test locks
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.locks\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test memeffects
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.memeffects\.
*/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test seqcst
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.seqcst\.
*/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test singletons
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.singletons\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test strings
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.strings\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test tearing
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.tearing\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test unsafe
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.unsafe\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test varhandles
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.varhandles\.
*/

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
/**
* @test volatiles
* @library /test/lib /
* @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.volatiles\.
*/

View File

@@ -205,7 +205,8 @@ public class LevelTransitionTest extends TieredLevelsTest {
}
private static class CompileMethodHolder {
private final int iter = 10;
// Make sure that loop backedge is never taken to prevent unexpected OSR compilations.
private final int iter = 1;
private int field = 42;
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -224,12 +224,12 @@ public class UnsafeGetStableArrayElement {
}
static void testMismatched(Callable<?> c, Runnable setDefaultAction) throws Exception {
testMismatched(c, setDefaultAction, false);
testMismatched(c, setDefaultAction, false, true);
}
static void testMismatched(Callable<?> c, Runnable setDefaultAction, boolean objectArray) throws Exception {
if (Compiler.isGraalEnabled() && !objectArray) {
// Graal will constant fold mismatched reads from primitive stable arrays
static void testMismatched(Callable<?> c, Runnable setDefaultAction, boolean objectArray, boolean aligned) throws Exception {
if (Compiler.isGraalEnabled() && !objectArray && aligned) {
// Graal will constant fold mismatched reads from primitive stable arrays, except unaligned ones
run(c, setDefaultAction, null);
} else {
run(c, null, setDefaultAction);
@@ -319,15 +319,15 @@ public class UnsafeGetStableArrayElement {
testMatched( Test::testD_D, Test::changeD);
// Object[], aligned accesses
testMismatched(Test::testL_J, Test::changeL, true); // long & double are always as large as an OOP
testMismatched(Test::testL_D, Test::changeL, true);
testMismatched(Test::testL_J, Test::changeL, true, true); // long & double are always as large as an OOP
testMismatched(Test::testL_D, Test::changeL, true, true);
testMatched( Test::testL_L, Test::changeL);
// Unaligned accesses
testMismatched(Test::testS_U, Test::changeS);
testMismatched(Test::testC_U, Test::changeC);
testMismatched(Test::testI_U, Test::changeI);
testMismatched(Test::testJ_U, Test::changeJ);
testMismatched(Test::testS_U, Test::changeS, false, false);
testMismatched(Test::testC_U, Test::changeC, false, false);
testMismatched(Test::testI_U, Test::changeI, false, false);
testMismatched(Test::testJ_U, Test::changeJ, true, false);
// No way to reliably check the expected behavior:
// (1) OOPs change during GC;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,7 @@ public class TestArrayAllocatorMallocLimit {
private static final String printFlagsFinalPattern = " *size_t *" + flagName + " *:?= *(\\d+) *\\{experimental\\} *";
public static void testDefaultValue() throws Exception {
ProcessBuilder pb = GCArguments.createJavaProcessBuilder(
ProcessBuilder pb = GCArguments.createTestJvm(
"-XX:+UnlockExperimentalVMOptions", "-XX:+PrintFlagsFinal", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());

View File

@@ -30,6 +30,7 @@
* @requires !vm.flightRecorder
* @requires vm.opt.ExplicitGCInvokesConcurrent != true
* @requires vm.opt.MaxGCPauseMillis == "null"
* @requires vm.compMode != "Xcomp"
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* @modules java.management

View File

@@ -28,6 +28,8 @@
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @requires vm.opt.ExplicitGCInvokesConcurrent != true
* @requires !vm.graal.enabled
* @requires vm.compMode != "Xcomp"
* @requires os.maxMemory > 1G
* @library /test/lib /
* @modules java.base/jdk.internal.misc

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/*
* This is a non-abstract class with an abstract method.
*
*/
super public class AbstractMethodClass
extends java/lang/Object
version 51:0 // Java 7 version
{
public Method "<init>":"()V"
stack 1 locals 1
{
aload_0;
invokespecial Method java/lang/Object."<init>":"()V";
return;
}
public abstract Method "abstractM":"()V";
}

View File

@@ -0,0 +1,68 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/*
* @test
* @bug 8323243
* @summary Test that invocation of an abstract method from JNI works correctly
* @compile AbstractMethodClass.jasm
* @run main/othervm/native TestJNIAbstractMethod
*/
/**
* We are testing invocation of an abstract method from JNI - which should
* simply result in throwning AbstractMethodError. To invoke an abstract method
* we must have an instance method (as abstract static methods are illegal),
* but instantiating an abstract class is also illegal at the Java language
* level, so we have to use a custom jasm class that contains an abstract method
* declaration, but which is not itself declared as an abstract class.
*/
public class TestJNIAbstractMethod {
// Invokes an abstract method from JNI and throws AbstractMethodError.
private static native void invokeAbstractM(Class<?> AMclass,
AbstractMethodClass receiver);
static {
System.loadLibrary("JNIAbstractMethod");
}
public static void main(String[] args) {
AbstractMethodClass obj = new AbstractMethodClass();
try {
System.out.println("Attempting direct invocation via Java");
obj.abstractM();
throw new RuntimeException("Did not get AbstractMethodError from Java!");
} catch (AbstractMethodError expected) {
System.out.println("ok - got expected exception: " + expected);
}
try {
System.out.println("Attempting direct invocation via JNI");
invokeAbstractM(obj.getClass(), obj);
throw new RuntimeException("Did not get AbstractMethodError from JNI!");
} catch (AbstractMethodError expected) {
System.out.println("ok - got expected exception: " + expected);
}
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
JNIEXPORT void JNICALL Java_TestJNIAbstractMethod_invokeAbstractM(JNIEnv* env,
jclass this_cls,
jclass target_cls,
jobject receiver) {
jmethodID mid = (*env)->GetMethodID(env, target_cls, "abstractM", "()V");
if (mid == NULL) {
fprintf(stderr, "Error looking up method abstractM\n");
(*env)->ExceptionDescribe(env);
exit(1);
}
printf("Invoking abstract method ...\n");
(*env)->CallVoidMethod(env, receiver, mid); // Should raise exception
}

View File

@@ -1,24 +0,0 @@
#
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
exclusiveAccess.dirs=.

View File

@@ -1,24 +0,0 @@
#
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
exclusiveAccess.dirs=.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@ import java.util.List;
import java.util.Optional;
import java.util.function.BiConsumer;
import jdk.test.lib.Platform;
import nsk.share.test.LazyIntArrayToString;
import nsk.share.test.TestUtils;
import vm.mlvm.meth.share.transform.v2.MHArrayEnvelopeTFPair;
@@ -70,47 +72,68 @@ public class MHTransformationGen {
private static final boolean USE_SAM = false; // Disabled in JDK7
private static final boolean USE_THROW_CATCH = false; // Test bugs
private static final Optional<MemoryPoolMXBean> NON_SEGMENTED_CODE_CACHE_POOL;
private static final Optional<MemoryPoolMXBean> NON_NMETHODS_POOL;
private static final Optional<MemoryPoolMXBean> PROFILED_NMETHODS_POOL;
private static final Optional<MemoryPoolMXBean> NON_PROFILED_NMETHODS_POOL ;
/**
* The class is used for periodical checks if a code-cache consuming operation
* could be executed (i.e. if code cache has enought free space for a typical operation).
*/
private static class CodeCacheMonitor {
// Limit numbers are arbitrary, feel free to change if arguably necessary
private static final int NON_SEGMENTED_CACHE_ALLOWANCE = 2_000_000;
private static final int SEGMENTED_CACHE_ALLOWANCE = 1_000_000;
private static final Optional<MemoryPoolMXBean> NON_SEGMENTED_CODE_CACHE_POOL;
private static final Optional<MemoryPoolMXBean> NON_NMETHODS_POOL;
private static final Optional<MemoryPoolMXBean> PROFILED_NMETHODS_POOL;
private static final Optional<MemoryPoolMXBean> NON_PROFILED_NMETHODS_POOL;
static {
var pools = ManagementFactory.getMemoryPoolMXBeans();
NON_SEGMENTED_CODE_CACHE_POOL = pools.stream()
.filter(pool -> pool.getName().equals("CodeCache")).findFirst();
NON_NMETHODS_POOL = pools.stream()
.filter(pool -> pool.getName().equals("CodeHeap 'non-nmethods'")).findFirst();
PROFILED_NMETHODS_POOL = pools.stream()
.filter(pool -> pool.getName().equals("CodeHeap 'profiled nmethods'")).findFirst();
NON_PROFILED_NMETHODS_POOL = pools.stream()
.filter(pool -> pool.getName().equals("CodeHeap 'non-profiled nmethods'")).findFirst();
}
// Trial runs show up that maximal increase in code cache consumption between checks (for one
// cycle/tree build in MHTransformationGen::createSequence), falls within the following intervals:
//
// | Threads number | Without Xcomp | With Xcomp |
// |----------------|---------------|------------|
// | 1 | 100-200 K | 400-500 K |
// | 10 | 1 - 2 M | 5-6 M |
//
// Those numbers are approximate (since trees are generated randomly and the total consumption
// between checks depends on how threads are aligned - for example, if all threads finish up their
// cycles approximately at one time, the consumption increase will be the highest, like with a
// resonance's amplitude)
// The 10 threads is chosen as it is a typical number for multi-threaded tests.
//
// Based on these numbers, values of 10 M for Xcomp and 5 M for non-Xcomp, were suggested.
private static final int NON_SEGMENTED_CACHE_ALLOWANCE = Platform.isComp() ? 10_000_000 : 5_000_000;
private static final int SEGMENTED_CACHE_ALLOWANCE = Platform.isComp() ? 10_000_000 : 5_000_000;
static {
var pools = ManagementFactory.getMemoryPoolMXBeans();
NON_SEGMENTED_CODE_CACHE_POOL = pools.stream()
.filter(pool -> pool.getName().equals("CodeCache")).findFirst();
NON_NMETHODS_POOL = pools.stream()
.filter(pool -> pool.getName().equals("CodeHeap 'non-nmethods'")).findFirst();
PROFILED_NMETHODS_POOL = pools.stream()
.filter(pool -> pool.getName().equals("CodeHeap 'profiled nmethods'")).findFirst();
NON_PROFILED_NMETHODS_POOL = pools.stream()
.filter(pool -> pool.getName().equals("CodeHeap 'non-profiled nmethods'")).findFirst();
}
public static final boolean isCodeCacheEffectivelyFull() {
var result = new Object() { boolean value = false; };
BiConsumer<MemoryPoolMXBean, Integer> check = (pool, limit) -> {
var usage = pool.getUsage();
result.value |= usage.getMax() - usage.getUsed() < limit;
};
NON_SEGMENTED_CODE_CACHE_POOL.ifPresent(pool -> check.accept(pool, NON_SEGMENTED_CACHE_ALLOWANCE));
NON_NMETHODS_POOL.ifPresent(pool -> check.accept(pool, SEGMENTED_CACHE_ALLOWANCE));
PROFILED_NMETHODS_POOL.ifPresent(pool -> check.accept(pool, SEGMENTED_CACHE_ALLOWANCE));
NON_PROFILED_NMETHODS_POOL.ifPresent(pool -> check.accept(pool, SEGMENTED_CACHE_ALLOWANCE));
return result.value;
}
};
public static class ThrowCatchTestException extends Throwable {
private static final long serialVersionUID = -6749961303738648241L;
}
private static final boolean isCodeCacheEffectivelyFull() {
var result = new Object() { boolean value = false; };
BiConsumer<MemoryPoolMXBean, Integer> check = (pool, limit) -> {
var usage = pool.getUsage();
result.value |= usage.getMax() - usage.getUsed() < limit;
};
NON_SEGMENTED_CODE_CACHE_POOL.ifPresent(pool -> check.accept(pool, NON_SEGMENTED_CACHE_ALLOWANCE));
NON_NMETHODS_POOL.ifPresent(pool -> check.accept(pool, SEGMENTED_CACHE_ALLOWANCE));
PROFILED_NMETHODS_POOL.ifPresent(pool -> check.accept(pool, SEGMENTED_CACHE_ALLOWANCE));
NON_PROFILED_NMETHODS_POOL.ifPresent(pool -> check.accept(pool, SEGMENTED_CACHE_ALLOWANCE));
return result.value;
}
@SuppressWarnings("unused")
public static MHMacroTF createSequence(Argument finalRetVal, Object boundObj, MethodHandle finalMH, Argument[] finalArgs) throws Throwable {
Env.traceDebug("Generating sequence.");
@@ -133,7 +156,7 @@ public class MHTransformationGen {
final int cyclesToBuild = nextInt(MAX_CYCLES);
for ( int i = 0; i < cyclesToBuild; i++) {
if (isCodeCacheEffectivelyFull()) {
if (CodeCacheMonitor.isCodeCacheEffectivelyFull()) {
Env.traceNormal("Not enought code cache to build up MH sequences anymore. " +
" Has only been able to achieve " + i + " out of " + cyclesToBuild);
break;

View File

@@ -20,6 +20,14 @@
# questions.
#
# All tests
all = \
:jaxp_all
jaxp_all = \
/
# Tiered testing definitions
# No jaxp tests are tier 1.
@@ -34,6 +42,3 @@ tier3 =
# No tier 4 tests.
tier4 =
jaxp_all = \
javax/xml/jaxp

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,9 @@
package jaxp.library;
import java.net.URI;
import java.net.URL;
import java.nio.file.Path;
import java.security.CodeSource;
import java.security.Permission;
import java.security.PermissionCollection;
@@ -161,7 +163,7 @@ public class JAXPPolicyManager {
*/
class TestPolicy extends Policy {
private final static Set<String> TEST_JARS =
Set.of("jtreg.jar", "javatest.jar", "testng.jar", "jcommander.jar");
Set.of("jtreg.*jar", "javatest.*jar", "testng.*jar", "jcommander.*jar");
private final PermissionCollection permissions = new Permissions();
private ThreadLocal<Map<Integer, Permission>> transientPermissions = new ThreadLocal<>();
@@ -213,9 +215,10 @@ class TestPolicy extends Policy {
private boolean isTestMachineryDomain(ProtectionDomain domain) {
CodeSource cs = (domain == null) ? null : domain.getCodeSource();
URL loc = (cs == null) ? null : cs.getLocation();
String path = (loc == null) ? null : loc.getPath();
return path != null && TEST_JARS.stream()
.filter(path::endsWith)
URI uri = (loc == null) ? null : URI.create(loc.toString());
String name = (uri == null) ? null : Path.of(uri).getFileName().toString();
return name != null && TEST_JARS.stream()
.filter(name::matches)
.findAny()
.isPresent();
}

View File

@@ -517,7 +517,6 @@ java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic-
# jdk_io
java/io/pathNames/GeneralWin32.java 8180264 windows-all
java/io/File/createTempFile/SpecialTempFile.java 8274122 windows11
############################################################################
@@ -607,8 +606,6 @@ sun/security/pkcs11/ec/TestKeyFactory.java 8026976 generic-
sun/security/pkcs11/KeyStore/ClientAuth.sh 8254806 solaris-all
sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java 8161536 generic-all
sun/security/tools/keytool/ListKeychainStore.sh 8156889 macosx-all
javax/net/ssl/DTLS/PacketLossRetransmission.java 8169086 macosx-x64
javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-all
javax/net/ssl/DTLS/CipherSuite.java 8202059 macosx-x64

View File

@@ -20,6 +20,17 @@
# questions.
#
###############################################################################
#
# All tests
#
all = \
:jdk_all
jdk_all = \
/
###############################################################################
#
# Tiered testing definitions

View File

@@ -57,12 +57,11 @@ public class JdwpOnThrowTest {
private static AttachingConnector attachingConnector;
public static void main(String[] args) throws Exception {
int port = findFreePort();
try (Debuggee debuggee = Debuggee.launcher("ThrowCaughtException").setAddress("localhost:" + port)
.enableOnThrow("Ex", "Start").setSuspended(true).launch()) {
try (Debuggee debuggee = Debuggee.launcher("ThrowCaughtException")
.enableOnThrow("Ex").setSuspended(true).launch()) {
VirtualMachine vm = null;
try {
vm = attach("localhost", "" + port);
vm = attach("localhost", debuggee.getAddress());
EventQueue queue = vm.eventQueue();
log("Waiting for exception event");
long start = System.currentTimeMillis();
@@ -111,14 +110,6 @@ public class JdwpOnThrowTest {
}
}
private static int findFreePort() {
try (ServerSocket socket = new ServerSocket(0)) {
return socket.getLocalPort();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private static VirtualMachine attach(String address, String port) throws IOException {
if (attachingConnector == null) {
attachingConnector = (AttachingConnector)getConnector(ATTACH_CONNECTOR);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
package lib.jdb;
import jdk.test.lib.Utils;
import jdk.test.lib.util.Pair;
import jdk.test.lib.process.ProcessTools;
import java.io.Closeable;
@@ -32,6 +33,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@@ -65,12 +67,12 @@ public class Debuggee implements Closeable {
public static class Launcher {
private final String mainClass;
private final List<String> options = new LinkedList<>();
private String vmOptions = null;
private String transport = "dt_socket";
private String address = null;
private boolean suspended = true;
private String onthrow = "";
private boolean waitForPortPrint = true;
private String expectedOutputBeforeThrow = "";
private static final String LAUNCH_ECHO_STRING = "Listen Args:";
private Launcher(String mainClass) {
this.mainClass = mainClass;
@@ -83,6 +85,10 @@ public class Debuggee implements Closeable {
this.options.addAll(options);
return this;
}
public Launcher addVMOptions(String vmOptions) {
this.vmOptions = vmOptions;
return this;
}
// default is "dt_socket"
public Launcher setTransport(String value) {
transport = value;
@@ -99,17 +105,17 @@ public class Debuggee implements Closeable {
return this;
}
// required to pass non null port with address and emit string before the throw
public Launcher enableOnThrow(String value, String expectedOutputBeforeThrow) {
this.onthrow = value;
this.waitForPortPrint = false;
this.expectedOutputBeforeThrow = expectedOutputBeforeThrow;
public Launcher enableOnThrow(String exceptionClassName) {
this.onthrow = exceptionClassName;
return this;
}
public ProcessBuilder prepare() {
List<String> debuggeeArgs = new LinkedList<>();
String onthrowArgs = onthrow.isEmpty() ? "" : ",onthrow=" + onthrow + ",launch=exit";
if (vmOptions != null) {
debuggeeArgs.add(vmOptions);
}
String onthrowArgs = onthrow.isEmpty() ? "" : ",onthrow=" + onthrow + ",launch=echo " + LAUNCH_ECHO_STRING;
debuggeeArgs.add("-agentlib:jdwp=transport=" + transport
+ (address == null ? "" : ",address=" + address)
+ ",server=y,suspend=" + (suspended ? "y" : "n")
@@ -120,41 +126,57 @@ public class Debuggee implements Closeable {
}
public Debuggee launch(String name) {
return new Debuggee(prepare(), name, waitForPortPrint, expectedOutputBeforeThrow);
return new Debuggee(prepare(), name,
onthrow.isEmpty() ?
Launcher::parseListenAddress :
Launcher::parseLaunchEchoListenAddress
);
}
public Debuggee launch() {
return launch("debuggee");
}
/**
* Parses debuggee output to get listening transport and address, printed by `launch=echo`.
* Returns null if the string specified does not contain required info.
*/
private static Pair<String, String> parseLaunchEchoListenAddress(String debuggeeOutput) {
Pattern listenRegexp = Pattern.compile(LAUNCH_ECHO_STRING + " \\b(.+)\\b \\b(.+)\\b");
Matcher m = listenRegexp.matcher(debuggeeOutput);
if (m.find()) {
return new Pair<String, String>(m.group(1), m.group(2));
}
return null;
}
/**
* Parses debuggee output to get listening transport and address, printed by `launch=echo`.
* Returns null if the string specified does not contain required info.
*/
private static Pair<String, String> parseListenAddress(String debuggeeOutput) {
Pattern listenRegexp = Pattern.compile("Listening for transport \\b(.+)\\b at address: \\b(.+)\\b");
Matcher m = listenRegexp.matcher(debuggeeOutput);
if (m.find()) {
return new Pair<String, String>(m.group(1), m.group(2));
}
return null;
}
}
// starts the process, waits for "Listening for transport" output and detects transport/address
private Debuggee(ProcessBuilder pb, String name, boolean waitForPortPrint, String expectedOutputBeforeThrow) {
// debuggeeListen[0] - transport, debuggeeListen[1] - address
// starts the process, waits until the provided addressDetector detects transport/address from the process output
private Debuggee(ProcessBuilder pb, String name, Function<String, Pair<String, String>> addressDetector) {
String[] debuggeeListen = new String[2];
Pattern listenRegexp = Pattern.compile("Listening for transport \\b(.+)\\b at address: \\b(.+)\\b");
if (!waitForPortPrint) {
try {
p = ProcessTools.startProcess(name, pb, s -> {output.add(s);}, s -> {
return s.equals(expectedOutputBeforeThrow);
}, 30, TimeUnit.SECONDS);
} catch (IOException | InterruptedException | TimeoutException ex) {
throw new RuntimeException("failed to launch debuggee", ex);
}
transport = null;
address = null;
return;
}
try {
p = ProcessTools.startProcess(name, pb,
s -> output.add(s), // output consumer
s -> { // warm-up predicate
Matcher m = listenRegexp.matcher(s);
if (!m.matches()) {
return false;
s -> {
Pair<String, String> addr = addressDetector.apply(s);
if (addr != null) {
debuggeeListen[0] = addr.first;
debuggeeListen[1] = addr.second;
return true;
}
debuggeeListen[0] = m.group(1);
debuggeeListen[1] = m.group(2);
return true;
return false;
},
30, TimeUnit.SECONDS);
transport = debuggeeListen[0];

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -124,7 +124,7 @@ public class LdapPoolTimeoutTest {
// assertCompletion may wrap a CommunicationException in an RTE
assertNotNull(msg);
assertTrue(msg.contains("Network is unreachable")
|| msg.contains("No route to host"));
|| msg.contains("No route to host") || msg.contains("Connection timed out"));
} catch (NamingException ex) {
String msg = ex.getCause() == null ? ex.getMessage() : ex.getCause().getMessage();
System.err.println("MSG: " + msg);

View File

@@ -0,0 +1,252 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4085183 8000630
@summary tests that clipboard contents is retrieved even if the app didn't
receive native events for a long time.
@requires (os.family != "mac")
@key headful
@run main DelayedQueryTest
*/
import java.awt.AWTException;
import java.awt.Button;
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.Panel;
import java.awt.Point;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.ClipboardOwner;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;
import java.awt.event.InputEvent;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
public class DelayedQueryTest implements ClipboardOwner, Runnable {
int returnCode = Child.CHILD_RETURN_CODE_NOT_READY;
Process childProcess = null;
Frame frame;
public static void main(String[] args)
throws InterruptedException, InvocationTargetException {
String osName = System.getProperty("os.name");
if (osName.toLowerCase().contains("os x")) {
System.out.println("This test is not for MacOS, considered passed.");
return;
}
DelayedQueryTest delayedQueryTest = new DelayedQueryTest();
EventQueue.invokeAndWait(delayedQueryTest::initAndShowGui);
try {
delayedQueryTest.start();
} finally {
EventQueue.invokeAndWait(() -> delayedQueryTest.frame.dispose());
}
}
public void initAndShowGui(){
frame = new Frame("DelayedQueryTest");
frame.add(new Panel());
frame.setBounds(200,200, 200, 200);
frame.setVisible(true);
}
public void start() {
try {
Robot robot = new Robot();
// Some mouse activity to update the Xt time stamp at
// the parent process.
robot.delay(1000);
robot.waitForIdle();
Point p = frame.getLocationOnScreen();
robot.mouseMove(p.x + 100, p.y + 100);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
} catch (AWTException e) {
e.printStackTrace();
throw new RuntimeException("The test failed.");
}
Child.sysClipboard.setContents(Child.transferable, this);
String javaPath = System.getProperty("java.home", "");
String[] command = {
javaPath + File.separator + "bin" + File.separator + "java",
"-cp", System.getProperty("test.classes", "."),
"Child"
};
try {
Process process = Runtime.getRuntime().exec(command);
childProcess = process;
returnCode = process.waitFor();
childProcess = null;
InputStream errorStream = process.getErrorStream();
int count = errorStream.available();
if (count > 0) {
byte[] b = new byte[count];
errorStream.read(b);
System.err.println("========= Child VM System.err ========");
System.err.print(new String(b));
System.err.println("======================================");
}
} catch (Throwable e) {
e.printStackTrace();
throw new RuntimeException("The test failed.");
}
if (returnCode != Child.CHILD_RETURN_CODE_OK) {
System.err.println("Child VM: returned " + returnCode);
throw new RuntimeException("The test failed.");
}
} // start()
public void lostOwnership(Clipboard clipboard,
Transferable contents) {
// At this moment the child process has definitely started.
// So we can try to retrieve the clipboard contents set
// by the child process.
new Thread(this).start();
}
public void run() {
// We are going to check if it is possible to retrieve the data
// after the child process has set the clipboard contents twice,
// since after the first setting the retrieval is always successful.
// So we wait to let the child process set the clipboard contents
// twice.
try {
Thread.sleep(Child.CHILD_SELECTION_CHANGE_TIMEOUT);
} catch (InterruptedException e) {
e.printStackTrace();
}
try {
String s = (String)Child.sysClipboard
.getContents(null)
.getTransferData(DataFlavor.stringFlavor);
if (!"String".equals(s)) {
System.err.println("Data retrieved: " + s);
throw new RuntimeException("Retrieved data is incorrect.");
}
} catch (Exception e) {
e.printStackTrace();
if (childProcess != null) {
childProcess.destroy();
childProcess = null;
}
throw new RuntimeException("Failed to retrieve the data.");
}
Child.sysClipboard.setContents(Child.transferable, null);
}
}
class Child {
static final Clipboard sysClipboard =
Toolkit.getDefaultToolkit().getSystemClipboard();
static final Transferable transferable = new StringSelection("String");
/*
* Timeouts.
*/
static final int FRAME_ACTIVATION_TIMEOUT = 1000;
static final int PARENT_TIME_STAMP_TIMEOUT = 1000;
static final int CHILD_SELECTION_CHANGE_TIMEOUT =
FRAME_ACTIVATION_TIMEOUT + PARENT_TIME_STAMP_TIMEOUT + 5000;
static final int PARENT_RETRIEVE_DATA_TIMEOUT = 10000;
/*
* Child process return codes.
*/
static final int CHILD_RETURN_CODE_NOT_READY = -1;
static final int CHILD_RETURN_CODE_OK = 0;
static final int CHILD_RETURN_CODE_UNEXPECTED_EXCEPTION = 1;
static final int CHILD_RETURN_CODE_OTHER_FAILURE = 2;
static Button button;
static void initAndShowGui() {
final Frame frame = new Frame();
button = new Button("button");
frame.add(button);
frame.pack();
frame.setLocation(100, 100);
frame.setVisible(true);
}
public static void main(String[] args) {
sysClipboard.setContents(
new StringSelection("First String"), null);
// Some mouse activity to update the Xt time stamp at
// the child process.
try {
EventQueue.invokeAndWait(Child::initAndShowGui);
try {
Thread.sleep(FRAME_ACTIVATION_TIMEOUT);
} catch (InterruptedException e) {
e.printStackTrace();
System.exit(CHILD_RETURN_CODE_UNEXPECTED_EXCEPTION);
}
Robot robot = new Robot();
robot.waitForIdle();
Point p = button.getLocationOnScreen();
robot.mouseMove(p.x + 10, p.y + 10);
// Wait to let the Xt time stamp become out-of-date.
try {
Thread.sleep(PARENT_TIME_STAMP_TIMEOUT);
} catch (InterruptedException e) {
e.printStackTrace();
System.exit(CHILD_RETURN_CODE_UNEXPECTED_EXCEPTION);
}
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
} catch (Exception e) {
e.printStackTrace();
System.exit(CHILD_RETURN_CODE_UNEXPECTED_EXCEPTION);
}
sysClipboard.setContents(transferable, new ClipboardOwner() {
public void lostOwnership(Clipboard clipboard,
Transferable contents) {
System.exit(CHILD_RETURN_CODE_OK);
}
});
// Wait to let the parent process retrieve the data.
try {
Thread.sleep(PARENT_RETRIEVE_DATA_TIMEOUT);
} catch (InterruptedException e) {
e.printStackTrace();
}
// Parent failed to set clipboard contents, so we signal test failure
System.exit(CHILD_RETURN_CODE_OTHER_FAILURE);
}
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4378007 4250859
@summary Verifies that setting the contents of the system Clipboard to null
throws a NullPointerException
@key headful
@run main NullContentsTest
*/
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
public class NullContentsTest {
public static void main(String[] args) {
// Clipboard.setContents(null, foo) should throw an NPE, but
// Clipboard.setContents(bar, foo), where bar.getTransferData(baz)
// returns null, should not.
Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
try {
clip.setContents(null, null);
} catch (NullPointerException e) {
StringSelection ss = new StringSelection(null);
try {
clip.setContents(ss, null);
} catch (NullPointerException ee) {
throw new RuntimeException("test failed: null transfer data");
}
System.err.println("test passed");
return;
}
throw new RuntimeException("test failed: null Transferable");
}
}

View File

@@ -0,0 +1,198 @@
/*
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4696186
@summary tests that NotSerializableException is not printed in the console if
non-serializable object with DataFlavor.javaJVMLocalObjectMimeType
is set into the clipboard
@key headful
@run main SerializeLocalFlavorTest
*/
import java.awt.Toolkit;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.File;
import java.io.InputStream;
import java.io.Serializable;
public class SerializeLocalFlavorTest {
private boolean failed = false;
public static void main(String[] args) {
new SerializeLocalFlavorTest().start();
}
public void start () {
try {
String[] command = {
System.getProperty("java.home", "")
+ File.separator + "bin" + File.separator
+ "java",
"-cp",
System.getProperty("test.classes", "."),
"Child"
};
Process process = Runtime.getRuntime().exec(command);
ProcessResults pres = ProcessResults.doWaitFor(process);
if (pres.stderr != null && pres.stderr.length() > 0) {
System.err.println("========= Child err ========");
System.err.print(pres.stderr);
System.err.println("======================================");
}
if (pres.stdout != null && pres.stdout.length() > 0) {
System.err.println("========= Child out ========");
System.err.print(pres.stdout);
System.err.println("======================================");
}
if (pres.stderr.indexOf("java.io.NotSerializableException") >= 0) {
failed = true;
}
} catch (Exception e) {
e.printStackTrace();
}
if (failed) {
throw new RuntimeException(
"The test failed: java.io.NotSerializableException printed!");
} else {
System.err.println("The test passed!");
}
}
}
class Child {
public static void main (String [] args) throws Exception {
NotSerializableLocalTransferable t =
new NotSerializableLocalTransferable(new NotSer());
Toolkit.getDefaultToolkit()
.getSystemClipboard().setContents(t, null);
}
}
class NotSerializableLocalTransferable implements Transferable {
public final DataFlavor flavor;
private final DataFlavor[] flavors;
private final Object data;
public NotSerializableLocalTransferable(Object data) throws Exception {
this.data = data;
flavor = new DataFlavor(
DataFlavor.javaJVMLocalObjectMimeType +
";class=" + "\"" + data.getClass().getName() + "\"");
this.flavors = new DataFlavor[] { flavor };
}
public DataFlavor[] getTransferDataFlavors() {
return flavors.clone();
}
public boolean isDataFlavorSupported(DataFlavor flavor) {
return this.flavor.equals(flavor);
}
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException
{
if (this.flavor.equals(flavor)) {
return (Object)data;
}
throw new UnsupportedFlavorException(flavor);
}
}
class NotSer implements Serializable {
private Object field = new Object(); // not serializable field
}
class ProcessResults {
public int exitValue;
public String stdout;
public String stderr;
public ProcessResults() {
exitValue = -1;
stdout = "";
stderr = "";
}
/**
* Method to perform a "wait" for a process and return its exit value.
* This is a workaround for <code>Process.waitFor()</code> never returning.
*/
public static ProcessResults doWaitFor(Process p) {
ProcessResults pres = new ProcessResults();
InputStream in = null;
InputStream err = null;
try {
in = p.getInputStream();
err = p.getErrorStream();
boolean finished = false;
while (!finished) {
try {
while (in.available() > 0) {
pres.stdout += (char)in.read();
}
while (err.available() > 0) {
pres.stderr += (char)err.read();
}
// Ask the process for its exitValue. If the process
// is not finished, an IllegalThreadStateException
// is thrown. If it is finished, we fall through and
// the variable finished is set to true.
pres.exitValue = p.exitValue();
finished = true;
}
catch (IllegalThreadStateException e) {
// Process is not finished yet;
// Sleep a little to save on CPU cycles
Thread.sleep(500);
}
}
if (in != null) in.close();
if (err != null) err.close();
}
catch (Throwable e) {
System.err.println("doWaitFor(): unexpected exception");
e.printStackTrace();
}
return pres;
}
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright (c) 2006, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4330102
@summary Tests that Color object is serializable
@run main ColorSerializationTest
*/
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.geom.AffineTransform;
import java.awt.image.IndexColorModel;
import java.io.ObjectOutputStream;
import java.io.ByteArrayOutputStream;
public class ColorSerializationTest {
public static void main(String[] args) {
java.awt.Color cobj = new java.awt.Color(255, 255, 255);
try {
cobj.createContext(
new IndexColorModel(
8, 1,
new byte[]{0}, new byte[]{0}, new byte[]{0}),
new Rectangle(1, 1, 2, 3),
new Rectangle(3, 3),
new AffineTransform(),
new RenderingHints(null));
ByteArrayOutputStream ostream = new ByteArrayOutputStream();
ObjectOutputStream objos = new ObjectOutputStream(ostream);
objos.writeObject(cobj);
objos.close();
System.out.println("Test PASSED");
} catch (java.io.IOException e) {
System.out.println("Test FAILED");
throw new RuntimeException("Test FAILED: Color is not serializable: " + e.getMessage());
}
}
}

View File

@@ -0,0 +1,376 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4240721
@summary Test Component.getListeners API added in 1.3
@key headful
@run main GetListenersTest
*/
import java.awt.Button;
import java.awt.Canvas;
import java.awt.Checkbox;
import java.awt.CheckboxMenuItem;
import java.awt.Choice;
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.Label;
import java.awt.Menu;
import java.awt.MenuBar;
import java.awt.MenuItem;
import java.awt.Panel;
import java.awt.Scrollbar;
import java.awt.TextArea;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentListener;
import java.awt.event.ContainerAdapter;
import java.awt.event.ContainerListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusListener;
import java.awt.event.HierarchyBoundsAdapter;
import java.awt.event.HierarchyBoundsListener;
import java.awt.event.HierarchyEvent;
import java.awt.event.HierarchyListener;
import java.awt.event.InputMethodEvent;
import java.awt.event.InputMethodListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionAdapter;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.awt.event.TextEvent;
import java.awt.event.TextListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowFocusListener;
import java.awt.event.WindowListener;
import java.awt.event.WindowStateListener;
import java.beans.BeanInfo;
import java.beans.EventSetDescriptor;
import java.beans.Introspector;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.lang.reflect.Method;
import java.util.EventListener;
public class GetListenersTest {
public static void main(String args[]) throws Exception {
EventQueue.invokeAndWait(()-> {
// Create frame with a bunch of components
// and test that each component returns
// the right type of listeners from Component.getListeners
GLTFrame gltFrame = new GLTFrame();
try {
gltFrame.initAndShowGui();
gltFrame.test();
} catch (Exception e) {
throw new RuntimeException("Test failed", e);
} finally {
gltFrame.dispose();
}
});
}
/*
* Checks an object has a listener for every support listener type
*/
static void checkForListenersOfEveryType(Object object) throws Exception {
Class type = object.getClass();
BeanInfo info = Introspector.getBeanInfo(type);
EventSetDescriptor esets[] = info.getEventSetDescriptors();
// ensure there are listeners for every type
for (int nset = 0; nset < esets.length; nset++) {
Class listenerType = esets[nset].getListenerType();
EventListener listener[] = getListeners(object, listenerType);
// Skip PropertyChangeListener for now
if (listener.length == 0 && validListenerToTest(listenerType)) {
throw new RuntimeException("getListeners didn't return type "
+ listenerType);
}
}
System.out.println("************");
System.out.println("PASSED: getListeners on "
+ object + " has all the right listeners.");
System.out.println("************");
}
/*
* Calls getListeners on the object
*/
static EventListener[] getListeners(Object object, Class type)
throws Exception {
Method methods[] = object.getClass().getMethods();
Method method = null;
for (int nmethod = 0; nmethod < methods.length; nmethod++) {
if (methods[nmethod].getName().equals("getListeners")) {
method = methods[nmethod];
break;
}
}
if (method == null) {
throw new RuntimeException("Object "
+ object + " has no getListeners method");
}
Class params[] = {type};
EventListener listeners[] = null;
listeners = (EventListener[]) method.invoke(object, params);
System.out.println("Listeners of type: " + type + " on " + object);
GetListenersTest.printArray(listeners);
return listeners;
}
/*
* Adds a listener of every type to the object
*/
static void addDummyListenersOfEveryType(Object object) throws Exception {
Class type = object.getClass();
BeanInfo info = Introspector.getBeanInfo(type);
EventSetDescriptor esets[] = info.getEventSetDescriptors();
// add every kind of listener
for (int nset = 0; nset < esets.length; nset++) {
Class listenerType = esets[nset].getListenerType();
EventListener listener = makeListener(listenerType);
Method addListenerMethod = esets[nset].getAddListenerMethod();
Object params[] = {listener};
addListenerMethod.invoke(object, params);
}
}
/*
* Determines what listeners to exclude from the test for now
*/
static boolean validListenerToTest(Class listenerType) {
/* Don't have any provision for PropertyChangeListeners... */
if ( listenerType == PropertyChangeListener.class ) {
return false;
}
return true;
}
static void testGetListeners(Object object) throws Exception {
GetListenersTest.addDummyListenersOfEveryType(object);
GetListenersTest.checkForListenersOfEveryType(object);
}
static void printArray(Object objects[]) {
System.out.println("{");
for(int n = 0; n < objects.length; n++) {
System.out.println("\t"+objects[n]+",");
}
System.out.println("}");
}
/*
* Makes a dummy listener implementation for the given listener type
*/
static EventListener makeListener(Class listenerType) throws Exception {
Object map[][] = {
{ActionListener.class, MyActionAdapter.class},
{AdjustmentListener.class, MyAdjustmentAdapter.class},
{ComponentListener.class, MyComponentAdapter.class},
{ContainerListener.class, MyContainerAdapter.class},
{FocusListener.class, MyFocusAdapter.class},
{HierarchyBoundsListener.class, MyHierarchyBoundsAdapter.class},
{HierarchyListener.class, MyHierarchyAdapter.class},
{InputMethodListener.class, MyInputMethodAdapter.class},
{ItemListener.class, MyItemAdapter.class},
{KeyListener.class, MyKeyAdapter.class},
{MouseListener.class, MyMouseAdapter.class},
{MouseMotionListener.class, MyMouseMotionAdapter.class},
{MouseWheelListener.class, MyMouseWheelAdapter.class},
{TextListener.class, MyTextAdapter.class},
{WindowListener.class, MyWindowAdapter.class},
{WindowFocusListener.class, MyWindowFocusAdapter.class},
{WindowStateListener.class, MyWindowStateAdapter.class},
{PropertyChangeListener.class, MyPropertyChangeAdapter.class},
};
for (int n = 0; n < map.length; n++) {
if (map[n][0] == listenerType) {
Class adapterClass = (Class) map[n][1];
EventListener listener =
(EventListener) adapterClass.newInstance();
return listener;
}
}
throw new RuntimeException("No adapter found for listener type "
+ listenerType);
}
}
class GLTFrame extends Frame {
MenuItem mitem;
CheckboxMenuItem cmitem;
GLTFrame() {
super("Component.getListeners API Test");
}
public void initAndShowGui() {
setLayout(new FlowLayout());
add(new Label("Label"));
add(new Button("Button"));
add(new Checkbox("Checkbox"));
Choice c = new Choice();
c.add("choice");
java.awt.List l = new java.awt.List();
l.add("list");
add(new Scrollbar());
add(new TextField("TextField"));
add(new TextArea("TextArea"));
add(new Panel());
add(new Canvas());
MenuBar menuBar = new MenuBar();
Menu menu = new Menu("Menu");
mitem = new MenuItem("Item 1");
cmitem = new CheckboxMenuItem("Item 2");
menu.add(mitem);
menu.add(cmitem);
menuBar.add(menu);
setMenuBar(menuBar);
pack();
setVisible(true);
}
public void test() throws Exception {
// test Frame.getListeners
GetListenersTest.testGetListeners(this);
//
// test getListeners on menu items
//
GetListenersTest.testGetListeners(mitem);
GetListenersTest.testGetListeners(cmitem);
//
// test getListeners on all AWT Components
//
Component components[] = getComponents();
for (int nc = 0; nc < components.length; nc++) {
GetListenersTest.testGetListeners(components[nc]);
}
}
}
/************************************************
* Dummy listener implementations we add to our components/models/objects
*/
class MyPropertyChangeAdapter implements PropertyChangeListener {
public void propertyChange(PropertyChangeEvent evt) {}
}
class MyActionAdapter implements ActionListener {
public void actionPerformed(ActionEvent ev) {
}
}
class MyAdjustmentAdapter implements AdjustmentListener {
public void adjustmentValueChanged(AdjustmentEvent e) {
}
}
class MyHierarchyAdapter implements HierarchyListener {
public void hierarchyChanged(HierarchyEvent e) {
}
}
class MyInputMethodAdapter implements InputMethodListener {
public void inputMethodTextChanged(InputMethodEvent event) {
}
public void caretPositionChanged(InputMethodEvent event) {
}
}
class MyItemAdapter implements ItemListener {
public void itemStateChanged(ItemEvent e) {
}
}
class MyTextAdapter implements TextListener {
public void textValueChanged(TextEvent e) {
}
}
class MyComponentAdapter extends ComponentAdapter {
}
class MyContainerAdapter extends ContainerAdapter {
}
class MyFocusAdapter extends FocusAdapter {
}
class MyHierarchyBoundsAdapter extends HierarchyBoundsAdapter {
}
class MyKeyAdapter extends KeyAdapter {
}
class MyMouseAdapter extends MouseAdapter {
}
class MyMouseMotionAdapter extends MouseMotionAdapter {
}
class MyMouseWheelAdapter implements MouseWheelListener {
public void mouseWheelMoved(MouseWheelEvent e) {}
}
class MyWindowAdapter extends WindowAdapter {
}
class MyWindowFocusAdapter implements WindowFocusListener {
public void windowGainedFocus(WindowEvent t) {}
public void windowLostFocus(WindowEvent t) {}
}
class MyWindowStateAdapter extends WindowAdapter {
}

View File

@@ -0,0 +1,127 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4852790
@summary Frame disposal must remove opened popup without exception
@key headful
*/
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.awt.Point;
import java.awt.Robot;
import java.awt.event.InputEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
public class OpenedPopupFrameDisposal {
public static final int SIZE = 300;
volatile JFrame jf = null;
volatile JComboBox<String> jcb = null;
public void start() {
jf = new JFrame("OpenedPopupFrameDisposal - Frame to dispose");
// Note that original bug cannot be reproduced without JMenuBar present.
jf.setJMenuBar(new JMenuBar());
jf.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
jf.setLocationRelativeTo(null);
jf.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent evt) {
jf.setVisible(false);
jf.dispose();
}
});
JPanel panel = new JPanel(new FlowLayout());
jcb = new JComboBox<>();
jcb.addItem("one");
jcb.addItem("two");
jcb.addItem("Three");
panel.add(jcb);
jf.getContentPane().add(panel, BorderLayout.CENTER);
jf.pack();
jf.setSize(new Dimension(SIZE, SIZE));
jf.setVisible(true);
}
public void test() throws Exception {
Robot robot = new Robot();
robot.delay(1000); // wait for jf visible
Point pt = jf.getLocationOnScreen();
int x, y;
x = pt.x + SIZE / 2;
y = pt.y + SIZE / 2;
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(1000);
pt = jcb.getLocationOnScreen();
x = pt.x + jcb.getWidth() / 2;
y = pt.y + jcb.getHeight() / 2;
robot.mouseMove(x, y);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(1000);
// Here on disposal we had a NullPointerException
EventQueue.invokeAndWait(() -> {
if (jf != null) {
jf.setVisible(false);
jf.dispose();
}
});
}
public static void main(String[] args) throws Exception {
OpenedPopupFrameDisposal imt = new OpenedPopupFrameDisposal();
try {
EventQueue.invokeAndWait(imt::start);
imt.test();
} finally {
EventQueue.invokeAndWait(() -> {
if (imt.jf != null) {
imt.jf.dispose();
}
});
}
}
}

View File

@@ -0,0 +1,56 @@
/*
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4546535
@summary java.awt.Container.remove(int) throws unexpected NPE
*/
import java.awt.Canvas;
import java.awt.Panel;
public class RemoveByIndexExceptionTest {
public static void main(String[] args) throws Exception {
Panel p = new Panel();
p.add(new Canvas());
p.remove(0);
int[] bad = {-1, 0, 1};
for (int i = 0; i < bad.length; i++) {
try {
System.out.println("Removing " + bad[i]);
p.remove(bad[i]);
System.out.println("No exception");
} catch (ArrayIndexOutOfBoundsException e) {
e.printStackTrace();
System.out.println("This is correct exception - " + e);
} catch (NullPointerException e) {
e.printStackTrace();
throw new RuntimeException("Test Failed: NPE was thrown.");
}
}
System.out.println("Test Passed.");
}
}

View File

@@ -0,0 +1,105 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4924516
@summary Verifies that SHOWING_CHANGED event is propagated to \
HierarchyListeners then toolkit enabled
@key headful
*/
import java.awt.AWTEvent;
import java.awt.EventQueue;
import java.awt.Toolkit;
import java.awt.event.AWTEventListener;
import java.awt.event.HierarchyEvent;
import java.awt.event.HierarchyListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class ShowingChangedEventTest
implements AWTEventListener, HierarchyListener{
private boolean eventRegisteredOnButton = false;
private final JFrame frame = new JFrame("ShowingChangedEventTest");
private final JPanel panel = new JPanel();
private final JButton button = new JButton();
public static void main(String[] args) throws Exception {
EventQueue.invokeAndWait(() -> {
ShowingChangedEventTest showingChangedEventTest
= new ShowingChangedEventTest();
try {
showingChangedEventTest.start();
} finally {
showingChangedEventTest.frame.dispose();
}
});
}
public void start () {
frame.getContentPane().add(panel);
panel.add(button);
frame.pack();
frame.setVisible(true);
Toolkit.getDefaultToolkit()
.addAWTEventListener(this, AWTEvent.HIERARCHY_EVENT_MASK);
button.addHierarchyListener(this);
panel.setVisible(false);
if (!eventRegisteredOnButton){
throw new RuntimeException("Event wasn't registered on Button.");
}
}
@Override
public void eventDispatched(AWTEvent awtevt) {
if (awtevt instanceof HierarchyEvent) {
HierarchyEvent hevt = (HierarchyEvent) awtevt;
if (hevt != null && (hevt.getChangeFlags()
& HierarchyEvent.SHOWING_CHANGED) != 0) {
System.out.println("Hierarchy event was received on Toolkit. "
+ "SHOWING_CHANGED for "
+ hevt.getChanged().getClass().getName());
}
}
}
@Override
public void hierarchyChanged(HierarchyEvent e) {
if ((HierarchyEvent.SHOWING_CHANGED & e.getChangeFlags()) != 0) {
System.out.println("Hierarchy event was received on Button. "
+ "SHOWING_CHANGED for "
+ e.getChanged().getClass().getName());
}
eventRegisteredOnButton = true;
}
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4994151
@summary REGRESSION: Bug when setting the foreground of a JWindow
@key headful
*/
import java.awt.EventQueue;
import java.awt.Color;
import javax.swing.JWindow;
public class SetForegroundTest {
static JWindow jwindow;
public static void main(String[] args) throws Exception {
try {
EventQueue.invokeAndWait(() -> {
jwindow = new JWindow();
jwindow.pack();
jwindow.setForeground(Color.BLACK);
System.out.println("TEST PASSED");
});
} finally {
EventQueue.invokeAndWait(() -> {
if (jwindow != null) {
jwindow.dispose();
}
});
}
}
}

View File

@@ -0,0 +1,115 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4791953
@requires (os.family == "linux" | os.family == "mac")
@summary Checks that popup menu stay open after a triggering click.
@key headful
@run main/othervm -Dsun.java2d.uiScale=1 PopupMenuStayOpen
*/
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.Point;
import java.awt.PopupMenu;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.InputEvent;
public class PopupMenuStayOpen {
public static final int MAX_COUNT = 100;
public volatile static boolean wasActionFired = false;
static Frame frame;
static PopupMenu pom;
volatile static Point point;
public static void main(String[] args) throws Exception {
String nm = Toolkit.getDefaultToolkit().getClass().getName();
try {
EventQueue.invokeAndWait(() -> {
frame = new Frame("Click-to-see-Popup");
pom = new PopupMenu();
frame.setTitle(nm);
frame.setSize(300, 300);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
pom.add("A long enough line");
pom.getItem(0).addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
wasActionFired = true;
}
});
frame.add(pom);
frame.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent me) {
pom.show(frame, me.getX(), me.getY());
}
});
});
Robot robot = new Robot();
robot.delay(1000);
robot.waitForIdle();
EventQueue.invokeAndWait(() -> {
point = frame.getLocationOnScreen();
});
robot.mouseMove(point.x + 50, point.y + 100);
robot.mousePress(InputEvent.BUTTON2_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON2_DOWN_MASK);
robot.delay(1000);
robot.waitForIdle();
robot.mouseMove(point.x + 50 + 30, point.y + 100 + 15);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(500);
if (!wasActionFired) {
throw new RuntimeException("Popup not visible or has no focus");
}
System.out.println("Test Pass!!");
} finally {
EventQueue.invokeAndWait(() -> {
if (frame != null) {
frame.dispose();
}
});
}
}
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4288230
@summary Tests that Robot can move mouse to another screen
@key headful
*/
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
public class RobotMoveMultiscreen {
static volatile int x_dest = 20;
static volatile int y_dest = 20;
static Frame frame;
static volatile Boolean testCondition = false;
public static void main(String[] args) throws Exception {
GraphicsDevice[] devs =
GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
if (devs.length <= 1) {
System.out.println("Minimum 2 display screens are required" +
" for the test, Found " + devs.length);
return;
}
try {
EventQueue.invokeAndWait(() -> {
GraphicsDevice workDev = devs[devs.length - 1];
GraphicsConfiguration config = workDev.getDefaultConfiguration();
Rectangle bounds = config.getBounds();
x_dest = bounds.x + bounds.width / 2;
y_dest = bounds.y + bounds.height / 2;
frame = new Frame("Listening frame");
frame.addMouseMotionListener(new MouseMotionAdapter() {
public void mouseMoved(MouseEvent e) {
testCondition = true;
}
});
frame.setLocation(x_dest,y_dest);
frame.setSize(100,100);
frame.setVisible(true);
});
Robot robot = new Robot();
robot.delay(1000);
robot.waitForIdle();
robot.mouseMove(x_dest+50, y_dest+50);
robot.waitForIdle();
EventQueue.invokeAndWait(() -> {
if (testCondition == false) {
throw new RuntimeException("Can't move to another display");
}
});
System.out.println("Test Pass!!");
} finally {
EventQueue.invokeAndWait(() -> {
if (frame != null) {
frame.dispose();
}
});
}
}
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4677084
@summary Tests that the PageIncrement (BlockIncrement) and
LineIncrement (UnitIncrement) cannot be < 1
@key headful
*/
import java.awt.Scrollbar;
public class PageIncrementTest {
static Scrollbar sb;
public static void main(String[] args) {
sb = new Scrollbar();
sb.setBlockIncrement(0);
sb.setUnitIncrement(0);
if (sb.getBlockIncrement() < 1) {
String msg = "Failed: getBlockIncrement() == " + sb.getBlockIncrement();
System.out.println(msg);
throw new RuntimeException(msg);
}
if (sb.getUnitIncrement() < 1) {
String msg = "Failed: getLineIncrement() == " + sb.getUnitIncrement();
System.out.println(msg);
throw new RuntimeException(msg);
}
sb.setBlockIncrement(-1);
sb.setUnitIncrement(-1);
if (sb.getBlockIncrement() < 1) {
String msg = "Failed: getBlockIncrement() == " + sb.getBlockIncrement();
System.out.println(msg);
throw new RuntimeException(msg);
}
if (sb.getUnitIncrement() < 1) {
String msg = "Failed: getLineIncrement() == " + sb.getUnitIncrement();
System.out.println(msg);
throw new RuntimeException(msg);
}
sb.setBlockIncrement(2);
sb.setUnitIncrement(2);
if (sb.getBlockIncrement() != 2) {
String msg = "Failed: getBlockIncrement() == " + sb.getBlockIncrement();
System.out.println(msg);
throw new RuntimeException(msg);
}
if (sb.getUnitIncrement() != 2) {
String msg = "Failed: getLineIncrement() == " + sb.getUnitIncrement();
System.out.println(msg);
throw new RuntimeException(msg);
}
System.out.println("Test Pass!!");
}
}

View File

@@ -0,0 +1,168 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4943277
@requires (os.family == "linux")
@summary XAWT: Scrollbar can't be controlled by keyboard
@key headful
*/
import java.awt.AWTException;
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.Robot;
import java.awt.Scrollbar;
import java.awt.Toolkit;
import java.awt.event.AdjustmentListener;
import java.awt.event.AdjustmentEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
public class ScrollbarKeyControlTest implements AdjustmentListener, KeyListener {
Scrollbar scrollbarV;
Scrollbar scrollbarH;
volatile int changesTotal = 0;
Robot robot;
Object LOCK = new Object();
Frame frame;
public static void main(String[] args) throws Exception {
if (!System.getProperty("os.name").startsWith("Linux")) {
System.out.println("This test is for XAWT only.");
return;
}
ScrollbarKeyControlTest scrollbarKeyControlTest = new ScrollbarKeyControlTest();
scrollbarKeyControlTest.init();
}
public void init() throws Exception {
try {
EventQueue.invokeAndWait(() -> {
frame = new Frame("Scrollbar Test");
scrollbarV = new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, 255);
scrollbarH = new Scrollbar(Scrollbar.HORIZONTAL, 0, 60, 0, 300);
scrollbarH.addAdjustmentListener(this);
scrollbarH.addKeyListener(this);
scrollbarV.addAdjustmentListener(this);
scrollbarV.addKeyListener(this);
frame.add("South", scrollbarH);
frame.add("East", scrollbarV);
frame.setSize(200, 200);
frame.setVisible(true);
frame.validate();
frame.toFront();
});
robot = new Robot();
robot.delay(1000);
robot.waitForIdle();
testOneScrollbar(scrollbarV);
if (changesTotal != 9) { //one by mouse click and six by keys
throw new RuntimeException("Test failed. Not all adjustment " +
"events received by vertical scrollbar (" + changesTotal + " of 9)");
}
changesTotal = 0;
testOneScrollbar(scrollbarH);
if (changesTotal != 9) { //one by mouse click and six by keys
throw new RuntimeException("Test failed. Not all adjustment " +
"events received by horizontal scrollbar (" + changesTotal + " of 9)");
}
System.out.println("Test passed. Adjustment Event called "
+ changesTotal + " times for each scrollbar");
} finally {
EventQueue.invokeAndWait(() -> {
if (frame != null) {
frame.dispose();
}
});
}
}
public void testOneScrollbar(Scrollbar sb) {
robot.waitForIdle();
robot.mouseMove(sb.getLocationOnScreen().x + sb.getWidth() / 2,
sb.getLocationOnScreen().y + sb.getHeight() / 2);
try {
synchronized (LOCK) {
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
LOCK.wait(2000);
robot.keyPress(KeyEvent.VK_DOWN);
robot.keyRelease(KeyEvent.VK_DOWN);
LOCK.wait(2000);
robot.keyPress(KeyEvent.VK_PAGE_DOWN);
robot.keyRelease(KeyEvent.VK_PAGE_DOWN);
LOCK.wait(2000);
robot.keyPress(KeyEvent.VK_UP);
robot.keyRelease(KeyEvent.VK_UP);
LOCK.wait(2000);
robot.keyPress(KeyEvent.VK_PAGE_UP);
robot.keyRelease(KeyEvent.VK_PAGE_UP);
LOCK.wait(2000);
robot.keyPress(KeyEvent.VK_RIGHT);
robot.keyRelease(KeyEvent.VK_RIGHT);
LOCK.wait(2000);
robot.keyPress(KeyEvent.VK_LEFT);
robot.keyRelease(KeyEvent.VK_LEFT);
LOCK.wait(2000);
robot.keyPress(KeyEvent.VK_HOME);
robot.keyRelease(KeyEvent.VK_HOME);
LOCK.wait(2000);
robot.keyPress(KeyEvent.VK_END);
robot.keyRelease(KeyEvent.VK_END);
LOCK.wait(2000);
}
} catch (InterruptedException e) {
throw new RuntimeException("Test interrupted while keys being pressed.", e);
}
}
public void adjustmentValueChanged(AdjustmentEvent e) {
changesTotal++;
synchronized (LOCK) {
LOCK.notify();
}
System.out.println("Adjustment Event called ");
}
public void keyPressed(KeyEvent e) {
System.out.println("KeyPressed called");
}
public void keyReleased(KeyEvent e) {
System.out.println("in keyReleased");
}
public void keyTyped(KeyEvent e) {
System.out.println("in keyTyped");
}
}

View File

@@ -0,0 +1,81 @@
/*
* Copyright (c) 2004, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 5025532
@requires (os.family == "windows")
@summary Tests that textarea replaces text correctly if the text contains
line separators
@key headful
*/
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.TextArea;
import java.lang.reflect.InvocationTargetException;
public class ReplaceRangeTest {
static Frame f;
public static void main(String[] args) throws InterruptedException, InvocationTargetException {
try {
EventQueue.invokeAndWait(() -> {
f = new Frame("Test frame");
f.setSize(400, 400);
f.setLayout(new GridLayout(3, 1));
TextArea textArea1 = new TextArea(5, 80);
TextArea textArea2 = new TextArea(5, 80);
TextArea textArea3 = new TextArea(5, 80);
f.add(textArea1);
f.add(textArea2);
f.add(textArea3);
f.setVisible(true);
textArea1.setText("01234");
textArea1.replaceRange("X", 3, 4);
textArea2.setText("0\r\n234");
textArea2.replaceRange("X", 3, 4);
textArea3.setText("0\n\n34");
textArea3.replaceRange("X", 3, 4);
if (textArea1.getText().equals("012X4") &&
textArea2.getText().equals("0\r\n2X4") &&
textArea3.getText().equals("0\n\nX4")) {
System.out.println("Test Pass");
return;
} else {
throw new RuntimeException("Test FAILED");
}
});
} finally {
EventQueue.invokeAndWait(() -> {
if (f != null) {
f.dispose();
}
});
}
}
}

View File

@@ -0,0 +1,155 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4800187
@requires (os.family == "windows")
@summary REGRESSION:show the wrong selection when there are \r characters in the text
@key headful
*/
import java.awt.Button;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.IllegalComponentStateException;
import java.awt.Point;
import java.awt.Robot;
import java.awt.TextArea;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.lang.reflect.InvocationTargetException;
public class TextAreaCRLFAutoDetectTest {
Frame f;
TextArea ta1;
TextArea ta2;
Button b;
boolean passed = true;
boolean crlf = true;
public static void main(String[] args) throws Exception {
TextAreaCRLFAutoDetectTest crlfAutoDetectTest = new TextAreaCRLFAutoDetectTest();
crlfAutoDetectTest.init();
crlfAutoDetectTest.start();
}
public void init() throws InterruptedException, InvocationTargetException {
EventQueue.invokeAndWait(() -> {
f = new Frame("TextAreaCRLFAutoDetectTest");
ta1 = new TextArea(5, 20);
ta2 = new TextArea(5, 20);
b = new Button("Click Me");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
ta1.setText("");
ta2.setText("");
System.out.println("--------------------------------");
String eoln = (crlf) ? "\r\n" : "\n";
String s = eoln + "123" + eoln + "567" + eoln + "90" + eoln;
printString(" s=", s);
ta1.setText(s);
printString("ta1.getText()=", ta1.getText());
s = "67" + eoln + "9";
ta1.select(6, 10);
String s1 = ta1.getSelectedText();
printString("ta1.getSelectedText()=", s1);
passed = passed && s.equals(s1);
ta2.setText(s1);
printString(" ta2.getText()=", s1);
passed = passed && s1.equals(ta2.getText());
crlf = false;
}
});
f.setLayout(new FlowLayout());
f.add(ta1);
f.add(ta2);
f.add(b);
f.setLocation(300, 50);
f.pack();
f.setVisible(true);
});
}
public void start() throws Exception {
try {
Robot robot = new Robot();
robot.setAutoWaitForIdle(true);
robot.setAutoDelay(50);
robot.waitForIdle();
Point pt = new Point(0, 0);
boolean drawn = false;
while (!drawn) {
try {
pt = b.getLocationOnScreen();
} catch (IllegalComponentStateException icse) {
Thread.sleep(50);
continue;
}
drawn = true;
}
for (int i = 0; i < 2; i++) {
pt = b.getLocationOnScreen();
robot.mouseMove(pt.x + b.getWidth() / 2,
pt.y + b.getHeight() / 2);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
Thread.sleep(250);
}
if (!passed) {
throw new RuntimeException("TextAreaCRLFAutoDetectTest FAILED.");
} else {
System.out.println("TextAreaCRLFAutoDetectTest PASSED");
}
} catch (Exception e) {
throw new RuntimeException("The test was not completed.\n\n" + e);
} finally {
EventQueue.invokeAndWait(() -> {
if (f != null) {
f.dispose();
}
});
}
}
void printString(String t, String s) {
byte b[] = s.getBytes();
String o = t;
for (int i = 0; i < b.length; i++) {
o += Byte.toString(b[i]) + " ";
}
System.out.println(o);
}
}

View File

@@ -0,0 +1,116 @@
/*
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 4072264
@summary REGRESSION:Test to verify getSelectedText,
getSelectedStart/End in TextArea class
@key headful
*/
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.Robot;
import java.awt.TextArea;
public class TextLengthTest {
static final int MY_SIZE = 100;
static final int MY_START = 13;
static final int MY_END = 47;
TextArea ta;
Frame f;
int mySize;
int myStart;
int myEnd;
public static void main(String[] args) throws Exception {
TextLengthTest textLengthTest = new TextLengthTest();
textLengthTest.init();
textLengthTest.start();
}
public void init() throws Exception {
EventQueue.invokeAndWait(() -> {
f = new Frame("TextLengthTest");
ta = new TextArea(15, 30);
f.add(ta);
f.setSize(400, 400);
f.setVisible(true);
});
}
public void start() throws Exception {
try {
Robot r = new Robot();
r.delay(1000);
r.waitForIdle();
EventQueue.invokeAndWait(() -> {
StringBuffer bigStringBuffer = new StringBuffer();
for (int i = 1; i <= 10; i++) {
bigStringBuffer.append("abcdefghi\n");
}
ta.setText(bigStringBuffer.toString());
mySize = bigStringBuffer.toString().length();
System.out.println("String size = " + mySize);
if (mySize != MY_SIZE) {
throw new Error("The string size is " +
mySize + "but it should be " + MY_SIZE);
}
ta.select(MY_START, MY_END);
String str = new String(ta.getSelectedText());
str = str.toUpperCase();
myStart = ta.getSelectionStart();
myEnd = ta.getSelectionEnd();
System.out.println("Selected string start = " + myStart);
System.out.println("Selected string end = " + myEnd);
if (myStart != MY_START) {
throw new Error("The selected text starts at " +
mySize + "but it should start at " + MY_START);
}
if (myEnd != MY_END) {
throw new Error("The selected text ends at " +
myEnd + "but it should end at " + MY_END);
}
ta.replaceRange(str, myStart, myEnd);
});
} finally {
EventQueue.invokeAndWait(() -> {
if (f != null) {
f.dispose();
}
});
}
System.out.println("Test Pass");
}
}

Some files were not shown because too many files have changed in this diff Show More