RFR: 8342238: Test javax/crypto/CryptoPermissions/InconsistentEntries.java writes files in tested JDK dir
Fernando Guallini
fguallini at openjdk.org
Mon Jan 20 17:17:43 UTC 2025
The test javax/crypto/CryptoPermissions/InconsistentEntries.java should not modify the JDK home directory under test as that could impact the results of other tests, or it could fail if the JDK home dir is read-only.
This PR updates the test to
- clone the tested JDK into the scratch directory.
- create the required directory and file in the cloned JDK directory.
- run a subprocess using the temporal JDK to test the scenario.
There is no need to explicitly remove the tests files with an 'after' step, as JTreg will handle cleaning the scratch directory
-------------
Commit messages:
- refactoring
- clone JDK in temp and run test
Changes: https://git.openjdk.org/jdk/pull/23202/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23202&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8342238
Stats: 49 lines in 1 file changed: 21 ins; 14 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/23202.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23202/head:pull/23202
PR: https://git.openjdk.org/jdk/pull/23202
More information about the security-dev
mailing list