harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6358) [classlib][logging] With root privilege, testInvalidParams of org.apache.harmony.logging.tests.java.util.logging.FileHandlerTest fails
Date Thu, 22 Oct 2009 16:38:59 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768755#action_12768755
] 

Tim Ellison commented on HARMONY-6358:
--------------------------------------

Here's a slightly modified version of your test:

    public static void main(String args[]) throws Exception {
        try {
            java.util.logging.FileHandler h = new java.util.logging.FileHandler("%t/%h");
            System.out.println("Exception not thrown");
        } catch (java.io.FileNotFoundException e) {
            System.out.println("Exception thrown");
        }
        System.out.println("Finished");
    }

On Sun Java I get the following results as a regular user,

Exception not thrown
Finished

and running as root I see,

Exception thrown
Finished


On Harmony M11 I get the following result as a regular user,

Exception thrown
Finished

and running as root I see,

Exception not thrown
Finished

i.e. the opposite way round.

> [classlib][logging] With root privilege, testInvalidParams of org.apache.harmony.logging.tests.java.util.logging.FileHandlerTest
fails
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6358
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6358
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M11
>         Environment: x86/redhat el5
>            Reporter: Kyle Cho
>            Assignee: Tim Ellison
>            Priority: Minor
>
> Below is a reduced test of the testInvalidParams in org.apache.harmony.logging.tests.java.util.logging.FileHandlerTest.java.
> class testInvalidParams {
>         public static void main(String[] args) throws Exception
>         {
>                 try {
>                         java.util.logging.FileHandler h = new java.util.logging.FileHandler("%t/%h");
>                         System.err.println("failure: should throw null exception");
>                 } catch (java.io.FileNotFoundException e) {
>                 }
>         }
> }
> Running this test with DRL vm under root privilege produces:
> failure: should throw null exception
> Under non root user, FileNotFoundException is thrown, which seems desired behavior.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message