From mcimadamore at openjdk.java.net Fri Dec 3 13:58:47 2021 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Fri, 3 Dec 2021 13:58:47 GMT Subject: RFR: 7903071: Jtreg plugin debug functionality broken in 2021.3 Message-ID: IntelliJ 2021.3 changed the order in which certain plugin methods are called when debugging a jtreg test. More specifically, the `JtregDebuggerRunner::createContentDescriptor` method is called _after_ `JTRegConfigurationRunnableState::createJavaParameters`. Since the former sets up the debugging port which has then to be passed to the jtreg command line (in the latter), this means that, in 2021.3 we end up creating a command line that is broken because it has either no port (when we debug for the first time) or a stale port (when we debug subsequent times). I discussed this with Anna Kozlova and, while jtreg is a bit peculiar compared to other debugging plugin (as jtreg spawns other VMs, which is why we need to create a command line which includes the port number), it is possible to fix this in a way that is also compatible with older versions - by overriding `JtregDebuggerRunner::execute`, which is called before the other two methods. So we can setup the port number in there - and then reuse port number in the subsequent calls. ------------- Commit messages: - Fix debugging issues when using 2021.3 - Update README.md - Fix link syntax - Update toplevel readme Changes: https://git.openjdk.java.net/jtreg/pull/44/files Webrev: https://webrevs.openjdk.java.net/?repo=jtreg&pr=44&range=00 Issue: https://bugs.openjdk.java.net/browse/CODETOOLS-7903071 Stats: 21 lines in 5 files changed: 10 ins; 3 del; 8 mod Patch: https://git.openjdk.java.net/jtreg/pull/44.diff Fetch: git fetch https://git.openjdk.java.net/jtreg pull/44/head:pull/44 PR: https://git.openjdk.java.net/jtreg/pull/44 From mcimadamore at openjdk.java.net Fri Dec 3 16:47:51 2021 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Fri, 3 Dec 2021 16:47:51 GMT Subject: RFR: 7903071: Jtreg plugin debug functionality broken in 2021.3 [v2] In-Reply-To: References: Message-ID: > IntelliJ 2021.3 changed the order in which certain plugin methods are called when debugging a jtreg test. More specifically, the `JtregDebuggerRunner::createContentDescriptor` method is called _after_ `JTRegConfigurationRunnableState::createJavaParameters`. Since the former sets up the debugging port which has then to be passed to the jtreg command line (in the latter), this means that, in 2021.3 we end up creating a command line that is broken because it has either no port (when we debug for the first time) or a stale port (when we debug subsequent times). > > I discussed this with Anna Kozlova and, while jtreg is a bit peculiar compared to other debugging plugin (as jtreg spawns other VMs, which is why we need to create a command line which includes the port number), it is possible to fix this in a way that is also compatible with older versions - by overriding `JtregDebuggerRunner::execute`, which is called before the other two methods. So we can setup the port number in there - and then reuse port number in the subsequent calls. Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: - Revert README changes - Merge branch 'master' into debug_2021_3 - Fix debugging issues when using 2021.3 - Update README.md - Fix link syntax - Update toplevel readme ------------- Changes: https://git.openjdk.java.net/jtreg/pull/44/files Webrev: https://webrevs.openjdk.java.net/?repo=jtreg&pr=44&range=01 Stats: 17 lines in 3 files changed: 10 ins; 2 del; 5 mod Patch: https://git.openjdk.java.net/jtreg/pull/44.diff Fetch: git fetch https://git.openjdk.java.net/jtreg pull/44/head:pull/44 PR: https://git.openjdk.java.net/jtreg/pull/44 From jjg at openjdk.java.net Mon Dec 6 23:20:22 2021 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Mon, 6 Dec 2021 23:20:22 GMT Subject: RFR: 7903044: Report `os.*` system properties in .jtr file [v2] In-Reply-To: References: Message-ID: <1BmD7vonNRzIHk3F5L8DtK9Y18t57uL-TwmFqMxe0PU=.873d1636-b05a-4b23-a0d7-9f25463f96a0@github.com> On Tue, 9 Nov 2021 08:23:19 GMT, Christian Stein wrote: >> https://bugs.openjdk.java.net/browse/CODETOOLS-7903044 > > Christian Stein has updated the pull request incrementally with one additional commit since the last revision: > > Also emit test JDK's properties Marked as reviewed by jjg (Lead). ------------- PR: https://git.openjdk.java.net/jtreg/pull/35 From jjg at openjdk.java.net Mon Dec 6 23:20:22 2021 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Mon, 6 Dec 2021 23:20:22 GMT Subject: RFR: 7903044: Report `os.*` system properties in .jtr file [v2] In-Reply-To: References: Message-ID: On Tue, 9 Nov 2021 07:21:49 GMT, Christian Stein wrote: >> src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java line 141: >> >>> 139: for (String p: props) { >>> 140: testResult.putProperty(p, System.getProperty(p)); >>> 141: } >> >> Nice and simple ... but probably too simple. >> >> This will report the properties for the JVM running `jtreg`, which is OK for `user.name`, but for the `os.*` properties we probably want the values for the test JVM. You can get the properties from `params.getTestJDK().getProperties()` ... or better still, use/report the values cached in `params.getTestOS()`. >> And, if we're going as far as using `params.getTestOS()` it might be worth printing out the full `OS.toString()`. >> >> So, suggest either >> >> * `testResult.putProperty(` _name_ `, os.` _field_ `)` for the three values, or else just >> * `testProperty.putProperty("testJDK_OS", os.toString())` >> >> (or both?) > > Understood. > > Does it make sense to also keep the additional information report for the JVM running `jtreg`? In summary, this would introduce 8 new lines, like: > > > (JVM running jtreg) JDK_OS = ... > (JVM running jtreg) os.arch = ... > (JVM running jtreg) os.name = ... > (JVM running jtreg) os.version = ... > (Test JVM) JDK_OS = ... > (Test JVM) os.arch = ... > (Test JVM) os.name = ... > (Test JVM) os.version = ... > > Or are only the latter 4 interesting? It's less important/interesting to give details about the VM running jtreg itself. The primary interest is the VM running the test, because these `os.*` properties can be used to filter test execution. ------------- PR: https://git.openjdk.java.net/jtreg/pull/35 From cstein at openjdk.java.net Tue Dec 7 14:53:03 2021 From: cstein at openjdk.java.net (Christian Stein) Date: Tue, 7 Dec 2021 14:53:03 GMT Subject: RFR: 7903044: Report `os.*` system properties in .jtr file [v3] In-Reply-To: References: Message-ID: > https://bugs.openjdk.java.net/browse/CODETOOLS-7903044 Christian Stein has updated the pull request incrementally with one additional commit since the last revision: Only include property `user.name` from host JDK ------------- Changes: - all: https://git.openjdk.java.net/jtreg/pull/35/files - new: https://git.openjdk.java.net/jtreg/pull/35/files/bd5a1ba9..29bae752 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jtreg&pr=35&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jtreg&pr=35&range=01-02 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jtreg/pull/35.diff Fetch: git fetch https://git.openjdk.java.net/jtreg pull/35/head:pull/35 PR: https://git.openjdk.java.net/jtreg/pull/35 From jjg at openjdk.java.net Thu Dec 16 15:37:12 2021 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Thu, 16 Dec 2021 15:37:12 GMT Subject: RFR: 7903071: Jtreg plugin debug functionality broken in 2021.3 [v2] In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 16:47:51 GMT, Maurizio Cimadamore wrote: >> IntelliJ 2021.3 changed the order in which certain plugin methods are called when debugging a jtreg test. More specifically, the `JtregDebuggerRunner::createContentDescriptor` method is called _after_ `JTRegConfigurationRunnableState::createJavaParameters`. Since the former sets up the debugging port which has then to be passed to the jtreg command line (in the latter), this means that, in 2021.3 we end up creating a command line that is broken because it has either no port (when we debug for the first time) or a stale port (when we debug subsequent times). >> >> I discussed this with Anna Kozlova and, while jtreg is a bit peculiar compared to other debugging plugin (as jtreg spawns other VMs, which is why we need to create a command line which includes the port number), it is possible to fix this in a way that is also compatible with older versions - by overriding `JtregDebuggerRunner::execute`, which is called before the other two methods. So we can setup the port number in there - and then reuse port number in the subsequent calls. > > Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: > > - Revert README changes > - Merge branch 'master' into debug_2021_3 > - Fix debugging issues when using 2021.3 > - Update README.md > - Fix link syntax > - Update toplevel readme I'm not an expert on this code, but there may not be (m)any other experts. The code changes look reasonable. ------------- Marked as reviewed by jjg (Lead). PR: https://git.openjdk.java.net/jtreg/pull/44 From mcimadamore at openjdk.java.net Thu Dec 16 16:16:10 2021 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Thu, 16 Dec 2021 16:16:10 GMT Subject: Integrated: 7903071: Jtreg plugin debug functionality broken in 2021.3 In-Reply-To: References: Message-ID: <2RrRvzA3MTV7nqbtTlgcQHcYeIcf4KBzN4pC2Bubkx8=.05a3fb7f-577e-4146-820d-b68e705c256c@github.com> On Fri, 3 Dec 2021 13:52:00 GMT, Maurizio Cimadamore wrote: > IntelliJ 2021.3 changed the order in which certain plugin methods are called when debugging a jtreg test. More specifically, the `JtregDebuggerRunner::createContentDescriptor` method is called _after_ `JTRegConfigurationRunnableState::createJavaParameters`. Since the former sets up the debugging port which has then to be passed to the jtreg command line (in the latter), this means that, in 2021.3 we end up creating a command line that is broken because it has either no port (when we debug for the first time) or a stale port (when we debug subsequent times). > > I discussed this with Anna Kozlova and, while jtreg is a bit peculiar compared to other debugging plugin (as jtreg spawns other VMs, which is why we need to create a command line which includes the port number), it is possible to fix this in a way that is also compatible with older versions - by overriding `JtregDebuggerRunner::execute`, which is called before the other two methods. So we can setup the port number in there - and then reuse port number in the subsequent calls. This pull request has now been integrated. Changeset: aad68cf2 Author: Maurizio Cimadamore URL: https://git.openjdk.java.net/jtreg/commit/aad68cf2ff023bc0e64057571467908e9b168492 Stats: 17 lines in 3 files changed: 10 ins; 2 del; 5 mod 7903071: Jtreg plugin debug functionality broken in 2021.3 Reviewed-by: jjg ------------- PR: https://git.openjdk.java.net/jtreg/pull/44 From jjg at openjdk.java.net Sat Dec 18 00:49:55 2021 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Sat, 18 Dec 2021 00:49:55 GMT Subject: RFR: CODETOOLS-7903077: Remove @SuppressWarnings for --source 1.2 code Message-ID: Please review a trivial update to remove `@SuppressWarnings` annotations from `AppletWrapper`, which is still compiled with `--source 1.2` in the recommended build for `jtreg 6`. ------------- Commit messages: - CODETOOLS-7903077: Remove @SuppressWarnings for --source 1.2 code Changes: https://git.openjdk.java.net/jtreg/pull/46/files Webrev: https://webrevs.openjdk.java.net/?repo=jtreg&pr=46&range=00 Issue: https://bugs.openjdk.java.net/browse/CODETOOLS-7903077 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jtreg/pull/46.diff Fetch: git fetch https://git.openjdk.java.net/jtreg pull/46/head:pull/46 PR: https://git.openjdk.java.net/jtreg/pull/46 From jjg at openjdk.java.net Tue Dec 21 17:24:28 2021 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Tue, 21 Dec 2021 17:24:28 GMT Subject: Integrated: CODETOOLS-7903077: Remove @SuppressWarnings for --source 1.2 code In-Reply-To: References: Message-ID: On Sat, 18 Dec 2021 00:44:15 GMT, Jonathan Gibbons wrote: > Please review a trivial update to remove `@SuppressWarnings` annotations from `AppletWrapper`, which is still compiled with `--source 1.2` in the recommended build for `jtreg 6`. This pull request has now been integrated. Changeset: c554f28f Author: Jonathan Gibbons URL: https://git.openjdk.java.net/jtreg/commit/c554f28fedc105903c00f05777b4375443301e3e Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod 7903077: Remove @SuppressWarnings for --source 1.2 code ------------- PR: https://git.openjdk.java.net/jtreg/pull/46