-
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added churn testsuite * instead of pushd, moved to results dir pernamently * Added second set of tests - without compressed oops * Moved to system group * Adjusted description * Removed NOCOMP=-nocoops variant in favour of global setting * split churn testsuit to churn_1m_all and churn_5h_all * added proper quoting * Onem ore rename of targets to churn_5h_allGCs and churn_1m_allGCs * added custom churn testcase * Updated README to proeprly describe churn_custom and extend it as needed * churn_1m_allGCs churn_5h_allGCsare now eclipse and redhat vendor only note: generic openjdk should be supported to * churn_custom is now disabled from automated testing * Adapted readme * No longer generate tap files on automated runs * moved churn to system hopefully all s/functional/system/g done properly * Limited custom churn to 24h to not overwhel grinder
- Loading branch information
Showing
3 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# churn | ||
Test targeting garbage collector(s). | ||
The suite is able to operate with all GCs in OpenJDK. If your implementation is missing some, the calls to them will fall. If you have some additional one, an enabling wrapper must be created first. | ||
|
||
## Running churn locally | ||
clone https://github.com/rh-openjdk/churn read https://github.com/rh-openjdk/churn/blob/master/README and run run.sh | ||
|
||
### Setting up the environment: | ||
Java required. Maven recommended, churn can be compiled via direct javac if needed | ||
Java is used from JAVA_HOME or guessed from PATH. | ||
run.sh can use OTOOL_garbageCollector and OTOOL_JDK_VERSION instead of GC argument. See https://github.com/rh-openjdk/churn/blob/master/README for details. | ||
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 | ||
* _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. | ||
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. | ||
|
||
### 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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--> | ||
|
||
<project name="churn" default="build" basedir="."> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
Test targeting garbage collector(s) | ||
</description> | ||
|
||
<!-- set properties for this build --> | ||
<property name="TEST" value="churn" /> | ||
<property name="DEST" value="${BUILD_ROOT}/system/churn" /> | ||
<property name="src" location="./churn" /> | ||
|
||
<target name="THC.check"> | ||
<condition property="THCdir.exists"> | ||
<available file="churn" type="dir"/> | ||
</condition> | ||
</target> | ||
|
||
<if> | ||
<contains string="${SPEC}" substring="zos"/> | ||
<then> | ||
<property name="GIT_REPO" value="[email protected]:" /> | ||
</then> | ||
<else> | ||
<property name="GIT_REPO" value="https://github.com/" /> | ||
</else> | ||
</if> | ||
|
||
<target name="getChurn" depends="THC.check" unless="THCdir.exists"> | ||
<exec executable="git" failonerror="true"> | ||
<arg value="clone" /> | ||
<arg value="${GIT_REPO}rh-openjdk/churn.git" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="init"> | ||
<mkdir dir="${DEST}"/> | ||
</target> | ||
|
||
<target name="dist" depends="getChurn" description="generate the distribution"> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}" includes="*.xml, *.mk"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="build"> | ||
<antcall target="dist" inheritall="true" /> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<!-- | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# 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"; \ | ||
$(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_custom</testCaseName> | ||
<disables> | ||
<disable> | ||
<comment>Can run disabled.churn_custom in Grinder, meant for dev use not regular automated tests.</comment> | ||
</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"; \ | ||
$(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> | ||
</test> | ||
</playlist> |