The difficult part is to grant all permission only to those files listed below, without making the build process fragile (multiple changes required for change). This was why I was against specifically listing jar's in the policy files, however it is an alternative solution. It seemed easier (long term) to just specify a directory for the platform jars.

Cheers,

Peter.

Jonathan Costers wrote:
Thanks for the heads up.
I've been re-reading Peter Jones' posts to refresh my memory, this all makes
sense.
I think (hope) we are able to pull this off without any restructuring
though.

Best
Jonathan

2009/9/28 Peter Firmstone (JIRA) <[email protected]>

   [
https://issues.apache.org/jira/browse/RIVER-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760202#action_12760202]

Peter Firmstone commented on RIVER-319:
---------------------------------------

The jtreg tests have their own security policy files, they don't use the
jvm's, currently due to our distribution structure, we have to physically
move (not copy or link, they must be moved) the following files to the jvm's
extension directory: jre/lib/ext/ where each jtreg test currently grants all
permission.  This is the reason for your test failures.

       lib/jsk-platform.jar
       lib/jsk-resources.jar
       lib/jsk-lib.jar
       lib/phoenix-init.jar
       lib-ext/jsk-policy.jar

Then in a directory relative to the one you choose for your working
directory, you must add a file named test.props

the correct location for test.props:
/**
    * Returns extra test properties. Looks for the file
"../../test.props"
    * and reads it in as a Properties file. Assuming the working
directory
    * is "<path>/JTwork/scratch", this will find "<path>/test.props".
    */
My test.props contains the following two lines:

jsk.home=/opt/src/river/trunk
javatest.maxOutputSize=500000

Alternatively all test.props file options can be passed in via jtreg to the
jdk using "-Doption=something", jtreg is run in the working directory, we
can create an arbitrary one, the example below assumes the suggested build
release directory structure above, negating the need to physically move the
platform jar files to the jre extensions directory.  Note the debug option,
it's very helpful.  jsk.home could be set as an environment variable in
build.xml  The command below also assumes the earlier suggestions to modify
the jtreg test policy files.

$jtreg -verbose:all,nopass  -cpa: /opt/src/river/trunk/lib-platform -jdk
/usr/jdk/jdk1.5.0_15 -Djsk.home="/opt/src/river/trunk"
-Djava.security.debug=access,failure -Djavatest.maxOutputSize=500000
./qa/jtreg/

Java 1.5 is currently the preferred test environment for these tests,
 while Java 1.6 is preferred for the regression tests.  In order to get all
tests singing on the same jdk we need to implement kerberos client
functionality, ktools etc, since these were removed from jdk1.6, this can
wait until later though.

Cheers,

Peter.




Change River Build Dist structure to support jtreg test automation
------------------------------------------------------------------

                Key: RIVER-319
                URL: https://issues.apache.org/jira/browse/RIVER-319
            Project: River
         Issue Type: Sub-task
           Reporter: Peter Firmstone

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




Reply via email to