jdk17u-dev icon indicating copy to clipboard operation
jdk17u-dev copied to clipboard

8320608: Many jtreg printing tests are missing the @printer keyword

Open amosshi opened this issue 1 year ago • 4 comments
trafficstars

Backport of JDK-8320608

  • This PR contains two commits
  • commit 1: changes made by git apply, which is clean
  • commit 2: manual merge the test/jdk/TEST.ROOT.rej

Contents of test/jdk/TEST.ROOT.rej

@@ -9,17 +9,41 @@
 # should be taken to handle test failures of intermittent or
 # randomness tests.
 #
-# A "headful" test requires a graphical environment to meaningfully
-# run. Tests that are not headful are "headless".
-# A test flagged with key sound needs audio devices on the system, this
-# may be accompanied by the headful keyword since audio device access
+# A test flagged with cgroups uses cgroups.
+#
+# Notes on "client" keywords : headful sound printer multimon 
+# ===========================================================
+#
+# These keywords are there to help with test selection so that
+# tests that need a particular resource can be selected to run on a system
+# with that resource. Conversely "!somekeyword" can be used to exclude tests
+# on a system without such a resource.
+# Caution: If you are always excluding tests using any of these keywords then you
+# are likely missing many important tests.
+#
+# "headful". A "headful" test requires a graphical environment to meaningfully run.
+# This does not have to mean a physical host, since a VM can be configured as headful.
+# Tests that are not headful are "headless".
+# Note: all manual tests are assumed to be headful and do not need the keyword.
+#
+# "printer". Not all tests of printing APIs require a printer, but many do.
+# So a "printer" test requires a printer to be installed to do anything meaningful.
+# Tests may not fail if there is none, instead just silently return.
+# But they also may legitimately throw an Exception depending on the test.
+# Also printer tests are not necessarily headful, but some are, and some are automated.
+# 
+# "sound". Similarly, not all sound tests require audio devices, but many do.
+# A test flagged with key "sound" needs audio devices on the system.
+# Also they are not necessarily "headful", since they don't require a display etc.
+# But sometimes they may be accompanied by the headful keyword, since sound
 # is often linked to access to desktop resources and headful systems are
 # also more likely to have audio devices (ie meaning both input and output)
-# A test flagged with key "printer" requires a printer to succeed, else
-# throws a PrinterException or the like.
-# A test flagged with cgroups uses cgroups.
+#
+# "multimon" should be used in conjunction with headful and is used to identify
+# tests which require two displays connected.
 
-keys=2d dnd headful sound i18n intermittent printer randomness jfr cgroups
+keys=headful sound printer multimon \
+     i18n intermittent randomness jfr cgroups
 
 # Tests that must run in othervm mode
 othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/swing javax/print \

Testing

  • Local: Test passed on MacOS 14.5 with Apple M1 Max chip
    • test/jdk/java/awt/PrintJob/**: Test results: passed: 7
    • test/jdk/java/awt/print/**: Test results: passed: 38
    • test/jdk/javax/print/**: Test results: passed: 23
  • Pipeline:
  • Testing Machine:

Progress

  • [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue
  • [ ] JDK-8320608 needs maintainer approval

Issue

  • JDK-8320608: Many jtreg printing tests are missing the @printer keyword (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/2770/head:pull/2770
$ git checkout pull/2770

Update a local copy of the PR:
$ git checkout pull/2770
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/2770/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2770

View PR using the GUI difftool:
$ git pr show -t 2770

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/2770.diff

Webrev

Link to Webrev Comment

amosshi avatar Aug 01 '24 22:08 amosshi