Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapted to most recent changes in churn - arguments support #5129

Merged
merged 12 commits into from
Mar 15, 2024
9 changes: 4 additions & 5 deletions system/churn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,24 @@ run.sh can use OTOOL_garbageCollector and OTOOL_JDK_VERSION instead of GC argume
See https://github.com/rh-openjdk/churn/tree/master/bin for list of supported GCs. The compressed ops in upstream run can be controlled by runner or NOCOMP=-nocoops variable (for run.sh)

## Running via AQAvit

The support for compressed ops is handled by AQAvit itself. It is currently not sure if churn will be able to honor it. If not, churn will be fixed.
Similarly the java version and JAVA_HOME are handled by AQAvit.

### Executing the testsuite
The `BUILD_LIST of system/churn` contains three targets:
* _churn_1m_allGCs
The `BUILD_LIST of system/churn` contains following targets:
* _churn_5h_allGCs
* _churn_custom

There are major differences in them:
* churn_1m_allGCs - is testing ground, which runs each GC only for aprox 10 seconds, to simply see if the setup works
* churn_5h_allGCs - Is running each GC a bit over, which runs each GC for aprox hour and half. A minimum, which can find some real GC issue.
* churn_custom - this one is to support development, when run on the commandline you need to export at least DURATION and/or OTOOL_garbageCollector (+ many more optional, see [upstream readme](https://github.com/rh-openjdk/churn/blob/master/README) to select DURATION in seconds and GC(or GCs). So it allows you to test your custom GC - if churn supports that, despite what other churn options suggest (eg `default` or `ALL` thinks). When running in a Jenkins Grinder job, those are wrapped in CHURN_GCS and CHURN_DURATION

churn_1m_allGCs and churn_5h_allGCs are using pony `ALL` keyword, which is interpreted (based on hardcoded list) as all GC in tested JVM. The set time is divided among them.
churn_5h_allGCs is using pony `ALL` keyword, which is interpreted (based on hardcoded list) as all GCs in tested JVM. The set time is divided among them.
Note, that if you use `churn_custom` and enumeration, set `CHURN_GCS="ALL"` anyway, then the time will not be divided. The `CHURN_DURATION` is in seconds. If you use set, off GCs, eg `CHURN_GCS="zgc shenandoah"`, each willt ake the full CHURN_DURATION.
The `CHURN_GCS="defaultgc"`will set the tested GC to default GC as run.sh think is right. So be aware. Although it is maintained, if your custom JDK have custom GC, it is unlikely to be known. If it have different default gc, it will correctly fail.

Where the variables should work for you (and have preference), the churn_custom is accepting GCs and duration via `$(APPLICATION_OPTIONS)`. So from Grinder, you may use APPLICATION_OPTIONS field and set it as `"zgc shenandoah" 50000` and it will be used.

### Reading results
tap file and compressed junit xmlfile are generated. Use eg https://github.com/jenkinsci/report-jtreg-plugin or https://plugins.jenkins.io/tap/ to read them.

43 changes: 4 additions & 39 deletions system/churn/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,14 @@
# limitations under the License.
-->
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../TKG/resources/playlist.xsd">
<test>
<testCaseName>churn_1m_allGCs</testCaseName>
<command>
export OTOOL_JDK_VERSION="$(JDK_VERSION)" ; \
export JREJDK="jdk" ; \
export OTOOL_garbageCollector="ALL" ; \
export DURATION="60" ; \
export CHURN_TAP=false ; \
export TMPRESULTS="$(Q)$(REPORTDIR)$(D)report$(Q)"; \
cd $TMPRESULTS ; \
bash "$(TEST_ROOT)$(D)system$(D)churn$(D)churn$(D)run.sh"; \
$(TEST_STATUS)
</command>
<levels>
<level>dev</level>
</levels>
<platformRequirementsList>
<platformRequirements>os.linux</platformRequirements>
<platformRequirements>os.win</platformRequirements>
<platformRequirements>os.osx</platformRequirements>
</platformRequirementsList>
<groups>
<group>system</group>
</groups>
<vendors>
<vendor>eclipse</vendor>
<vendor>redhat</vendor>
</vendors>
</test>
<test>
<testCaseName>churn_5h_allGCs</testCaseName>
<command>
export OTOOL_JDK_VERSION="$(JDK_VERSION)" ; \
export JREJDK="jdk" ; \
export OTOOL_garbageCollector="ALL" ; \
export DURATION="18000" ; \
export CHURN_TAP=false ; \
export TMPRESULTS="$(Q)$(REPORTDIR)$(D)report$(Q)"; \
cd $TMPRESULTS ; \
bash "$(TEST_ROOT)$(D)system$(D)churn$(D)churn$(D)run.sh"; \
if [ "x${CHURN_TAP}" = "x" ] ; then export CHURN_TAP=false ; fi ; \
bash "$(TEST_ROOT)$(D)system$(D)churn$(D)churn$(D)run.sh"; \
$(TEST_STATUS)
</command>
<levels>
Expand All @@ -79,14 +47,11 @@
</disable>
</disables>
<command>
export OTOOL_JDK_VERSION="$(JDK_VERSION)" ; \
export JREJDK="jdk" ; \
export OTOOL_garbageCollector="${CHURN_GCS}" ; \
if [ "0${CHURN_DURATION}" -gt 86400 ] ; then CHURN_DURATION=86400 ; fi ; \
export DURATION="${CHURN_DURATION}" ; \
export TMPRESULTS="$(Q)$(REPORTDIR)$(D)report$(Q)"; \
cd $TMPRESULTS ; \
bash "$(TEST_ROOT)$(D)system$(D)churn$(D)churn$(D)run.sh"; \
if [ "x${CHURN_TAP}" = "x" ] ; then export CHURN_TAP=true ; fi ; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the CHURN_TAP ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A tap file that Jiri generates himself, which does not conform to the same information as the tap file that TKG generates, so I asked that it not be generated when running as part of AQAvit, as we use the TKG formated tap files for many purposes and having a non-conformant tap file on the system would be sub-optimal.

See comments in original PR starting here for background.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHURN_TAP is control variable, which inside churn runner generate tap file - if empty or true. If it is set an non true, then tap file is not generated.

The tap file from churn is extremely useful so I let it on for the custom manual run. However it disturbed the automated tuns, so it is off for default auto run.

If you insists, I will turn it off also for manual run.

The condition is here, so the user from cmdline can control the behaviour.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a comment in the code if this causes confusion

bash "$(TEST_ROOT)$(D)system$(D)churn$(D)churn$(D)run.sh" $(APPLICATION_OPTIONS); \
$(TEST_STATUS)
</command>
<levels>
Expand Down