JDK-8194946 : Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8,9,10,11,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86
  • Submitted: 2018-01-11
  • Updated: 2023-10-09
  • Resolved: 2022-04-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 b18Fixed
Related Reports
Relates :  
Description
Testsuite: Regression-se-gui
Test name(s):javax/swing/JFileChooser/6738668/bug6738668.java
Product(s) tested: jdk10-client-nightly.227 (64bit)
OS/architecture: Mac10.13 x64/jrteg4.2 b10

Actual results:
The case bug6738668.java failed automatically.
Comments
Changeset: 70251b06 Author: Prasanta Sadhukhan <psadhukhan@openjdk.org> Date: 2022-04-13 10:58:36 +0000 URL: https://git.openjdk.java.net/jdk/commit/70251b064d0174cd902fc0179fbbd6e00c08c0e4
13-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8202 Date: 2022-04-12 12:27:22 +0000
12-04-2022

https://mach5.us.oracle.com/mdash/jobs/prsadhuk-jdk-20220412-1124-31130384
12-04-2022

The proper test fix: ➜ open git:(master) ✗ git diff diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index 966bea6b5ed..cb133eeca42 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -771,7 +771,6 @@ javax/swing/text/DefaultCaret/HidingSelection/MultiSelectionTest.java 8213562 li javax/swing/text/JTextComponent/5074573/bug5074573.java 8196100 windows-all javax/swing/JFileChooser/6798062/bug6798062.java 8146446 windows-all javax/swing/JComboBox/8182031/ComboPopupTest.java 8196465 linux-all,macosx-all -javax/swing/JFileChooser/6738668/bug6738668.java 8194946 generic-all javax/swing/JFileChooser/8021253/bug8021253.java 8169954 windows-all,linux-all,macosx-all javax/swing/JFileChooser/8062561/bug8062561.java 8196466 linux-all,macosx-all javax/swing/JInternalFrame/Test6325652.java 8224977 macosx-all diff --git a/test/jdk/javax/swing/JFileChooser/6738668/bug6738668.java b/test/jdk/javax/swing/JFileChooser/6738668/bug6738668.java index 618fa5a530d..05746487439 100644 --- a/test/jdk/javax/swing/JFileChooser/6738668/bug6738668.java +++ b/test/jdk/javax/swing/JFileChooser/6738668/bug6738668.java @@ -39,8 +39,7 @@ public class bug6738668 { String tmpdir = System.getProperty("java.io.tmpdir"); System.out.println("tmp dir " + tmpdir); - new JFileChooser(new File(tmpdir+"/temp")); - + new JFileChooser(new File(tmpdir)); System.out.println("Test passed for LookAndFeel " + lookAndFeelInfo.getClassName()); } diff --git a/test/jdk/javax/swing/JFileChooser/6738668/security.policy b/test/jdk/javax/swing/JFileChooser/6738668/security.policy index 29dc695da4d..469144458b3 100644 --- a/test/jdk/javax/swing/JFileChooser/6738668/security.policy +++ b/test/jdk/javax/swing/JFileChooser/6738668/security.policy @@ -1,5 +1,5 @@ grant { - permission java.io.FilePermission "${java.io.tmpdir}${/}temp${/}*", "read"; - permission java.io.FilePermission "${java.io.tmpdir}${/}temp", "read"; + permission java.io.FilePermission "${java.io.tmpdir}${/}*", "read"; + permission java.io.FilePermission "${java.io.tmpdir}${/}", "read"; permission java.util.PropertyPermission "*", "read"; }; But it will fail on macOS due to bug in Aqua L&F
17-10-2020

The windows path "c:/temp" was replaced in the JDK-6962725 to the "java.io.tmpdir"/temp, but since this path does not exist the default path like home dir is used. Since the test does not have permission for the home dir it fails.
17-10-2020

Issue reproducible on Linux with JDK 10.0.1 b02
01-02-2018

I'm able to have this test pass, by adding the following lines to the policy file: permission java.io.FilePermission "/Users/<user-name>/", "read"; permission java.io.FilePermission "/Users/<user-name>/", "write"; permission java.io.FilePermission "/Users/<user-name>/-", "read"; permission java.io.FilePermission "/Users/<user-name>/-", "write"; permission java.io.FilePermission "/Users/", "read"; permission java.io.FilePermission "/Users/-", "read";
22-01-2018

Not sure if this is a regression, since I saw the same failure in Mac OS 10.12.6 as well.
22-01-2018

Phil, I cannot see the windows paths that you mentioned in the source. Looks like some permission issue on latest mac OS. Yet to check this.
12-01-2018

This test is using windows paths in the source and policy file. It is as if it was only intended to be run on Windows .. although why I don't know.
11-01-2018