You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/10/30 19:58:18 UTC
[jira] Resolved: (HARMONY-1674) [classlib][luni/security] Tests
depend on presence of ~/.java.policy file
[ http://issues.apache.org/jira/browse/HARMONY-1674?page=all ]
Tim Ellison resolved HARMONY-1674.
----------------------------------
Resolution: Fixed
Thanks Alexey.
Patch applied to LUNI and SECURITY modules at repo revision r469230.
Please check that the patch was applied as you expected.
> [classlib][luni/security] Tests depend on presence of ~/.java.policy file
> --------------------------------------------------------------------------
>
> Key: HARMONY-1674
> URL: http://issues.apache.org/jira/browse/HARMONY-1674
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey Varlamov
> Assigned To: Tim Ellison
> Priority: Minor
> Attachments: patch-luni.txt, patch-security.txt
>
>
> Some security-related testcases are vulnerable to presence of ~/.java.policy file.
> To reproduce, create ".java.policy" file in your home dir with the following context:
> ---
> grant { permission java.security.AllPermission; };
> ---
> Then run all tests of classlib:
> <testcase classname="org.apache.harmony.luni.tests.java.lang.SecurityManagerTest" name="test_checkMemberAccessLjava_lang_ClassI" time="0.006">
> <failure message="This should throw a SecurityException." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: This should throw a SecurityException.
> at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_checkMemberAccessLjava_lang_ClassI(SecurityManagerTest.java:39)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> </failure>
> </testcase>
> <testcase classname="org.apache.harmony.luni.tests.java.lang.SecurityManagerTest" name="test_checkPermissionLjava_security_Permission" time="0.002">
> <failure message="This should throw a SecurityException" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: This should throw a SecurityException
> at org.apache.harmony.luni.tests.java.lang.SecurityManagerTest.test_checkPermissionLjava_security_Permission(SecurityManagerTest.java:59)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> </failure>
> </testcase>
> <testcase classname="tests.api.java.net.InetAddressTest" name="test_getAllByNameLjava_lang_String" time="5.875">
> <failure message="expected SecurityException" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: expected SecurityException
> at tests.api.java.net.InetAddressTest.test_getAllByNameLjava_lang_String(InetAddressTest.java:191)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> </failure>
> </testcase>
> <testcase classname="org.apache.harmony.security.tests.java.security.AccessController2Test" name="test_doPrivilegedLjava_security_PrivilegedAction" time="0.029">
> <failure message="Got AllPermission by passing in a null PD" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: Got AllPermission by passing in a null PD
> at org.apache.harmony.security.tests.java.security.AccessController2Test.test_doPrivilegedLjava_security_PrivilegedAction(AccessController2Test.java:49)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> </failure>
> </testcase>
> <testcase classname="org.apache.harmony.security.tests.java.security.Policy2Test" name="test_getPolicy" time="0.001">
> <failure message="We shouldn't have been able to get the policy with a SecurityManager in place!" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: We shouldn't have been able to get the policy with a SecurityManager in place!
> at org.apache.harmony.security.tests.java.security.Policy2Test.test_getPolicy(Policy2Test.java:63)
> at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
> </failure>
> </testcase>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira