JDK-7160904 : [TEST_BUG] closed/java/awt/Focus/FocusPolicyTest/FocusPolicyTest.java failed on solaris,linux since 7u4b18
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u4,8,9,10,11,14,17
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux_ubuntu,solaris
  • CPU: generic,x86
  • Submitted: 2012-04-12
  • Updated: 2023-10-09
Related Reports
Relates :  
Description
closed/java/awt/Focus/FocusPolicyTest/FocusPolicyTest.java failed on solaris and linux since 7u4b18 with following exception:
isXawt = true
java.lang.RuntimeException: Error: stage 5: java.awt.Frame's policy is javax.swing.LayoutFocusTraversalPolicy but not java.awt.DefaultFocusTraversalPolicy
        at FocusPolicyTest.checkAWTPoliciesFor(FocusPolicyTest.java:81)
        at FocusPolicyTest.main(FocusPolicyTest.java:51)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:96)
        at java.lang.Thread.run(Thread.java:722)


reproducible on ubuntu 10.04 64 bit (stt-83-vmw4.ru), solaris 10 sparc (stt-64.ru)

see comments for more details
caused by fix for CR 7125044:
http://cr.openjdk.java.net/~ant/7125044/webrev.3/

Comments
Test build: JDK11b23(CC-build(http://slc07hab.us.oracle.com/jdk_coverage/builds/11_23/jdk-11-instr_linux-x64_bin.tar.gz )) Platform :ubuntu18.04-x64 Jtreg tool: Jtreg4.2b13 The case failed as the same issue: java/awt/Focus/FocusPolicyTest/FocusPolicyTest.java http://sc11152645.us.oracle.com:8080/evergreen/results/11/b23/regression-cc/automated/ubuntu18.04-x64/results_closed/workDir/java/awt/Focus/FocusPolicyTest/FocusPolicyTest.jtr
09-08-2018

This is not a regression. This is the test issue, which relied on wrong behavior of XAWT which was fixed. So, the "regression" kwd should be removed.
27-08-2013

According to my comments by 2012-04-13, this is not a regression. (Removed the keyword)
27-08-2013

This is likely a problem with the test, which was not corrected after the fix for JDK-7125044. The test is a mixed Swing/AWT application (both AWT and Swing toplevels are created), so default focus traversal policy set to LayoutFocusTraversalPolicy is a valid scenario.
29-01-2013

EVALUATION The test on stage N3 creates swing toplevels. When a swing toplevel is created it sets LayoutFTP as default FTP via calling KeyboardFocusManager.setDefaultFocusTraversalPolicy(..). Then on stage N4 it checks that LayoutFTP is set as default KFM's. Then on stage N5: // 5. Check AWT top-levels policies // this is a bug in XAWT we should change the test as soon as // we will be able to fix this bug. (###@###.###) stageNum = 5; Class defaultPolicy = swingDefaultPolicy; if (isXawt) { defaultPolicy = awtDefaultPolicy; } checkAWTPoliciesFor(defaultPolicy); The last method creates different AWT toplevels and checks if their FTP is equal to the passed one. Note the comments. This bug no longer exists. XAWT now behaves the same way as other toolkits due to the fix for 7125044. So the fix didn't introduce a regression but made the toolkits behaviour identical when it comes to initial focus policy. The test should eliminate any mentions of XAWT and related "if" blocks.
13-04-2012

EVALUATION Based on what I learned from the test, I will likely downgrade the bug to P3 and target it to 7u6. The is the test issue. Thanks, Anton.
13-04-2012

EVALUATION I am assigning the issue to the author of the test and changes into b18. The problem is reproducible on my Solaris host. I cannot reproduce the problem with my latest jdk8 workspace.
12-04-2012