From jjg at openjdk.org Thu Oct 6 00:10:56 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 6 Oct 2022 00:10:56 GMT Subject: RFR: CODETOOLS-7903346: Cannot compile jtreg with jdk-19 Message-ID: Please review a trivial change to a class in the jtreg repo, to disable warnings on an "unintentionally serializable" class. The class extends `TreeMap` which happens to be `Serializable`, and the class contains some non-serializable fields. In JDK 18, the javac serialization warnings were enhanced, causing this code to fail to compile with `-Xlint -Werror`. ------------- Commit messages: - CODETOOLS-7903346: Cannot compile jtreg with jdk-19 Changes: https://git.openjdk.org/jtreg/pull/129/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=129&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903346 Stats: 3 lines in 1 file changed: 1 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jtreg/pull/129.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/129/head:pull/129 PR: https://git.openjdk.org/jtreg/pull/129 From iris at openjdk.org Thu Oct 6 05:47:38 2022 From: iris at openjdk.org (Iris Clark) Date: Thu, 6 Oct 2022 05:47:38 GMT Subject: RFR: CODETOOLS-7903346: Cannot compile jtreg with jdk-19 In-Reply-To: References: Message-ID: On Thu, 6 Oct 2022 00:03:12 GMT, Jonathan Gibbons wrote: > Please review a trivial change to a class in the jtreg repo, to disable warnings on an "unintentionally serializable" class. > The class extends `TreeMap` which happens to be `Serializable`, and the class contains some non-serializable fields. > > In JDK 18, the javac serialization warnings were enhanced, causing this code to fail to compile with `-Xlint -Werror`. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jtreg/pull/129 From jjg at openjdk.org Thu Oct 6 14:24:43 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 6 Oct 2022 14:24:43 GMT Subject: Integrated: CODETOOLS-7903346: Cannot compile jtreg with jdk-19 In-Reply-To: References: Message-ID: On Thu, 6 Oct 2022 00:03:12 GMT, Jonathan Gibbons wrote: > Please review a trivial change to a class in the jtreg repo, to disable warnings on an "unintentionally serializable" class. > The class extends `TreeMap` which happens to be `Serializable`, and the class contains some non-serializable fields. > > In JDK 18, the javac serialization warnings were enhanced, causing this code to fail to compile with `-Xlint -Werror`. This pull request has now been integrated. Changeset: f4f1a41e Author: Jonathan Gibbons URL: https://git.openjdk.org/jtreg/commit/f4f1a41e4add3187b2c73f95c06591ae2de475a4 Stats: 3 lines in 1 file changed: 1 ins; 2 del; 0 mod 7903346: Cannot compile jtreg with jdk-19 Reviewed-by: iris ------------- PR: https://git.openjdk.org/jtreg/pull/129 From jjg at openjdk.org Mon Oct 10 21:08:52 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Mon, 10 Oct 2022 21:08:52 GMT Subject: RFR: CODETOOLS-7903332: Update version of jtharness to 6+24 Message-ID: Please review a small update to have jtreg use JT Harness 6+24. ------------- Commit messages: - CODETOOLS-7903332: Update version of jtharness to 6+24 Changes: https://git.openjdk.org/jtreg/pull/130/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=130&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903332 Stats: 8 lines in 4 files changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jtreg/pull/130.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/130/head:pull/130 PR: https://git.openjdk.org/jtreg/pull/130 From iris at openjdk.org Mon Oct 10 21:08:53 2022 From: iris at openjdk.org (Iris Clark) Date: Mon, 10 Oct 2022 21:08:53 GMT Subject: RFR: CODETOOLS-7903332: Update version of jtharness to 6+24 In-Reply-To: References: Message-ID: On Mon, 10 Oct 2022 20:57:32 GMT, Jonathan Gibbons wrote: > Please review a small update to have jtreg use JT Harness 6+24. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jtreg/pull/130 From jjg at openjdk.org Mon Oct 10 23:43:49 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Mon, 10 Oct 2022 23:43:49 GMT Subject: Integrated: CODETOOLS-7903332: Update version of jtharness to 6+24 In-Reply-To: References: Message-ID: <-doaINhsgJwxg7UrfzXJO21Ltloam-W2ZuUqweewQlA=.03f3a892-181d-419c-88e1-f2cab09503c7@github.com> On Mon, 10 Oct 2022 20:57:32 GMT, Jonathan Gibbons wrote: > Please review a small update to have jtreg use JT Harness 6+24. This pull request has now been integrated. Changeset: bd77a9ad Author: Jonathan Gibbons URL: https://git.openjdk.org/jtreg/commit/bd77a9adcd0beefd94c1ff17c74a3af0820a5776 Stats: 8 lines in 4 files changed: 0 ins; 0 del; 8 mod 7903332: Update version of jtharness to 6+24 Reviewed-by: iris ------------- PR: https://git.openjdk.org/jtreg/pull/130 From jjg at openjdk.org Tue Oct 11 22:29:01 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Tue, 11 Oct 2022 22:29:01 GMT Subject: RFR: CODETOOLS-7903331: jtreg fails with StringIndexOutOfBoundsException: Index -1 out of bounds for length 0 Message-ID: Please review a simple fix, with new test, for a recently discovered issue, such that including "." in a test group (to mean "all tests") caused an exception. Updating to JT Harness 6+24 improved the reporting of the exception but did not fix the root cause. The root cause came from jtreg setting an empty path for an "initial URL" in the `Parameters` object. In `TestManager.getTests` there was already precedent for returning `null` to mean "all tests", for tests specified on the command line. The fix is to extend that precedent to tests found in groups as well. There is an existing test `GroupTest`, but that one intentionally has an invalid test which should not normally be read, since it causes a parse failure when reading tests. So a new test is added, with different flavors of including "all" tests. In addition, since the original JDK bug was discovered in relation to the new `-report:files` option, the tests are extended to use that option as well. ------------- Commit messages: - CODETOOLS-7903331: jtreg fails with StringIndexOutOfBoundsException: Index -1 out of bounds for length 0 Changes: https://git.openjdk.org/jtreg/pull/131/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=131&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903331 Stats: 90 lines in 9 files changed: 73 ins; 0 del; 17 mod Patch: https://git.openjdk.org/jtreg/pull/131.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/131/head:pull/131 PR: https://git.openjdk.org/jtreg/pull/131 From iris at openjdk.org Tue Oct 11 22:59:32 2022 From: iris at openjdk.org (Iris Clark) Date: Tue, 11 Oct 2022 22:59:32 GMT Subject: RFR: CODETOOLS-7903331: jtreg fails with StringIndexOutOfBoundsException: Index -1 out of bounds for length 0 In-Reply-To: References: Message-ID: On Tue, 11 Oct 2022 22:22:20 GMT, Jonathan Gibbons wrote: > Please review a simple fix, with new test, for a recently discovered issue, such that including "." in a test group (to mean "all tests") caused an exception. > > Updating to JT Harness 6+24 improved the reporting of the exception but did not fix the root cause. > > The root cause came from jtreg setting an empty path for an "initial URL" in the `Parameters` object. > > In `TestManager.getTests` there was already precedent for returning `null` to mean "all tests", for tests specified on the command line. The fix is to extend that precedent to tests found in groups as well. > > There is an existing test `GroupTest`, but that one intentionally has an invalid test which should not normally be read, since it causes a parse failure when reading tests. So a new test is added, with different flavors of including "all" tests. In addition, since the original JDK bug was discovered in relation to the new `-report:files` option, the tests are extended to use that option as well. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jtreg/pull/131 From jjg at openjdk.org Wed Oct 12 00:02:22 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 12 Oct 2022 00:02:22 GMT Subject: Integrated: CODETOOLS-7903331: jtreg fails with StringIndexOutOfBoundsException: Index -1 out of bounds for length 0 In-Reply-To: References: Message-ID: On Tue, 11 Oct 2022 22:22:20 GMT, Jonathan Gibbons wrote: > Please review a simple fix, with new test, for a recently discovered issue, such that including "." in a test group (to mean "all tests") caused an exception. > > Updating to JT Harness 6+24 improved the reporting of the exception but did not fix the root cause. > > The root cause came from jtreg setting an empty path for an "initial URL" in the `Parameters` object. > > In `TestManager.getTests` there was already precedent for returning `null` to mean "all tests", for tests specified on the command line. The fix is to extend that precedent to tests found in groups as well. > > There is an existing test `GroupTest`, but that one intentionally has an invalid test which should not normally be read, since it causes a parse failure when reading tests. So a new test is added, with different flavors of including "all" tests. In addition, since the original JDK bug was discovered in relation to the new `-report:files` option, the tests are extended to use that option as well. This pull request has now been integrated. Changeset: f8c3879b Author: Jonathan Gibbons URL: https://git.openjdk.org/jtreg/commit/f8c3879bb0398b7e242d5b1997fbaaafbf37c5ae Stats: 90 lines in 9 files changed: 73 ins; 0 del; 17 mod 7903331: jtreg fails with StringIndexOutOfBoundsException: Index -1 out of bounds for length 0 Reviewed-by: iris ------------- PR: https://git.openjdk.org/jtreg/pull/131 From lmesnik at openjdk.org Thu Oct 13 22:59:55 2022 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Thu, 13 Oct 2022 22:59:55 GMT Subject: RFR: 7903356: jtreg Def.gmk fails to find tidy Message-ID: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> Added missing space. ------------- Commit messages: - fix Changes: https://git.openjdk.org/jtreg/pull/132/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=132&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903356 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jtreg/pull/132.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/132/head:pull/132 PR: https://git.openjdk.org/jtreg/pull/132 From cstein at openjdk.org Fri Oct 14 05:20:16 2022 From: cstein at openjdk.org (Christian Stein) Date: Fri, 14 Oct 2022 05:20:16 GMT Subject: RFR: 7903356: jtreg Def.gmk fails to find tidy In-Reply-To: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> References: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> Message-ID: On Thu, 13 Oct 2022 22:53:08 GMT, Leonid Mesnik wrote: > Added missing space. LGTM ------------- Marked as reviewed by cstein (Author). PR: https://git.openjdk.org/jtreg/pull/132 From lmesnik at openjdk.org Fri Oct 14 18:52:14 2022 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Fri, 14 Oct 2022 18:52:14 GMT Subject: RFR: 7903356: jtreg Def.gmk fails to find tidy In-Reply-To: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> References: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> Message-ID: On Thu, 13 Oct 2022 22:53:08 GMT, Leonid Mesnik wrote: > Added missing space. ough, I missed that I need 'R'eview. ------------- PR: https://git.openjdk.org/jtreg/pull/132 From cstein at openjdk.org Fri Oct 14 18:58:12 2022 From: cstein at openjdk.org (Christian Stein) Date: Fri, 14 Oct 2022 18:58:12 GMT Subject: RFR: 7903356: jtreg Def.gmk fails to find tidy In-Reply-To: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> References: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> Message-ID: On Thu, 13 Oct 2022 22:53:08 GMT, Leonid Mesnik wrote: > Added missing space. Perhaps @irisclark can do a `R`eview for you? ------------- PR: https://git.openjdk.org/jtreg/pull/132 From jjg at openjdk.org Mon Oct 17 19:34:27 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Mon, 17 Oct 2022 19:34:27 GMT Subject: RFR: 7903356: jtreg Def.gmk fails to find tidy In-Reply-To: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> References: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> Message-ID: <_ciDwWBbZ82Emo9UVzpfzx6rTw0bztaAKzstsABt_vk=.be3bb4e5-fc73-4a16-b85e-b3c78847e2bc@github.com> On Thu, 13 Oct 2022 22:53:08 GMT, Leonid Mesnik wrote: > Added missing space. Marked as reviewed by jjg (Lead). ------------- PR: https://git.openjdk.org/jtreg/pull/132 From lmesnik at openjdk.org Mon Oct 17 22:52:17 2022 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Mon, 17 Oct 2022 22:52:17 GMT Subject: Integrated: 7903356: jtreg Def.gmk fails to find tidy In-Reply-To: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> References: <1imOMoWMbBbZ7xwhm8HU3xpBMR826YXbeANGweRN_Hk=.f8d4896f-5c9b-4f23-a0f2-d3798d71c578@github.com> Message-ID: On Thu, 13 Oct 2022 22:53:08 GMT, Leonid Mesnik wrote: > Added missing space. This pull request has now been integrated. Changeset: b665ac04 Author: Leonid Mesnik Committer: Jonathan Gibbons URL: https://git.openjdk.org/jtreg/commit/b665ac0473dedb23ed15d94723a4b067b6844aee Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 7903356: jtreg Def.gmk fails to find tidy Reviewed-by: cstein, jjg ------------- PR: https://git.openjdk.org/jtreg/pull/132 From jjg at openjdk.org Tue Oct 18 18:57:53 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Tue, 18 Oct 2022 18:57:53 GMT Subject: RFR: CODETOOLS-7903231: Add changelog to jtreg Message-ID: CODETOOLS-7903231: Add changelog to jtreg ------------- Commit messages: - more formatting updates - remove SHA hashes, improve formatting - CODETOOLS-7903231: Add changelog to jtreg Changes: https://git.openjdk.org/jtreg/pull/133/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=133&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903231 Stats: 174 lines in 1 file changed: 174 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jtreg/pull/133.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/133/head:pull/133 PR: https://git.openjdk.org/jtreg/pull/133 From cstein at openjdk.org Tue Oct 18 18:57:54 2022 From: cstein at openjdk.org (Christian Stein) Date: Tue, 18 Oct 2022 18:57:54 GMT Subject: RFR: CODETOOLS-7903231: Add changelog to jtreg In-Reply-To: References: Message-ID: On Mon, 17 Oct 2022 22:45:12 GMT, Jonathan Gibbons wrote: > CODETOOLS-7903231: Add changelog to jtreg Looks good! For each recent version, it contains interesting changes in human-readable form as well as links to all commits. ------------- Marked as reviewed by cstein (Author). PR: https://git.openjdk.org/jtreg/pull/133 From iris at openjdk.org Tue Oct 18 19:02:49 2022 From: iris at openjdk.org (Iris Clark) Date: Tue, 18 Oct 2022 19:02:49 GMT Subject: RFR: CODETOOLS-7903231: Add changelog to jtreg In-Reply-To: References: Message-ID: On Mon, 17 Oct 2022 22:45:12 GMT, Jonathan Gibbons wrote: > CODETOOLS-7903231: Add changelog to jtreg Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jtreg/pull/133 From jjg at openjdk.org Tue Oct 18 22:27:21 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Tue, 18 Oct 2022 22:27:21 GMT Subject: Integrated: CODETOOLS-7903231: Add changelog to jtreg In-Reply-To: References: Message-ID: On Mon, 17 Oct 2022 22:45:12 GMT, Jonathan Gibbons wrote: > CODETOOLS-7903231: Add changelog to jtreg This pull request has now been integrated. Changeset: 3b1aba87 Author: Jonathan Gibbons URL: https://git.openjdk.org/jtreg/commit/3b1aba87a170e0ada30ec9075aaaf1b800140328 Stats: 174 lines in 1 file changed: 174 ins; 0 del; 0 mod 7903231: Add changelog to jtreg Reviewed-by: cstein, iris ------------- PR: https://git.openjdk.org/jtreg/pull/133 From jjg at openjdk.org Wed Oct 19 19:05:05 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 19 Oct 2022 19:05:05 GMT Subject: RFR: CODETOOLS-7903370: Update openjdk.java.net URLs to openjdk.org Message-ID: <1KLo8b7RqmDO2fVGU0FN_ID7RLCfIEtm7zKaX1SGdPk=.352e5ed0-c52c-46ce-b663-076bd6da84a8@github.com> Please review a trivial patch to update `openjdk.java.net` URLs to use `openjdk.org`. ------------- Commit messages: - CODETOOLS-7903370: Update openjdk.java.net URLs to openjdk.org Changes: https://git.openjdk.org/jtreg/pull/134/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=134&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903370 Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jtreg/pull/134.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/134/head:pull/134 PR: https://git.openjdk.org/jtreg/pull/134 From iris at openjdk.org Wed Oct 19 19:11:13 2022 From: iris at openjdk.org (Iris Clark) Date: Wed, 19 Oct 2022 19:11:13 GMT Subject: RFR: CODETOOLS-7903370: Update openjdk.java.net URLs to openjdk.org In-Reply-To: <1KLo8b7RqmDO2fVGU0FN_ID7RLCfIEtm7zKaX1SGdPk=.352e5ed0-c52c-46ce-b663-076bd6da84a8@github.com> References: <1KLo8b7RqmDO2fVGU0FN_ID7RLCfIEtm7zKaX1SGdPk=.352e5ed0-c52c-46ce-b663-076bd6da84a8@github.com> Message-ID: On Wed, 19 Oct 2022 18:53:35 GMT, Jonathan Gibbons wrote: > Please review a trivial patch to update `openjdk.java.net` URLs to use `openjdk.org`. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jtreg/pull/134 From jjg at openjdk.org Wed Oct 19 19:48:57 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 19 Oct 2022 19:48:57 GMT Subject: RFR: CODETOOLS-7903371: Use multi-catch where applicable Message-ID: <5IrlaH6F5zkGiMXpRz9HBLFeBP-hnxO809pDhWE--4M=.aa31dac0-31e5-41c2-84a1-f152c327402e@github.com> Please review a code-cleanup to use multi-catch where applicable, as well as some other cleanup suggested by an IDE. ------------- Commit messages: - CODETOOLS-7903371: Use multi-catch where applicable Changes: https://git.openjdk.org/jtreg/pull/135/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=135&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903371 Stats: 40 lines in 4 files changed: 1 ins; 13 del; 26 mod Patch: https://git.openjdk.org/jtreg/pull/135.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/135/head:pull/135 PR: https://git.openjdk.org/jtreg/pull/135 From jjg at openjdk.org Wed Oct 19 19:57:22 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 19 Oct 2022 19:57:22 GMT Subject: Integrated: CODETOOLS-7903370: Update openjdk.java.net URLs to openjdk.org In-Reply-To: <1KLo8b7RqmDO2fVGU0FN_ID7RLCfIEtm7zKaX1SGdPk=.352e5ed0-c52c-46ce-b663-076bd6da84a8@github.com> References: <1KLo8b7RqmDO2fVGU0FN_ID7RLCfIEtm7zKaX1SGdPk=.352e5ed0-c52c-46ce-b663-076bd6da84a8@github.com> Message-ID: On Wed, 19 Oct 2022 18:53:35 GMT, Jonathan Gibbons wrote: > Please review a trivial patch to update `openjdk.java.net` URLs to use `openjdk.org`. This pull request has now been integrated. Changeset: b44b4460 Author: Jonathan Gibbons URL: https://git.openjdk.org/jtreg/commit/b44b4460e6b50f338f4afff661a336c2a404a7b9 Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod 7903370: Update openjdk.java.net URLs to openjdk.org Reviewed-by: iris ------------- PR: https://git.openjdk.org/jtreg/pull/134 From iris at openjdk.org Wed Oct 19 20:49:14 2022 From: iris at openjdk.org (Iris Clark) Date: Wed, 19 Oct 2022 20:49:14 GMT Subject: RFR: CODETOOLS-7903371: Use multi-catch where applicable In-Reply-To: <5IrlaH6F5zkGiMXpRz9HBLFeBP-hnxO809pDhWE--4M=.aa31dac0-31e5-41c2-84a1-f152c327402e@github.com> References: <5IrlaH6F5zkGiMXpRz9HBLFeBP-hnxO809pDhWE--4M=.aa31dac0-31e5-41c2-84a1-f152c327402e@github.com> Message-ID: On Wed, 19 Oct 2022 19:38:56 GMT, Jonathan Gibbons wrote: > Please review a code-cleanup to use multi-catch where applicable, as well as some other cleanup suggested by an IDE. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.org/jtreg/pull/135 From jjg at openjdk.org Wed Oct 19 20:57:24 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 19 Oct 2022 20:57:24 GMT Subject: Integrated: CODETOOLS-7903371: Use multi-catch where applicable In-Reply-To: <5IrlaH6F5zkGiMXpRz9HBLFeBP-hnxO809pDhWE--4M=.aa31dac0-31e5-41c2-84a1-f152c327402e@github.com> References: <5IrlaH6F5zkGiMXpRz9HBLFeBP-hnxO809pDhWE--4M=.aa31dac0-31e5-41c2-84a1-f152c327402e@github.com> Message-ID: <0K4wwYKwaGA24CfnVjmXBDGLfSi8Wkfpo6aXL9HTxsA=.90ecbe03-9525-4c29-bc13-e7bf540727e4@github.com> On Wed, 19 Oct 2022 19:38:56 GMT, Jonathan Gibbons wrote: > Please review a code-cleanup to use multi-catch where applicable, as well as some other cleanup suggested by an IDE. This pull request has now been integrated. Changeset: 1ad8188f Author: Jonathan Gibbons URL: https://git.openjdk.org/jtreg/commit/1ad8188f7788b1282302649c344d94e20bd3c42a Stats: 40 lines in 4 files changed: 1 ins; 13 del; 26 mod 7903371: Use multi-catch where applicable Reviewed-by: iris ------------- PR: https://git.openjdk.org/jtreg/pull/135 From lmesnik at openjdk.org Wed Oct 26 21:34:27 2022 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Wed, 26 Oct 2022 21:34:27 GMT Subject: RFR: 7903373: Add ability to customize test execution using main wrapper plugin Message-ID: The fix adds support of a plugin that customizes test execution. ------------- Commit messages: - argumetns added - test fixed - fixed space - more identation fixes - identation fixed. - Merge branch 'master' of https://github.com/openjdk/jtreg into loom - fixes - Wrapper moved to JDK - ident - fix - ... and 29 more: https://git.openjdk.org/jtreg/compare/1ad8188f...7b9b8e93 Changes: https://git.openjdk.org/jtreg/pull/136/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=136&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903373 Stats: 384 lines in 12 files changed: 374 ins; 1 del; 9 mod Patch: https://git.openjdk.org/jtreg/pull/136.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/136/head:pull/136 PR: https://git.openjdk.org/jtreg/pull/136 From jjg at openjdk.org Wed Oct 26 21:34:28 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Wed, 26 Oct 2022 21:34:28 GMT Subject: RFR: 7903373: Add ability to customize test execution using main wrapper plugin In-Reply-To: References: Message-ID: <9gLYa1ExQ4CQihTXoVkWGahkj5eGjAC-yg_MJTDM_aU=.35b5bd28-4922-490e-8579-e5e40254ebc5@github.com> On Fri, 21 Oct 2022 21:43:04 GMT, Leonid Mesnik wrote: > The fix adds support of a plugin that customizes test execution. On a first pass, it generally looks very good; well done. I'd like to go through it again next week. src/share/classes/com/sun/javatest/regtest/tool/i18n.properties line 177: > 175: help.main.mw.desc=Man wrapper desc > 176: help.main.mwp.arg=Man wrapper argument > 177: help.main.mwp.desc=Man wrapper desc possible spelling errors: should "Man wrapper" be "Main" -- if not, what is a "Man Wrapper" ? test/mainWrapper/TestMainWrapper.gmk line 49: > 47: echo "test passed at `date`" > $@ > 48: > 49: INITIAL_TESTS += $(BUILDTESTDIR)/TestMainWrapper.ok I don't think this test is important enough to be in the set of initial tests; it should just be in the set of general jtreg tests (`TESTS.jtreg`) ------------- PR: https://git.openjdk.org/jtreg/pull/136 From lmesnik at openjdk.org Wed Oct 26 21:34:29 2022 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Wed, 26 Oct 2022 21:34:29 GMT Subject: RFR: 7903373: Add ability to customize test execution using main wrapper plugin In-Reply-To: <9gLYa1ExQ4CQihTXoVkWGahkj5eGjAC-yg_MJTDM_aU=.35b5bd28-4922-490e-8579-e5e40254ebc5@github.com> References: <9gLYa1ExQ4CQihTXoVkWGahkj5eGjAC-yg_MJTDM_aU=.35b5bd28-4922-490e-8579-e5e40254ebc5@github.com> Message-ID: On Fri, 21 Oct 2022 23:35:07 GMT, Jonathan Gibbons wrote: >> The fix adds support of a plugin that customizes test execution. > > src/share/classes/com/sun/javatest/regtest/tool/i18n.properties line 177: > >> 175: help.main.mw.desc=Man wrapper desc >> 176: help.main.mwp.arg=Man wrapper argument >> 177: help.main.mwp.desc=Man wrapper desc > > possible spelling errors: should "Man wrapper" be "Main" -- if not, what is a "Man Wrapper" ? fixed > test/mainWrapper/TestMainWrapper.gmk line 49: > >> 47: echo "test passed at `date`" > $@ >> 48: >> 49: INITIAL_TESTS += $(BUILDTESTDIR)/TestMainWrapper.ok > > I don't think this test is important enough to be in the set of initial tests; it should just be in the set of general jtreg tests (`TESTS.jtreg`) fixed ------------- PR: https://git.openjdk.org/jtreg/pull/136 From cstein at openjdk.org Thu Oct 27 18:22:01 2022 From: cstein at openjdk.org (Christian Stein) Date: Thu, 27 Oct 2022 18:22:01 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file Message-ID: Improve per-class reporting of JUnit tests by using a custom `TestExecutionListener` in `JUnitRunner`. ------------- Commit messages: - Run JUnit trace self-test as an initial test - Fix build - Address feedback from reviewers - Merge branch 'openjdk:master' into 7903324-improve-junit-per-class-reporting - Improve readability by refactoring launcher configuration and extracting summary rendering - Capture messages printed to standard streams by default - Address review comments - Improve per-class reporting of JUnit tests Changes: https://git.openjdk.org/jtreg/pull/127/files Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=127&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903324 Stats: 153 lines in 2 files changed: 114 ins; 31 del; 8 mod Patch: https://git.openjdk.org/jtreg/pull/127.diff Fetch: git fetch https://git.openjdk.org/jtreg pull/127/head:pull/127 PR: https://git.openjdk.org/jtreg/pull/127 From cstein at openjdk.org Thu Oct 27 18:22:04 2022 From: cstein at openjdk.org (Christian Stein) Date: Thu, 27 Oct 2022 18:22:04 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: <9pDD48BFO8KH7MpXldGBBNqpIc_hg0rLdm-BE0pVVaQ=.5d6c7e3f-c5bc-47b8-a795-1708c53e2117@github.com> On Mon, 26 Sep 2022 10:07:18 GMT, Christian Stein wrote: > Improve per-class reporting of JUnit tests by using a custom `TestExecutionListener` in `JUnitRunner`. Here are some sample output snippets copied from `.jtr` files collected by running self-tests if jtreg. _Regenerating..._ Here's an output sample for a modified [JUnit Trace self-test](https://github.com/openjdk/jtreg/blob/master/test/junitTrace/JupiterTests.java) with a failing case, namely using `"123"` as a non-blank data point: SUCCESSFUL: JupiterTests::nullEmptyAndBlankStrings '[1] test('null')' SUCCESSFUL: JupiterTests::nullEmptyAndBlankStrings '[2] test('')' SUCCESSFUL: JupiterTests::nullEmptyAndBlankStrings '[3] test(' ')' SUCCESSFUL: JupiterTests::nullEmptyAndBlankStrings '[4] test(' ')' FAILED: JupiterTests::nullEmptyAndBlankStrings '[5] test('123')' org.opentest4j.AssertionFailedError: Input text "123" not blank ==> expected: but was: at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55) at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40) at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:210) at JupiterTests.nullEmptyAndBlankStrings(JupiterTests.java:63) [...] at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312) at java.base/java.lang.Thread.run(Thread.java:833) SUCCESSFUL: JupiterTests::nullEmptyAndBlankStrings '[6] test(' ')' SUCCESSFUL: JupiterTests::succeedingTest 'succeedingTest()' ABORTED: JupiterTests::abortedTest 'abortedTest()' org.opentest4j.TestAbortedException: Assumption failed: abort test execution mid-flight JavaTest Message: JUnit Platform Failure(s): 1 [ JUnit Containers: found 4, started 4, succeeded 4, failed 0, aborted 0, skipped 0] [ JUnit Tests: found 9, started 8, succeeded 6, failed 1, aborted 1, skipped 1] java.lang.Exception: JUnit test failure at com.sun.javatest.regtest.agent.JUnitRunner.runWithJUnitPlatform(JUnitRunner.java:154) at com.sun.javatest.regtest.agent.JUnitRunner.main(JUnitRunner.java:96) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312) at java.base/java.lang.Thread.run(Thread.java:833) JavaTest Message: Test threw exception: java.lang.Exception JavaTest Message: shutting down test Note: I pruned a lot of lines from the exception stack trace. src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 205: > 203: // additionally print stacktrace for a non-successful test > 204: if (result.getStatus() != TestExecutionResult.Status.SUCCESSFUL) { > 205: result.getThrowable().ifPresent(printer::println); Print complete stacktrace of the cause? Prune "Java system" frames? src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 228: > 226: > 227: @Override > 228: public void reportingEntryPublished(TestIdentifier identifier, ReportEntry entry) { @AlanBateman Here is the place where a report entry is printed in the context of a test method. ------------- PR: https://git.openjdk.org/jtreg/pull/127 From alanb at openjdk.org Thu Oct 27 18:22:06 2022 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 27 Oct 2022 18:22:06 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: On Mon, 26 Sep 2022 10:07:18 GMT, Christian Stein wrote: > Improve per-class reporting of JUnit tests by using a custom `TestExecutionListener` in `JUnitRunner`. src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 136: > 134: Launcher launcher = session.getLauncher(); > 135: launcher.registerTestExecutionListeners(summaryGeneratingListener); > 136: launcher.registerTestExecutionListeners(new PrintingListener(System.err)); Is System.err correct? If my test prints messages to System.out them how will I know which test they came from? ------------- PR: https://git.openjdk.org/jtreg/pull/127 From cstein at openjdk.org Thu Oct 27 18:22:07 2022 From: cstein at openjdk.org (Christian Stein) Date: Thu, 27 Oct 2022 18:22:07 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: On Tue, 27 Sep 2022 13:09:59 GMT, Alan Bateman wrote: >> Improve per-class reporting of JUnit tests by using a custom `TestExecutionListener` in `JUnitRunner`. > > src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 136: > >> 134: Launcher launcher = session.getLauncher(); >> 135: launcher.registerTestExecutionListeners(summaryGeneratingListener); >> 136: launcher.registerTestExecutionListeners(new PrintingListener(System.err)); > > Is System.err correct? If my test prints messages to System.out them how will I know which test they came from? `System.err` seems to be more correct, looking at other printing code in jtreg. I used `System.out` first, which was remarked by @jonathan-gibbons in a previous note. > If my test prints messages to System.out them how will I know which test they came from? The canonical way is Jupiter's `TestReporter` as described in [Writing Tests - Dependency Injection for Constructors and Methods](https://junit.org/junit5/docs/current/user-guide/#writing-tests-dependency-injection) > The `TestReporter` can be used to publish additional data about the current test run. The data can be consumed via the `reportingEntryPublished()` method in a [TestExecutionListener](https://junit.org/junit5/docs/current/api/org.junit.platform.launcher/org/junit/platform/launcher/TestExecutionListener.html), allowing it to be viewed in IDEs or included in reports. > ... > In JUnit Jupiter you should use TestReporter where you used to print information to stdout or stderr in JUnit 4. class TestReporterDemo { @Test void reportSingleValue(TestReporter testReporter) { testReporter.publishEntry("a status message"); } @Test void reportKeyValuePair(TestReporter testReporter) { testReporter.publishEntry("a key", "a value"); } @Test void reportMultipleKeyValuePairs(TestReporter testReporter) { var values = Map.of("user name", "dk38", "award year", "1974"); testReporter.publishEntry(values); } } ------------- PR: https://git.openjdk.org/jtreg/pull/127 From cstein at openjdk.org Thu Oct 27 18:22:08 2022 From: cstein at openjdk.org (Christian Stein) Date: Thu, 27 Oct 2022 18:22:08 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: On Tue, 27 Sep 2022 13:22:26 GMT, Christian Stein wrote: >> src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 136: >> >>> 134: Launcher launcher = session.getLauncher(); >>> 135: launcher.registerTestExecutionListeners(summaryGeneratingListener); >>> 136: launcher.registerTestExecutionListeners(new PrintingListener(System.err)); >> >> Is System.err correct? If my test prints messages to System.out them how will I know which test they came from? > > `System.err` seems to be more correct, looking at other printing code in jtreg. I used `System.out` first, which was remarked by @jonathan-gibbons in a previous note. > >> If my test prints messages to System.out them how will I know which test they came from? > > The canonical way is Jupiter's `TestReporter` as described in [Writing Tests - Dependency Injection for Constructors and Methods](https://junit.org/junit5/docs/current/user-guide/#writing-tests-dependency-injection) > >> The `TestReporter` can be used to publish additional data about the current test run. The data can be consumed via the `reportingEntryPublished()` method in a [TestExecutionListener](https://junit.org/junit5/docs/current/api/org.junit.platform.launcher/org/junit/platform/launcher/TestExecutionListener.html), allowing it to be viewed in IDEs or included in reports. >> ... >> In JUnit Jupiter you should use TestReporter where you used to print information to stdout or stderr in JUnit 4. > > > class TestReporterDemo { > > @Test > void reportSingleValue(TestReporter testReporter) { > testReporter.publishEntry("a status message"); > } > > @Test > void reportKeyValuePair(TestReporter testReporter) { > testReporter.publishEntry("a key", "a value"); > } > > @Test > void reportMultipleKeyValuePairs(TestReporter testReporter) { > var values = Map.of("user name", "dk38", "award year", "1974"); > testReporter.publishEntry(values); > } > > } Having said that, there's also: [Capturing Standard Output/Error](https://junit.org/junit5/docs/current/user-guide/#running-tests-capturing-output), an opt-in support for capturing output printed to `System.out` and `System.err`. > If enabled, the JUnit Platform captures the corresponding output and publishes it as a report entry using the stdout or stderr keys to all registered [TestExecutionListener](https://junit.org/junit5/docs/current/api/org.junit.platform.launcher/org/junit/platform/launcher/TestExecutionListener.html) instances immediately before reporting the test or container as finished. Shall we enable capturing standard streams by default? ------------- PR: https://git.openjdk.org/jtreg/pull/127 From alanb at openjdk.org Thu Oct 27 18:22:10 2022 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 27 Oct 2022 18:22:10 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: On Tue, 27 Sep 2022 13:30:28 GMT, Christian Stein wrote: >> `System.err` seems to be more correct, looking at other printing code in jtreg. I used `System.out` first, which was remarked by @jonathan-gibbons in a previous note. >> >>> If my test prints messages to System.out them how will I know which test they came from? >> >> The canonical way is Jupiter's `TestReporter` as described in [Writing Tests - Dependency Injection for Constructors and Methods](https://junit.org/junit5/docs/current/user-guide/#writing-tests-dependency-injection) >> >>> The `TestReporter` can be used to publish additional data about the current test run. The data can be consumed via the `reportingEntryPublished()` method in a [TestExecutionListener](https://junit.org/junit5/docs/current/api/org.junit.platform.launcher/org/junit/platform/launcher/TestExecutionListener.html), allowing it to be viewed in IDEs or included in reports. >>> ... >>> In JUnit Jupiter you should use TestReporter where you used to print information to stdout or stderr in JUnit 4. >> >> >> class TestReporterDemo { >> >> @Test >> void reportSingleValue(TestReporter testReporter) { >> testReporter.publishEntry("a status message"); >> } >> >> @Test >> void reportKeyValuePair(TestReporter testReporter) { >> testReporter.publishEntry("a key", "a value"); >> } >> >> @Test >> void reportMultipleKeyValuePairs(TestReporter testReporter) { >> var values = Map.of("user name", "dk38", "award year", "1974"); >> testReporter.publishEntry(values); >> } >> >> } > > Having said that, there's also: [Capturing Standard Output/Error](https://junit.org/junit5/docs/current/user-guide/#running-tests-capturing-output), an opt-in support for capturing output printed to `System.out` and `System.err`. >> If enabled, the JUnit Platform captures the corresponding output and publishes it as a report entry using the stdout or stderr keys to all registered [TestExecutionListener](https://junit.org/junit5/docs/current/api/org.junit.platform.launcher/org/junit/platform/launcher/TestExecutionListener.html) instances immediately before reporting the test or container as finished. > > Shall we enable capturing standard streams by default? With TestNG, the "test $testname: $result" messages show up in the jtr System.out section. If a test prints anything then it will inlined and appear before the message emitted by TestNG. So this will take a bit of getting used to. ------------- PR: https://git.openjdk.org/jtreg/pull/127 From dfuchs at openjdk.org Thu Oct 27 18:22:10 2022 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Thu, 27 Oct 2022 18:22:10 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: On Tue, 27 Sep 2022 13:30:52 GMT, Alan Bateman wrote: >> Having said that, there's also: [Capturing Standard Output/Error](https://junit.org/junit5/docs/current/user-guide/#running-tests-capturing-output), an opt-in support for capturing output printed to `System.out` and `System.err`. >>> If enabled, the JUnit Platform captures the corresponding output and publishes it as a report entry using the stdout or stderr keys to all registered [TestExecutionListener](https://junit.org/junit5/docs/current/api/org.junit.platform.launcher/org/junit/platform/launcher/TestExecutionListener.html) instances immediately before reporting the test or container as finished. >> >> Shall we enable capturing standard streams by default? > > With TestNG, the "test $testname: $result" messages show up in the jtr System.out section. If a test prints anything then it will inlined and appear before the message emitted by TestNG. So this will take a bit of getting used to. It's just a matter of remembering that testng uses System.out while junit uses System.err. If you use logging in your tests (either directly or by enabling logging for the lib you're using - e.g. http traces) then these traces will go to System.err. In some cases I had to go out of my way to configure the logging to go to System.out instead when using testng. So System.err is probably less surprising unless you come from testng ;-) ------------- PR: https://git.openjdk.org/jtreg/pull/127 From jjg at openjdk.org Thu Oct 27 18:22:11 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 27 Oct 2022 18:22:11 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: On Mon, 26 Sep 2022 10:07:18 GMT, Christian Stein wrote: > Improve per-class reporting of JUnit tests by using a custom `TestExecutionListener` in `JUnitRunner`. src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 182: > 180: @Override > 181: public void executionFinished(TestIdentifier identifier, TestExecutionResult result) { > 182: System.out.println(identifier.getDisplayName() + ": " + result.getStatus()); Which `System` stream is better? `out`, or `err` ? ------------- PR: https://git.openjdk.org/jtreg/pull/127 From jjg at openjdk.org Thu Oct 27 18:22:13 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 27 Oct 2022 18:22:13 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: On Mon, 26 Sep 2022 15:29:38 GMT, Jonathan Gibbons wrote: >> Improve per-class reporting of JUnit tests by using a custom `TestExecutionListener` in `JUnitRunner`. > > src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 182: > >> 180: @Override >> 181: public void executionFinished(TestIdentifier identifier, TestExecutionResult result) { >> 182: System.out.println(identifier.getDisplayName() + ": " + result.getStatus()); > > Which `System` stream is better? `out`, or `err` ? Maybe `PrintingListener` should have a constructor which takes a `PrintStream` or `PrintWriter`, so that we only get to reference the `System` stream once, when the listener is created... ------------- PR: https://git.openjdk.org/jtreg/pull/127 From cstein at openjdk.org Thu Oct 27 18:22:13 2022 From: cstein at openjdk.org (Christian Stein) Date: Thu, 27 Oct 2022 18:22:13 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: References: Message-ID: <1i1GKbwZdGSG5G0cSv9EEFTgDxg55A8vKZ6mdIGPwQA=.f6c3746e-3d79-4517-8063-1ce13703dbf4@github.com> On Mon, 26 Sep 2022 15:31:04 GMT, Jonathan Gibbons wrote: >> src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 182: >> >>> 180: @Override >>> 181: public void executionFinished(TestIdentifier identifier, TestExecutionResult result) { >>> 182: System.out.println(identifier.getDisplayName() + ": " + result.getStatus()); >> >> Which `System` stream is better? `out`, or `err` ? > > Maybe `PrintingListener` should have a constructor which takes a `PrintStream` or `PrintWriter`, so that we only get to reference the `System` stream once, when the listener is created... Using `System.err` via a constructor parameter since https://github.com/openjdk/jtreg/pull/127/commits/7adedc204ed22192cd25a9ed42dad4f0af20249c ------------- PR: https://git.openjdk.org/jtreg/pull/127 From cstein at openjdk.org Thu Oct 27 18:22:15 2022 From: cstein at openjdk.org (Christian Stein) Date: Thu, 27 Oct 2022 18:22:15 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: <9pDD48BFO8KH7MpXldGBBNqpIc_hg0rLdm-BE0pVVaQ=.5d6c7e3f-c5bc-47b8-a795-1708c53e2117@github.com> References: <9pDD48BFO8KH7MpXldGBBNqpIc_hg0rLdm-BE0pVVaQ=.5d6c7e3f-c5bc-47b8-a795-1708c53e2117@github.com> Message-ID: On Tue, 27 Sep 2022 13:11:46 GMT, Christian Stein wrote: >> Improve per-class reporting of JUnit tests by using a custom `TestExecutionListener` in `JUnitRunner`. > > src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 205: > >> 203: // additionally print stacktrace for a non-successful test >> 204: if (result.getStatus() != TestExecutionResult.Status.SUCCESSFUL) { >> 205: result.getThrowable().ifPresent(printer::println); > > Print complete stacktrace of the cause? Prune "Java system" frames? All stacktraces with assertion error messages are also printed using the summary generating listener. Keep the duplication of information? ------------- PR: https://git.openjdk.org/jtreg/pull/127 From alanb at openjdk.org Thu Oct 27 18:22:19 2022 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 27 Oct 2022 18:22:19 GMT Subject: RFR: 7903324: Improve per-class reporting of JUnit tests, in .jtr file In-Reply-To: <9pDD48BFO8KH7MpXldGBBNqpIc_hg0rLdm-BE0pVVaQ=.5d6c7e3f-c5bc-47b8-a795-1708c53e2117@github.com> References: <9pDD48BFO8KH7MpXldGBBNqpIc_hg0rLdm-BE0pVVaQ=.5d6c7e3f-c5bc-47b8-a795-1708c53e2117@github.com> Message-ID: On Tue, 27 Sep 2022 13:24:56 GMT, Christian Stein wrote: >> Improve per-class reporting of JUnit tests by using a custom `TestExecutionListener` in `JUnitRunner`. > > src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java line 228: > >> 226: >> 227: @Override >> 228: public void reportingEntryPublished(TestIdentifier identifier, ReportEntry entry) { > > @AlanBateman Here is the place where a report entry is printed in the context of a test method. Would it be possible to paste in sample .jtr output with both the System.out and System.err for a sample with at least two tests (one passes, the other fails) so we can see what it looks like? I think this would help us see how it will look. ------------- PR: https://git.openjdk.org/jtreg/pull/127 From jjg at openjdk.org Fri Oct 28 23:38:42 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Fri, 28 Oct 2022 23:38:42 GMT Subject: RFR: 7903373: Add ability to customize test execution using main wrapper plugin In-Reply-To: References: Message-ID: On Fri, 21 Oct 2022 21:43:04 GMT, Leonid Mesnik wrote: > The fix adds support of a plugin that customizes test execution. src/share/classes/com/sun/javatest/regtest/agent/CustomMainWrapper.java line 38: > 36: import java.util.List; > 37: > 38: public interface CustomMainWrapper { Add a javadoc comment explaining the purpose of the interface src/share/classes/com/sun/javatest/regtest/agent/CustomMainWrapper.java line 105: > 103: return vmOpts; > 104: } > 105: } Is this real code, or just toy test code? src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java line 1248: > 1246: > 1247: private long timeoutHandlerTimeout; > 1248: //--------------------------------------------------------------------- You have not updated `load` and `save` in this class src/share/classes/com/sun/javatest/regtest/tool/Tool.java line 1223: > 1221: > 1222: if (customMainWrapper != null) { > 1223: CustomMainWrapper cmw = CustomMainWrapper.getInstance(customMainWrapper, customMainWrapperPathArg); Why are you creating an instance of the main wrapper on the tool side? src/share/classes/com/sun/javatest/regtest/tool/Tool.java line 1225: > 1223: CustomMainWrapper cmw = CustomMainWrapper.getInstance(customMainWrapper, customMainWrapperPathArg); > 1224: testVMOpts.add("-D" + MainWrapper.MAIN_WRAPPER + "=" + customMainWrapper); > 1225: testVMOpts.addAll(cmw.getAdditionalVMOpts()); Ah, OK, there's the possibility that the instance of the wrapper class might want to specify some VM options. That's somewhat circular. https://en.wikipedia.org/wiki/Ouroboros src/share/classes/com/sun/javatest/regtest/tool/Tool.java line 1230: > 1228: if (customMainWrapperPathArg != null) { > 1229: testVMOpts.add("-D" + MainWrapper.MAIN_WRAPPER_PATH + "=" + customMainWrapperPathArg); > 1230: } It seems premature to be stashing values in the `testVMOpts` here. The more conventional way would be to pass these values through the `RegressionParameters` object to where the instance of the `RegressionScript` can decide whether to take these values into account for each individual test. src/share/classes/com/sun/javatest/regtest/tool/i18n.properties line 174: > 172: help.main.ignore.run.desc=Run the test, as though the @ignore tag were not present. > 173: help.main.l.desc=List the tests that would be executed instead of executing them. > 174: help.main.mw.arg==[options] using an `=` between classname and any options seems unusual ------------- PR: https://git.openjdk.org/jtreg/pull/136 From jjg at openjdk.org Fri Oct 28 23:38:42 2022 From: jjg at openjdk.org (Jonathan Gibbons) Date: Fri, 28 Oct 2022 23:38:42 GMT Subject: RFR: 7903373: Add ability to customize test execution using main wrapper plugin In-Reply-To: References: Message-ID: On Fri, 28 Oct 2022 23:23:26 GMT, Jonathan Gibbons wrote: >> The fix adds support of a plugin that customizes test execution. > > src/share/classes/com/sun/javatest/regtest/agent/CustomMainWrapper.java line 105: > >> 103: return vmOpts; >> 104: } >> 105: } > > Is this real code, or just toy test code? It loos like it is just test code, included from the new test, in which case it doesn't belong here in the mainline source. > src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java line 1248: > >> 1246: >> 1247: private long timeoutHandlerTimeout; >> 1248: //--------------------------------------------------------------------- > > You have not updated `load` and `save` in this class Are these methods actually being called? You seem to be stashing the custom main wrapper values early in the `testVMOpts` ------------- PR: https://git.openjdk.org/jtreg/pull/136