RFR: 8358697: java/awt/font/TextLayout/MyanmarTextTest.java gives false positive result when preconditions not met [v4]

Manukumar V S mvs at openjdk.org
Wed Jun 18 19:18:06 UTC 2025


> Issue:
> MyanmarTextTest.java produces a false positive result when some of the test preconditions are not met. It checks whether certain fonts are present in the system, for example, 'Padauk' on Linux. If the required font is missing, the test simply returns early, and the test ends up passing, which is incorrect. Ideally, it should throw a jtreg.SkippedException when the necessary preconditions are not satisfied.
> 
> Another scenario is that the test passes on headless machines even though it creates GUI components. Ideally, when GUI components are created in code running on a headless machine, a HeadlessException should be thrown. However, since MyanmarTextTest.java exits before reaching the point where the GUI is created (due to unmet preconditions), it incorrectly reports a pass. This behavior may lead to a misinterpretation of the test as being headless, which it is not.
> 
> Fix:
> Need to throw jtreg.SkippedException in cases where some pre-conditions for running the test are not met.
> 
> Testing:
> Tested using mach5 in all available platforms and got full PASS.

Manukumar V S has updated the pull request incrementally with one additional commit since the last revision:

  Added blank line before OS_NAME

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25879/files
  - new: https://git.openjdk.org/jdk/pull/25879/files/ebd9bc33..bdc40569

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25879&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25879&range=02-03

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/25879.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25879/head:pull/25879

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


More information about the client-libs-dev mailing list