8203003: Several FileDialog Modality Tests fail on Linux due to X errors
Reviewed-by: prr, psadhukhan
--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c Tue Jun 19 10:12:35 2018 -0700
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c Wed Jun 20 11:12:48 2018 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -547,6 +547,7 @@
fp_g_path_get_dirname = dl_symbol("g_path_get_dirname");
+ fp_gdk_threads_init = dl_symbol("gdk_threads_init");
fp_gdk_threads_enter = dl_symbol("gdk_threads_enter");
fp_gdk_threads_leave = dl_symbol("gdk_threads_leave");
@@ -626,10 +627,16 @@
AWT_LOCK();
handler = XSetErrorHandler(NULL);
io_handler = XSetIOErrorHandler(NULL);
+
+ //According the GTK documentation, gdk_threads_init() should be
+ //called before gtk_init() or gtk_init_check()
+ fp_gdk_threads_init();
result = (*fp_gtk_init_check)(NULL, NULL);
+
XSetErrorHandler(handler);
XSetIOErrorHandler(io_handler);
AWT_UNLOCK();
+
/* Initialize widget array. */
for (i = 0; i < _GTK_WIDGET_TYPE_SIZE; i++)
{
--- a/test/jdk/ProblemList.txt Tue Jun 19 10:12:35 2018 -0700
+++ b/test/jdk/ProblemList.txt Wed Jun 20 11:12:48 2018 -0700
@@ -280,12 +280,12 @@
java/awt/Modal/FileDialog/FileDialogModal5Test.java 8198664 macosx-all
java/awt/Modal/FileDialog/FileDialogModal6Test.java 8198664 macosx-all
java/awt/Modal/FileDialog/FileDialogNonModal1Test.java 8198664 macosx-all
-java/awt/Modal/FileDialog/FileDialogNonModal2Test.java 8198664,8203003 macosx-all,linux-all
+java/awt/Modal/FileDialog/FileDialogNonModal2Test.java 8198664 macosx-all,linux-all
java/awt/Modal/FileDialog/FileDialogNonModal3Test.java 8198664 macosx-all
java/awt/Modal/FileDialog/FileDialogNonModal4Test.java 8198664 macosx-all
java/awt/Modal/FileDialog/FileDialogNonModal5Test.java 8198664 macosx-all
-java/awt/Modal/FileDialog/FileDialogNonModal6Test.java 8198664,8203003 macosx-all,linux-all
-java/awt/Modal/FileDialog/FileDialogNonModal7Test.java 8198664,8203003 macosx-all,linux-all
+java/awt/Modal/FileDialog/FileDialogNonModal6Test.java 8198664 macosx-all,linux-all
+java/awt/Modal/FileDialog/FileDialogNonModal7Test.java 8198664 macosx-all,linux-all
java/awt/Modal/FileDialog/FileDialogTKModal1Test.java 8196430 generic-all
java/awt/Modal/FileDialog/FileDialogTKModal2Test.java 8196430 generic-all
java/awt/Modal/FileDialog/FileDialogTKModal3Test.java 8196430 generic-all
@@ -620,60 +620,60 @@
sun/security/pkcs11/Cipher/ReinitCipher.java 8204203 windows-all
sun/security/pkcs11/Cipher/TestPKCS5PaddingError.java 8204203 windows-all
sun/security/pkcs11/Cipher/TestRSACipher.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestRSACipherWrap.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestRawRSACipher.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestSymmCiphers.java 8204203 windows-all
-sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/TestDH.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/TestInterop.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/TestShort.java 8204203 windows-all
-sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java 8204203 windows-all
-sun/security/pkcs11/KeyGenerator/DESParity.java 8204203 windows-all
-sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java 8204203 windows-all
-sun/security/pkcs11/KeyPairGenerator/TestDH2048.java 8204203 windows-all
-sun/security/pkcs11/KeyStore/SecretKeysBasic.sh 8204203 windows-all
-sun/security/pkcs11/Mac/MacKAT.java 8204203 windows-all
-sun/security/pkcs11/Mac/MacSameTest.java 8204203 windows-all
-sun/security/pkcs11/Mac/ReinitMac.java 8204203 windows-all
-sun/security/pkcs11/MessageDigest/ByteBuffers.java 8204203 windows-all
-sun/security/pkcs11/MessageDigest/DigestKAT.java 8204203 windows-all
-sun/security/pkcs11/MessageDigest/ReinitDigest.java 8204203 windows-all
-sun/security/pkcs11/MessageDigest/TestCloning.java 8204203 windows-all
-sun/security/pkcs11/Provider/ConfigQuotedString.sh 8204203 windows-all
-sun/security/pkcs11/Provider/Login.sh 8204203 windows-all
-sun/security/pkcs11/SampleTest.java 8204203 windows-all
-sun/security/pkcs11/Secmod/AddPrivateKey.java 8204203 windows-all
-sun/security/pkcs11/Secmod/Crypto.java 8204203 windows-all
-sun/security/pkcs11/Secmod/GetPrivateKey.java 8204203 windows-all
-sun/security/pkcs11/Secmod/JksSetPrivateKey.java 8204203 windows-all
-sun/security/pkcs11/Secmod/LoadKeystore.java 8204203 windows-all
-sun/security/pkcs11/Secmod/TestNssDbSqlite.java 8204203 windows-all
-sun/security/pkcs11/SecureRandom/Basic.java 8204203 windows-all
-sun/security/pkcs11/SecureRandom/TestDeserialization.java 8204203 windows-all
-sun/security/pkcs11/Serialize/SerializeProvider.java 8204203 windows-all
-sun/security/pkcs11/Signature/ByteBuffers.java 8204203 windows-all
-sun/security/pkcs11/Signature/ReinitSignature.java 8204203 windows-all
-sun/security/pkcs11/Signature/TestDSA.java 8204203 windows-all
-sun/security/pkcs11/Signature/TestDSAKeyLength.java 8204203 windows-all
-sun/security/pkcs11/Signature/TestRSAKeyLength.java 8204203 windows-all
-sun/security/pkcs11/ec/ReadCertificates.java 8204203 windows-all
-sun/security/pkcs11/ec/ReadPKCS12.java 8204203 windows-all
-sun/security/pkcs11/ec/TestCurves.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECDH.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECDH2.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECDSA.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECDSA2.java 8204203 windows-all
-sun/security/pkcs11/ec/TestECGenSpec.java 8204203 windows-all
-sun/security/pkcs11/rsa/KeyWrap.java 8204203 windows-all
-sun/security/pkcs11/rsa/TestCACerts.java 8204203 windows-all
-sun/security/pkcs11/rsa/TestKeyFactory.java 8204203 windows-all
-sun/security/pkcs11/rsa/TestKeyPairGenerator.java 8204203 windows-all
-sun/security/pkcs11/rsa/TestSignatures.java 8204203 windows-all
-sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java 8204203 windows-all
-sun/security/pkcs11/tls/TestLeadingZeroesP11.java 8204203 windows-all
-sun/security/pkcs11/tls/TestMasterSecret.java 8204203 windows-all
-sun/security/pkcs11/tls/TestPRF.java 8204203 windows-all
+sun/security/pkcs11/Cipher/TestRSACipherWrap.java 8204203 windows-all
+sun/security/pkcs11/Cipher/TestRawRSACipher.java 8204203 windows-all
+sun/security/pkcs11/Cipher/TestSymmCiphers.java 8204203 windows-all
+sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java 8204203 windows-all
+sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java 8204203 windows-all
+sun/security/pkcs11/KeyAgreement/TestDH.java 8204203 windows-all
+sun/security/pkcs11/KeyAgreement/TestInterop.java 8204203 windows-all
+sun/security/pkcs11/KeyAgreement/TestShort.java 8204203 windows-all
+sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java 8204203 windows-all
+sun/security/pkcs11/KeyGenerator/DESParity.java 8204203 windows-all
+sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java 8204203 windows-all
+sun/security/pkcs11/KeyPairGenerator/TestDH2048.java 8204203 windows-all
+sun/security/pkcs11/KeyStore/SecretKeysBasic.sh 8204203 windows-all
+sun/security/pkcs11/Mac/MacKAT.java 8204203 windows-all
+sun/security/pkcs11/Mac/MacSameTest.java 8204203 windows-all
+sun/security/pkcs11/Mac/ReinitMac.java 8204203 windows-all
+sun/security/pkcs11/MessageDigest/ByteBuffers.java 8204203 windows-all
+sun/security/pkcs11/MessageDigest/DigestKAT.java 8204203 windows-all
+sun/security/pkcs11/MessageDigest/ReinitDigest.java 8204203 windows-all
+sun/security/pkcs11/MessageDigest/TestCloning.java 8204203 windows-all
+sun/security/pkcs11/Provider/ConfigQuotedString.sh 8204203 windows-all
+sun/security/pkcs11/Provider/Login.sh 8204203 windows-all
+sun/security/pkcs11/SampleTest.java 8204203 windows-all
+sun/security/pkcs11/Secmod/AddPrivateKey.java 8204203 windows-all
+sun/security/pkcs11/Secmod/Crypto.java 8204203 windows-all
+sun/security/pkcs11/Secmod/GetPrivateKey.java 8204203 windows-all
+sun/security/pkcs11/Secmod/JksSetPrivateKey.java 8204203 windows-all
+sun/security/pkcs11/Secmod/LoadKeystore.java 8204203 windows-all
+sun/security/pkcs11/Secmod/TestNssDbSqlite.java 8204203 windows-all
+sun/security/pkcs11/SecureRandom/Basic.java 8204203 windows-all
+sun/security/pkcs11/SecureRandom/TestDeserialization.java 8204203 windows-all
+sun/security/pkcs11/Serialize/SerializeProvider.java 8204203 windows-all
+sun/security/pkcs11/Signature/ByteBuffers.java 8204203 windows-all
+sun/security/pkcs11/Signature/ReinitSignature.java 8204203 windows-all
+sun/security/pkcs11/Signature/TestDSA.java 8204203 windows-all
+sun/security/pkcs11/Signature/TestDSAKeyLength.java 8204203 windows-all
+sun/security/pkcs11/Signature/TestRSAKeyLength.java 8204203 windows-all
+sun/security/pkcs11/ec/ReadCertificates.java 8204203 windows-all
+sun/security/pkcs11/ec/ReadPKCS12.java 8204203 windows-all
+sun/security/pkcs11/ec/TestCurves.java 8204203 windows-all
+sun/security/pkcs11/ec/TestECDH.java 8204203 windows-all
+sun/security/pkcs11/ec/TestECDH2.java 8204203 windows-all
+sun/security/pkcs11/ec/TestECDSA.java 8204203 windows-all
+sun/security/pkcs11/ec/TestECDSA2.java 8204203 windows-all
+sun/security/pkcs11/ec/TestECGenSpec.java 8204203 windows-all
+sun/security/pkcs11/rsa/KeyWrap.java 8204203 windows-all
+sun/security/pkcs11/rsa/TestCACerts.java 8204203 windows-all
+sun/security/pkcs11/rsa/TestKeyFactory.java 8204203 windows-all
+sun/security/pkcs11/rsa/TestKeyPairGenerator.java 8204203 windows-all
+sun/security/pkcs11/rsa/TestSignatures.java 8204203 windows-all
+sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java 8204203 windows-all
+sun/security/pkcs11/tls/TestLeadingZeroesP11.java 8204203 windows-all
+sun/security/pkcs11/tls/TestMasterSecret.java 8204203 windows-all
+sun/security/pkcs11/tls/TestPRF.java 8204203 windows-all
sun/security/pkcs11/tls/TestPremaster.java 8204203 windows-all
############################################################################