diff --git a/system/churn/README.md b/system/churn/README.md new file mode 100644 index 0000000000..e74eb57545 --- /dev/null +++ b/system/churn/README.md @@ -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. + diff --git a/system/churn/build.xml b/system/churn/build.xml new file mode 100644 index 0000000000..bc52dfa56e --- /dev/null +++ b/system/churn/build.xml @@ -0,0 +1,64 @@ + + + + + + + + Test targeting garbage collector(s) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/system/churn/playlist.xml b/system/churn/playlist.xml new file mode 100644 index 0000000000..2265bd8232 --- /dev/null +++ b/system/churn/playlist.xml @@ -0,0 +1,104 @@ + + + + + churn_1m_allGCs + + 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) + + + dev + + + os.linux + os.win + os.osx + + + system + + + eclipse + redhat + + + + churn_5h_allGCs + + 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) + + + dev + + + os.linux + os.win + os.osx + + + system + + + eclipse + redhat + + + + churn_custom + + + Can run disabled.churn_custom in Grinder, meant for dev use not regular automated tests. + + + + 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) + + + dev + + + os.linux + os.win + os.osx + + + system + + +