[
https://issues.apache.org/jira/browse/SOLR-4195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13533159#comment-13533159
]
Uwe Schindler commented on SOLR-4195:
-------------------------------------
Thanks Robert! I am running tests on Windows, too. If they pass, I will commit.
Hoss should be awake, too? Any comments. I hope you are happy with this
solution, instead of crazy unix-only chmod and "ant clean" not working :-)
In general I would like to limit the write access further, so *only* the
JVM-specific "J<number>" directory is writeable and the directory where the
parent-child-communication and log files reside. For this it would be good that
the test framework would pass to each child runner:
- the directory as absolute path (as sysprop), so the policy file can use this
path to limit access to the directory only. It must be a sysprop and it must be
absolute in platform specific (File.absolute!) notation.
- the inter process communication files should maybe placed in a separate
supdirectory and next to the J0, J1 dirs, because to make the test runner be
able to write the log files, I must allow access
> Further restrict security policy of tests to disallow writing to files
> outside the test's work dir (e.g. disallow writing to build/test-files)
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-4195
> URL: https://issues.apache.org/jira/browse/SOLR-4195
> Project: Solr
> Issue Type: Improvement
> Reporter: Hoss Man
> Assignee: Uwe Schindler
> Attachments: SOLR-4195.patch, SOLR-4195.patch, SOLR-4195.patch,
> SOLR-4195.patch
>
>
> Until recently, I thought the solr test framework was setup such that every
> test got it's own copy of the "test-files/solr" directory to use as it's Solr
> Home Dir -- then mark committed r1421543, to fix a problem where that test
> was writing a file (that would later be removed) to the solr conf dir, which
> would confuse another currently running test and cause it to fail.
> This made me realize that what i was remembering is that the ant build files
> copy the src/test-files directories into build/ prior to running the tests --
> but all tests (in that module) still share the same copy.
> Subsequent discussions with folks on IRC lead me to the following
> realizations..
> * making a copy of the test-files dir for each test would help eliminate
> confusing by reducing non-reproducible failures if tests collide -- but might
> be slow
> * making a copy of the test-files dir for each test would not help identify
> situations were code was mistakenly/unexpectedly writing to the solr home dir
> * what would probably make the most sense, would be to make the
> build/test-files directory "read only". that way by default tests would get
> a read only solr home dir -- triggering failures if the code is broken and
> tries to write to that dir. tests that want/need to write to the solr home
> dir would have to go out of their way to clone the read only test-files/solr
> directory and use it as their solr home.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]