RFR: 8377018: Convert java/nio/file/DirectoryStream/SecureDS.java to junit [v6]

SendaoYan syan at openjdk.org
Fri Feb 6 02:48:56 UTC 2026


> Hi all,
> 
> This PR convert test/jdk/java/nio/file/DirectoryStream/SecureDS.java from jtreg/main to jtreg/junit.
> 
> Changes include:
> 
> 1. Use `@ParameterizedTest` and `@ValueSource` instead of jtreg id to test user.dir and /tmp seperately.
> 2. Use junit assertEquals/assertTrue instead of user defined assertTrue
> 3. Use assertEquals instead of throw new RuntimeException
> 4. Use junit fail instead of shouldNotGetHere and throw new RuntimeException
> 5. use assumeTrue instead of jtreg.SkippedException
> 6. abort test instead report fail when SecureDirectoryStream not supported

SendaoYan has updated the pull request incrementally with 22 additional commits since the last revision:

 - Abort test instead report fail when SecureDirectoryStream not supported
 - Revert @build Failure in runtime/logging/ClassLoadUnloadTest.java
 - Fix fails of some cds tests
 - 1. Revert move of Failure.java; 2. Fix fails of test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/HelloDynamicCustom.java
 - Fix javac warnings
 - Remove -sourcepath $(TOPDIR)/test/hotspot/jtreg/vmTestbase
 - Remove the depedency nsk.share in test/lib/jdk/test/lib/classloader/ClassUnloadCommon.java, and  and move CustomClassLoader.java/ClassFileFinder.java/Failure.java to test/lib/jdk/test/lib/classloader/
 - add javac parameter -sourcepath vmTestbase to fix fails when build test-lib
 - Add @library vmTestBase for test/hotspot/jtreg/runtime/logging/ClassLoadUnloadTest.java
 - Update comment
 - ... and 12 more: https://git.openjdk.org/jdk/compare/7df0beae...cb517426

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/29540/files
  - new: https://git.openjdk.org/jdk/pull/29540/files/7df0beae..cb517426

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29540&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29540&range=04-05

  Stats: 648 lines in 81 files changed: 258 ins; 289 del; 101 mod
  Patch: https://git.openjdk.org/jdk/pull/29540.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29540/head:pull/29540

PR: https://git.openjdk.org/jdk/pull/29540


More information about the serviceability-dev mailing list