From jvanek at openjdk.org Fri Jul 4 16:11:51 2025 From: jvanek at openjdk.org (=?UTF-8?B?SmnFmcOt?= =?UTF-8?B?IA==?= =?UTF-8?B?VmFuxJtr?=) Date: Fri, 4 Jul 2025 16:11:51 GMT Subject: RFR: 7903671: jcstress: Update buffer tests for JDK-8318966 [v2] In-Reply-To: <7jEnxypEu_yR5K5z69iH3bAZ9DGBxUxXXNhFfe_c6BQ=.8ed3d526-579b-449a-9216-de5827e81072@github.com> References: <7jEnxypEu_yR5K5z69iH3bAZ9DGBxUxXXNhFfe_c6BQ=.8ed3d526-579b-449a-9216-de5827e81072@github.com> Message-ID: On Fri, 6 Jun 2025 15:00:43 GMT, Aleksey Shipilev wrote: > Finally have time to look at this. > > No, we are not going to hard-code test names in generic harness code. The common way to "skip" the test that are incompatible with some JDKs is to record them as "soft errors", which make them skipped. This is what [CODETOOLS-7903695](https://bugs.openjdk.org/browse/CODETOOLS-7903695) did, and it is supposed to be enough. > Ok. you are right. They are just api-mishmash, so soft errors, so ignored. Not sure when I run it last so it was so intrusive it led me to create and elaborate on CODETOOLS-7903671. That sounds like this PR is indeed no go. I'm tempted to add the `alignment(1)` variants so jdk24+ do not suffer the lack of coverage. What is your advice here? ------------- PR Comment: https://git.openjdk.org/jcstress/pull/159#issuecomment-3036788607 From sitnikov.vladimir at gmail.com Sun Jul 13 11:42:34 2025 From: sitnikov.vladimir at gmail.com (Vladimir Sitnikov) Date: Sun, 13 Jul 2025 14:42:34 +0300 Subject: Proposal: JUnit 5 Test Engine Integration for JCStress Message-ID: Hi everyone, What do you think about introducing a JUnit 5 test engine implementation for JCStress? Currently, integrating JCStress tests into a Gradle-based project isn't very intuitive. JCStress tests don?t resemble regular tests, and IDEs don?t offer UI support for running individual test classes. That can make the development workflow less smooth than it could be. The JUnit 5 platform was designed to decouple test discovery and execution from the test API, allowing different kinds of tests to run under a unified infrastructure. A custom JCStress engine for the JUnit platform would enable more seamless integration with Gradle?s test tasks, and IDEs would treat JCStress tests more like regular ones ? including class-level run buttons and test output integration. Additionally, applying the @Testable annotation on top of @JCStressTest could allow IDEs to recognize and expose UI affordances for running individual JCStress tests, making experimentation and debugging easier. I?m not suggesting adding a direct JUnit 5 dependency to JCStress core itself ? that might introduce unnecessary coupling. But maybe a separate module (e.g., jcstress-junit-engine) could provide the bridge. Would that be something the community is open to? Some related references: * JUnit 5 custom test engines: https://docs.junit.org/current/user-guide/#test-engines-custom * Known third-party engines: https://github.com/junit-team/junit-framework/wiki/Third-party-Extensions#junit-platform-test-engines * @Testable annotation: https://github.com/junit-team/junit-framework/blob/d2d9987282c39e047a6d1137613eaf2750b1aad7/junit-platform-commons/src/main/java/org/junit/platform/commons/annotation/Testable.java Looking forward to hearing your thoughts. Best regards, Vladimir -------------- next part -------------- An HTML attachment was scrubbed... URL: From duke at openjdk.org Wed Jul 16 14:43:07 2025 From: duke at openjdk.org (duke) Date: Wed, 16 Jul 2025 14:43:07 GMT Subject: Withdrawn: 7903774: make all tests combinations printing nicer and/or configurable In-Reply-To: <3wZeI91CX_iFefOZJdSxdmZFSyzjd8-w1PJXYufNxrM=.77abf5c8-c5ca-45b9-9b8b-e5c0a7e9b478@github.com> References: <3wZeI91CX_iFefOZJdSxdmZFSyzjd8-w1PJXYufNxrM=.77abf5c8-c5ca-45b9-9b8b-e5c0a7e9b478@github.com> Message-ID: <2pRhHtvUi1lRrIssJ-PoZWgrt2WelISYf08iOgwVkno=.7f5d13b9-62ab-4e84-b1c0-9a6d97b8c2bd@github.com> On Thu, 14 Nov 2024 16:45:30 GMT, Ji?? Van?k wrote: > This is still WIP, but already on row what [CODETOOLS-7903774](https://bugs.openjdk.org/browse/CODETOOLS-7903774) suggested. > > It will be finished once all desired output combinations are included, but already now is doing the usage of listing much more comfortable and code readable. > > From: > > `TESTS` - as introduced by https://github.com/openjdk/jcstress/pull/149 > `COMBINATIONS` - as introduced in https://github.com/openjdk/jcstress/pull/149 verbose mode (thus surpassing the `-v` impact > `ALL_TESTS` - all tests as it was before https://github.com/openjdk/jcstress/pull/149 > `COMBINATIONS_GROUPED ` - as suggested in https://github.com/openjdk/jcstress/pull/149#discussion_r1668678910 > `COMBINATIONS_JSON` same as combinations, but a valid json > `COMBINATIONS_GROUPS` same as COMBINATIONS_GROUPED only instead of enumeration in each group, only count of members will be printed > > > * TESTS are already implemented as ALL_MATCHING > * COMBINATIONS as ALL_MATCHING_COMBINATIONS > * ALL_TESTS as ALL > > COMBINATIONS_GROUPED, and COMBINATIONS_GROUPS are under development. > The _JSON variants are tobe decided, but ability to JQL it sounds nice. > > Suggestion to better names welcomed. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jcstress/pull/153 From jvanek at openjdk.org Wed Jul 16 14:47:56 2025 From: jvanek at openjdk.org (=?UTF-8?B?SmnFmcOt?= =?UTF-8?B?IA==?= =?UTF-8?B?VmFuxJtr?=) Date: Wed, 16 Jul 2025 14:47:56 GMT Subject: RFR: 7903754: jcstress: Implement fail-on-error run option [v7] In-Reply-To: References: Message-ID: <19ZnOHoniLHShMj0znG3Ekl-ILl5R6t46LzQ3IHRxGs=.a1228b9b-0899-49a2-bd7d-af539ff8d359@github.com> On Mon, 23 Jun 2025 08:21:56 GMT, Ji?? Van?k wrote: >> Initial PoC >> >> It currently show how to set up argument, and how the framework will be terminated. Feedback welcomed. Should be finished soon > > Ji?? Van?k has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: > > - Removed counting of groups. > > It do not fill its purpose in real life > - Simplified to simpe -foe > > Both existing swithces with parameter changed to simngle -foe swithc, > whcih do not have any parameter, and if used , jcstress ends as soon as > possible after first error. > > Dropped the %% relative metric. Was good, but was never deployed afaik. > Simplifed test counting, now only tests are counted (no longer group) > Kept possibility to forbid exiting in the middle of group via property > > Kept posibility to set limit both for absolute and relative treshold, > so user can still wait for more errors to appear before it is canceled. > - replaced incorrect System.out by output > - Experimental counting of softErrors through property > - Fix in logic > - Repalced list.size by counting collector > - Implemented main terminating logic > - Moved the dying message to correct place > - Refactored ConsoleReport and Failfast to share test counting logic > - typo > - ... and 1 more: https://git.openjdk.org/jcstress/compare/1d143cbd...389dd675 faith restored ------------- PR Comment: https://git.openjdk.org/jcstress/pull/157#issuecomment-3078941349 From jvanek at openjdk.org Wed Jul 16 14:48:57 2025 From: jvanek at openjdk.org (=?UTF-8?B?SmnFmcOt?= =?UTF-8?B?IA==?= =?UTF-8?B?VmFuxJtr?=) Date: Wed, 16 Jul 2025 14:48:57 GMT Subject: RFR: 7903819: jcstress do not print structuralised results [v2] In-Reply-To: <6FMz9T4k7cDvZyBPXZrnTG1YCh758jJXoxGAJpGYIro=.657b12f6-3cad-4920-a7c7-2723c3e2203e@github.com> References: <6FMz9T4k7cDvZyBPXZrnTG1YCh758jJXoxGAJpGYIro=.657b12f6-3cad-4920-a7c7-2723c3e2203e@github.com> Message-ID: On Mon, 23 Jun 2025 08:50:02 GMT, Ji?? Van?k wrote: >> Jcstress are generating very good html report, which is however not exactly great for automated comapriosns over various systyems and architectures. This pr is adding junit-like, configurable report. > > Ji?? Van?k has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 25 additional commits since the last revision: > > - Dropped the dom-based generation > > Without stream the serilializer was unnecessarily big > - Started migration to proepr DOM > - Revert "FIXME Added fast fake results generator REMOVE IT" > > This reverts commit 0d758a79012dcb11f2a98b74a326b58809a97599. > The junit result looks good. Now testing on real data > - Fixed few noted comments/variables > - made default output xsd valid again > > and keeping option to enable the widely used, but not standart parts for > higher readability > - changed comments proeprty to comment out non-standart elements > > soem of the wide spread features like nested testsuites and properties > are nmot part of xsd... those will be commented out b default, and moved > to fail/err if possible > - Unifide testcase print > - Support for time attribute and removed some dnagling code > - now prints correct summary > > stil not perfect... > mia: interesting? time? > and move to dom.... > - Not printing the seed argument > - ... and 15 more: https://git.openjdk.org/jcstress/compare/a3504375...870f1605 faith restored ------------- PR Comment: https://git.openjdk.org/jcstress/pull/158#issuecomment-3078951296 From jvanek at openjdk.org Wed Jul 16 14:49:01 2025 From: jvanek at openjdk.org (=?UTF-8?B?SmnFmcOt?= =?UTF-8?B?IA==?= =?UTF-8?B?VmFuxJtr?=) Date: Wed, 16 Jul 2025 14:49:01 GMT Subject: RFR: 7903671: jcstress: Update buffer tests for JDK-8318966 [v2] In-Reply-To: References: Message-ID: <5zSDC6Ikfa5XWJow1mobmhCz4UqMrhUQAgEV4CMZKOQ=.cd4e1356-8f68-4f5d-93a8-c5e446092dbd@github.com> On Mon, 23 Jun 2025 09:10:54 GMT, Ji?? Van?k wrote: >> part 1: Detecting jdk of target VM and exuding illegible tests >> >> This is prequel to full fixing of CODETOOLS-7903671. This PR detects target JDK version and then disables illegible tests. >> part 2 will be done in templates of affected tests and logic around generating the classes from them. In meantime this should server. >> >> The jdk detection will be most likely used anyway. WDYT? If we agree on similar approach, I will create a new bug for this PR only. > > Ji?? Van?k has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Excluding jdk23+ illegible tests on jdk23+ > - Added detection on target JDK version faith restored ------------- PR Comment: https://git.openjdk.org/jcstress/pull/159#issuecomment-3078950653 From jvanek at openjdk.org Wed Jul 16 14:49:02 2025 From: jvanek at openjdk.org (=?UTF-8?B?SmnFmcOt?= =?UTF-8?B?IA==?= =?UTF-8?B?VmFuxJtr?=) Date: Wed, 16 Jul 2025 14:49:02 GMT Subject: RFR: 7903774: make all tests combinations printing nicer and/or configurable [v10] In-Reply-To: References: <3wZeI91CX_iFefOZJdSxdmZFSyzjd8-w1PJXYufNxrM=.77abf5c8-c5ca-45b9-9b8b-e5c0a7e9b478@github.com> Message-ID: On Mon, 23 Jun 2025 08:45:52 GMT, Ji?? Van?k wrote: >> This is still WIP, but already on row what [CODETOOLS-7903774](https://bugs.openjdk.org/browse/CODETOOLS-7903774) suggested. >> >> It will be finished once all desired output combinations are included, but already now is doing the usage of listing much more comfortable and code readable. >> >> From: >> >> `TESTS` - as introduced by https://github.com/openjdk/jcstress/pull/149 >> `COMBINATIONS` - as introduced in https://github.com/openjdk/jcstress/pull/149 verbose mode (thus surpassing the `-v` impact >> `ALL_TESTS` - all tests as it was before https://github.com/openjdk/jcstress/pull/149 >> `COMBINATIONS_GROUPED ` - as suggested in https://github.com/openjdk/jcstress/pull/149#discussion_r1668678910 >> `COMBINATIONS_JSON` same as combinations, but a valid json >> `COMBINATIONS_GROUPS` same as COMBINATIONS_GROUPED only instead of enumeration in each group, only count of members will be printed >> >> >> * TESTS are already implemented as ALL_MATCHING >> * COMBINATIONS as ALL_MATCHING_COMBINATIONS >> * ALL_TESTS as ALL >> >> COMBINATIONS_GROUPED, and COMBINATIONS_GROUPS are under development. >> The _JSON variants are tobe decided, but ability to JQL it sounds nice. >> >> Suggestion to better names welcomed. > > Ji?? Van?k has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: > > - Implemented proper json listings > > - id can be used both flatten (so equal to plaintext) or properly > strcutured for JQ (default) > - listing can be redirecd to stderr to use with `jq` directly > - ALL now corectly return all tests > - Added property to control json variants fragemnts > > if true, the key will be written as: > "[actor1, actor2], spinLoopStyle: Thread.onSpinWait(), threads: 2, forkId: 0, maxFootprintMB: 64, compileMode: 7, shClass: (PG 0, CG 0), (PG 0, CG 0), strideSize: 256, strideCount: 40, cpuMap: null, [-XX:+UseBiasedLocking, -XX:+StressLCM, -XX:+StressGCM, -XX:+StressIGVN, -XX:+StressCCP, -XX:StressSeed=yyyyyyyy]" > > otherwise (default), it will be written as > > ... > "actorNames": ["actor1", "actor2"], > "spinLoopStyle": "Thread.onSpinWait()", > "threads": 2, > "forkId": 0, > "maxFootprintMB": 64, > "compileMode": 7, > "shClass": "(PG 0, CG 0), (PG 0, CG 0)", > "strideSize": 256, > "strideCount": 40, > "cpuMap": "null", > "jvmArgs": [-XX:+UseBiasedLocking, -XX:+StressLCM, -XX:+StressGCM, -XX:+StressIGVN, -XX:+StressCCP, -XX:StressSeed=yyyyyyyy]" > ... > - Implemented naive json formatting > > To cut away the header one can use: | sed '0,/^All.*[0-9]\+$/d' > - Implemented totaling of listing only > - Fixed spacing in help > - Removed redundnant hyphen > - implemented MATCHING_(INVERTED)GROUPS(_COUNT) > - Refactored lsiting so it takes proper argument > > instead of misusing verbose switch > and thus returned the ability to print allavailable tetest > - refactored listTests() to its own class faith restored ------------- PR Comment: https://git.openjdk.org/jcstress/pull/153#issuecomment-3078944002 From jvanek at openjdk.org Wed Jul 16 14:48:58 2025 From: jvanek at openjdk.org (=?UTF-8?B?SmnFmcOt?= =?UTF-8?B?IA==?= =?UTF-8?B?VmFuxJtr?=) Date: Wed, 16 Jul 2025 14:48:58 GMT Subject: RFR: 7903750: TimeBudget (-tb) does not fulfill its promisses [v8] In-Reply-To: References: Message-ID: <3I2i7ieICjoIDzsewvI89tZJ9yG3PWtP26u4LGFHmLE=.9f6e758a-6079-47ae-82ac-c50cc1af8394@github.com> On Mon, 23 Jun 2025 08:22:32 GMT, Ji?? Van?k wrote: >> Added warning, when time budget is to small, and final run will run at least two times longer. > > Ji?? Van?k has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision: > > - Removed duplicated construcion of timebudget > - directly return new instance without intermediate variable > > Co-authored-by: Galder Zamarre?o > - Removed table like formatting for time budget warnning > - Removed unnecesasary NPE check in getTimeBudget > > The NPE workaround was causing NPE to be only delayed for later > - Removed unnecessary shortening of MS before next conversion > > - ms -= TimeUnit.HOURS.toMillis(hours); > - ms -= TimeUnit.MINUTES.toMillis(minutes); > - Used WARNING: and FATAL: instead of +++ WARNING - and +++ FATAL - > - renamed getNiceMsTimeDate to formatMsToDaysAndTime > - Replaced System.out by preset out > - added warning if timebudget is to small > - print time budfget also for listing > > Required two small refactorings to get nice code reused > - ... and 1 more: https://git.openjdk.org/jcstress/compare/9a26bce5...cbedff70 faith restored ------------- PR Comment: https://git.openjdk.org/jcstress/pull/161#issuecomment-3078947775 From jvanek at openjdk.org Wed Jul 16 14:49:56 2025 From: jvanek at openjdk.org (=?UTF-8?B?SmnFmcOt?= =?UTF-8?B?IA==?= =?UTF-8?B?VmFuxJtr?=) Date: Wed, 16 Jul 2025 14:49:56 GMT Subject: RFR: 7903889: jcstress: document used properites (and env variables) [v6] In-Reply-To: References: <_id_iOGQYGai8cFr-oaXer0R8UivNlj7-ZavmtRzetU=.1c07c8af-058d-4a9e-b83b-3a23bfb68776@github.com> Message-ID: On Mon, 23 Jun 2025 08:49:27 GMT, Ji?? Van?k wrote: >> The purpose of this PR is to move properties and properties based initializations to single place, and to document them, and to enable printing the listing with the documentation via help. >> >> No Env. vars were found. >> >> The verbose help can be removed, the individual properties with defaults are wrapped to its class. The OptionSpec and OptionFormatter can be used if needed > > Ji?? Van?k has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision: > > - Moved declaration of individual proeprties to ceparate classes by family > - Extracted properties encapsualted in objects > - Removed autoformatted whitespaces > - 7903889: jcstress: document used properites (and env variables) > > Known properties unifed in one class and printed in verbose help: > The verbose help can be removed, the individual properties with defaults > can be wrapped to its class. Even the OptionSpec and OptionFormatter can > be used if needed faith restored ------------- PR Comment: https://git.openjdk.org/jcstress/pull/156#issuecomment-3078952773