[ 
https://issues.apache.org/jira/browse/DERBY-6295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen updated DERBY-6295:
--------------------------------------

    Attachment: d6295-1a.diff

Attaching a patch that adds the extra permission to the tests' policy files. 
All tests ran cleanly with the patch.
                
> Allow tests to show detailed error when spawning new process fails
> ------------------------------------------------------------------
>
>                 Key: DERBY-6295
>                 URL: https://issues.apache.org/jira/browse/DERBY-6295
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d6295-1a.diff
>
>
> In recent versions of Java, Runtime.exec() will hide the underlying exception 
> unless the code base is granted read permission on the executable file.
> Example:
> These two failures probably have the same cause:
> http://download.java.net/javadesktop/derby/javadb-5579292-report/javadb-task-3689381.html
> http://download.java.net/javadesktop/derby/javadb-5579170-report/javadb-task-3688261.html
> The former, running on an older JVM, shows the real cause:
> java.io.IOException: Cannot run program 
> "/localhome/tendril4.2/work/install/sun-jdk-7u10-fcs-bin-b31/jdk7_10/jdk1.7.0_10/jre/bin/java":
>  error=12, Not enough space
> Caused by: java.io.IOException: error=12, Not enough space
> The latter, running on a more recent JVM, hides the real failure behind an 
> AccessControlException:
> java.io.IOException: Cannot run program 
> "/localhome/tendril4.2/work/install/sun-jdk-8-ea-bin-b93/jdk8/jdk1.8.0/jre/bin/java"
> Caused by: java.security.AccessControlException: access denied 
> ("java.io.FilePermission" 
> "/localhome/tendril4.2/work/install/sun-jdk-8-ea-bin-b93/jdk8/jdk1.8.0/jre/bin/java"
>  "read")
> We should consider changing the following grant in derby_tests.policy to 
> include "read" in order to make it easier to see why a test is failing:
>   // Tests need to be able to exec a java program.
>   permission java.io.FilePermission "${java.home}${/}-", "execute";   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to