JDK-8217777 TEST_BUG: jdk/java/util/prefs/ExportSubtree.java passes even when test should fail

Steve Groeger GROEGES at uk.ibm.com
Fri Jan 25 14:57:15 UTC 2019


Hi Christoph, 

Thanks for looking at this. 

These lines 

43           //System.out.print(baos.toString());
44           //System.out.print(expectedResult);

were commented out in the current code but if you think displaying this 
info would be good then I can un-comment them.

I think only fixing this in the jdk (JDK13) branch is OK.
If it is later determined that this is really needed in jdk12 or jdk11u , 
then I can always request a backport.

Thanks
Steve Groeger
IBM Runtime Technologies
Hursley, Winchester
Tel: (44) 1962 816911  Mobex: 279990  Mobile: 07718 517 129
Fax (44) 1962 816800
Lotus Notes: Steve Groeger/UK/IBM
Internet: groeges at uk.ibm.com

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



From:   "Langer, Christoph" <christoph.langer at sap.com>
To:     Steve Groeger <GROEGES at uk.ibm.com>
Cc:     core-libs <core-libs-dev at openjdk.java.net>
Date:   25/01/2019 14:30
Subject:        RE: JDK-8217777 TEST_BUG: 
jdk/java/util/prefs/ExportSubtree.java passes even when test should fail



Hi Steve,

in general this change looks reasonable to me.

I think in case there is an error, it would be useful to get a printout of 
the expected/vs actual strings like these lines:
43           //System.out.print(baos.toString());
44           //System.out.print(expectedResult);

I'll take the change and run it through our test system and see if we see 
any issues.

Is it ok for you if we do the fix just in the jdk branch (JDK13) or are 
you particularly interested in getting this fixed for jdk12 and/or jdk11u?

Best regards
Christoph

> -----Original Message-----
> From: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> On Behalf
> Of Steve Groeger
> Sent: Freitag, 25. Januar 2019 12:40
> To: core-libs <core-libs-dev at openjdk.java.net>
> Subject: RFR: JDK-8217777 TEST_BUG: 
jdk/java/util/prefs/ExportSubtree.java
> passes even when test should fail
> 
> Hi all,
> 
> I have found an issue with the jdk/java/util/prefs/ExportSubtree.java
> test.
> Using jtreg to run this test the test passes no matter what happens 
within
> the test.
> Have raised an issue for this:
> 
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.openjdk.java.net_browse_JDK-2D8217777&d=DwIFAg&c=jf_iaSHvJObTbx-siA1ZOg&r=78GW2OHz7nNTH2dBkTx7-TKh2QCt3JD3zukzeUO8RpA&m=8dKzRNI_r6CzuhGDpG6M4U24tdu2IEH8qUbdohhixek&s=UJRfQmkVQXm0xJJoewO9mmR8OiJfiMCZyz_Ky1Ucp5E&e=

> 
> I think the issue is 2 fold:
> 1) the test check the expected vs. actual and throws an exception but 
this
> is caught later in the code, which causes the test to pass as there is 
no
> exception thrown.
> 2) the exported XML now contains a `standalone="no"` entry in the XML
> prologue, which is not in the expected XML.
> 
> I have generated a webrev to resolve this:
> 
https://urldefense.proofpoint.com/v2/url?u=http-3A__cr.openjdk.java.net_-7Esgroeger_8217777_webrev.00_&d=DwIFAg&c=jf_iaSHvJObTbx-siA1ZOg&r=78GW2OHz7nNTH2dBkTx7-TKh2QCt3JD3zukzeUO8RpA&m=8dKzRNI_r6CzuhGDpG6M4U24tdu2IEH8qUbdohhixek&s=k81f_C-Jgejb860DUQscboWahNDRMgOCLnLQnL-ZQ4Y&e=

> 
> This occurs on jdk11 but is probabaly also an issue on other releases ie
> jdk8u, jdk12, jdk  etc
> 
> Please could someone review this webrev and sponsor this chnage for me 
as
> I am unable to commit this myself.
> 
> Thanks
> Steve Groeger
> IBM Runtime Technologies
> Hursley, Winchester
> Tel: (44) 1962 816911  Mobex: 279990  Mobile: 07718 517 129
> Fax (44) 1962 816800
> Lotus Notes: Steve Groeger/UK/IBM
> Internet: groeges at uk.ibm.com
> 
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> 3AU
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> 3AU




Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


More information about the core-libs-dev mailing list