RFR: 7903774: make all tests combinations printing nicer and/or configurable [v10]
Jiří Vaněk
jvanek at openjdk.org
Mon Jun 23 08:45:52 UTC 2025
> 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
-------------
Changes: https://git.openjdk.org/jcstress/pull/153/files
Webrev: https://webrevs.openjdk.org/?repo=jcstress&pr=153&range=09
Stats: 430 lines in 6 files changed: 382 ins; 22 del; 26 mod
Patch: https://git.openjdk.org/jcstress/pull/153.diff
Fetch: git fetch https://git.openjdk.org/jcstress.git pull/153/head:pull/153
PR: https://git.openjdk.org/jcstress/pull/153
More information about the jcstress-dev
mailing list