Thanks Ole for posting the files.
I did not catch this problem when I ran tests because I was using
trunk/classes to run tests. When I tried with jars, the tests failed
on my machine too. On looking at derby_tests.policy, the policy for
running with classes covered writes to derby.system.home directory.
But for derbynet.jar, permission to write to derby.system.home was not
in the policy. I have added that and now the test
derbynet/getCurrentProperties.java passes with jars. I am attaching
the patch for policy file with this mail. If there are any comments,
please let me know. I will upload it to JIRA once tests finish.
In Apache Derby website (http://db.apache.org/derby/derby_comm.html),
step 3 in "How to create a patch" mentions using classes directory to
run tests. (Be sure to set your CLASSPATH env var to include the
trunk/classes dir.) Would it be better to change this to "run tests
with Derby jars"? I think this also cannot cover all possible cases
(like sane/insane jars etc) but was wondering if that would be a
better thing to do.
Thanks,
Deepa
On 10/16/05, Ole Solberg <[EMAIL PROTECTED]> wrote:
> Deepa Remesh wrote:
> > Hi Ole,
> >
> > This test is passing on my machine (Windows XP). I tried with Sun JVM
> > 1.4.2 and 1.5.0. Can you please post .tmp, DerbyNetClient.err,
> > DerbyNetClient.out files from your run for the test
> > derbynet/getCurrentProperties.java?
> >
> > Thanks,
> > Deepa
> >
>
> The files you requested are posted in
> http://www.multinet.no/~solberg/public/Apache/Derby/Debugging/
>
>
> Regards
> --
> Ole Solberg, Database Technology Group,
> Sun Microsystems, Trondheim, Norway
>
>
>
Index: java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy (revision 325960)
+++ java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy (working copy)
@@ -50,10 +50,11 @@
permission java.net.SocketPermission "${csinfo.serverhost}", "accept";
permission java.net.SocketPermission "${csinfo.trustedhost}", "accept";
- // tracing files - BUG DERBY-613 default location for tracing
- // file is meant to be ${derby.system.home} but instead is ${user.dir}
- // Changes DERBY-613 may require modifying this permission.
+ // tracing files - BUG DERBY-613, DERBY-375 If ${derby.system.home} is set
+ // default location for trace files will be ${derby.system.home}. If it is not set,
+ // default location will be ${user dir}.
permission java.io.FilePermission "${user.dir}${/}*", "write";
+ permission java.io.FilePermission "${derby.system.home}${/}*", "write";
// BUG DERBY-622 derbynet/sysinfo.java
permission java.io.FilePermission "${csinfo.codedir}${/}*", "read";
@@ -85,9 +86,11 @@
permission java.net.SocketPermission "${csinfo.serverhost}", "accept";
permission java.net.SocketPermission "${csinfo.trustedhost}", "accept";
- // tracing files - BUG DERBY-613 default location for tracing
- // file is meant to be ${derby.system.home} but instead is ${user.dir}
- // Changes DERBY-613 may require modifying this permission.
+ // tracing files - BUG DERBY-613, DERBY-375 If ${derby.system.home} is set
+ // default location for trace files will be ${derby.system.home}. If it is not set,
+ // default location will be ${user dir}.
+ // write permission for ${derby.system.home} is covered above by the line
+ // 'permission java.io.FilePermission "${derby.system.home}${/}-", "read, write, delete";'
permission java.io.FilePermission "${user.dir}${/}*", "write";
// Import/export and other support files from these locations in tests