diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index dde2bf5a..efa10286 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -42,11 +42,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4 + uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -57,7 +57,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4 + uses: github/codeql-action/autobuild@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -71,4 +71,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4 + uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6 diff --git a/.github/workflows/runAqa.yml b/.github/workflows/runAqa.yml index 0a18329c..d13a545f 100644 --- a/.github/workflows/runAqa.yml +++ b/.github/workflows/runAqa.yml @@ -19,7 +19,7 @@ jobs: id: workflow_run_info # Checkout current (TKG) repo to access the repo-specific config file `.github/workflows/runAqaConfig.json` and the shared script `scripts/testRepo/runAqaArgParse.py` - name: Checkout current repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: path: 'main' - name: Parse parameters @@ -107,7 +107,7 @@ jobs: sourceType: 'buildType' impl: ${{ matrix.jdk_impl }} - name: Checkout PR Ref - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 if: matrix.sdk_resource == 'build-jdk' with: repository: ${{ matrix.build_repo_branch.repo }} @@ -168,7 +168,7 @@ jobs: openjdk_testRepo: ${{ matrix.openjdk_testrepo }} openj9_repo: ${{ matrix.openj9_repo }} tkg_Repo: '${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }}:${{ fromJSON(steps.get-pr.outputs.result).head.ref }}' - - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 if: failure() with: name: test_output diff --git a/.github/workflows/testTKG.yml b/.github/workflows/testTKG.yml index 3e8f506b..233fc348 100644 --- a/.github/workflows/testTKG.yml +++ b/.github/workflows/testTKG.yml @@ -2,17 +2,25 @@ name: "Run TKG Tests" on: issue_comment: types: [created] +permissions: + contents: write + issues: write + pull-requests: write jobs: testTKG: + permissions: + contents: write + issues: write + pull-requests: write runs-on: ubuntu-latest if: startsWith(github.event.comment.body, 'run tkg-test') steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 with: ref: refs/pull/${{ github.event.issue.number }}/head - name: Set up JDK - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 with: distribution: 'temurin' java-version: 11 diff --git a/compile.mk b/compile.mk index 03fcc20a..fd84d520 100644 --- a/compile.mk +++ b/compile.mk @@ -38,7 +38,7 @@ TEST_FLAG_PARAM := -DTEST_FLAG=$(TEST_FLAG) else TEST_FLAG_PARAM := endif -COMPILE_CMD=ant -f scripts$(D)build_test.xml -DTEST_ROOT=$(TEST_ROOT) -DBUILD_ROOT=$(BUILD_ROOT) -DJDK_VERSION=$(JDK_VERSION) -DJDK_IMPL=$(JDK_IMPL) -DJCL_VERSION=$(JCL_VERSION) -DBUILD_LIST=${COMPILE_BUILD_LIST} -DRESOURCES_DIR=${RESOURCES_DIR} -DSPEC=${SPEC} -DTEST_JDK_HOME=${TEST_JDK_HOME} -DJVM_VERSION=$(JVM_VERSION) -DLIB_DIR=$(LIB_DIR) ${TEST_FLAG_PARAM} +COMPILE_CMD=ant -f scripts$(D)build_test.xml -DTEST_ROOT=$(TEST_ROOT) -DBUILD_ROOT=$(BUILD_ROOT) -DJDK_VERSION=$(JDK_VERSION) -DJDK_IMPL=$(JDK_IMPL) -DJDK_VENDOR=$(JDK_VENDOR) -DJCL_VERSION=$(JCL_VERSION) -DBUILD_LIST=${COMPILE_BUILD_LIST} -DRESOURCES_DIR=${RESOURCES_DIR} -DSPEC=${SPEC} -DTEST_JDK_HOME=${TEST_JDK_HOME} -DJVM_VERSION=$(JVM_VERSION) -DLIB_DIR=$(LIB_DIR) ${TEST_FLAG_PARAM} compile: diff --git a/examples/base/playlist.xml b/examples/base/playlist.xml index da66a764..4f78dfc2 100644 --- a/examples/base/playlist.xml +++ b/examples/base/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + testSuccess echo "success"; \ diff --git a/examples/feature/playlist.xml b/examples/feature/playlist.xml index aa5c72c8..a1853f12 100644 --- a/examples/feature/playlist.xml +++ b/examples/feature/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + testFeatureFips echo "match FIPS140_3_20220501 and everything else by default"; \ diff --git a/examples/hierarchy/a1/b1/playlist.xml b/examples/hierarchy/a1/b1/playlist.xml index c6c4ec56..edc4270e 100644 --- a/examples/hierarchy/a1/b1/playlist.xml +++ b/examples/hierarchy/a1/b1/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_a1_b1 echo "success"; \ diff --git a/examples/hierarchy/a2/b2/c2/playlist.xml b/examples/hierarchy/a2/b2/c2/playlist.xml index 72498859..139930bf 100644 --- a/examples/hierarchy/a2/b2/c2/playlist.xml +++ b/examples/hierarchy/a2/b2/c2/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_a2_b2_c2 echo "success"; \ diff --git a/examples/hierarchy/a2/b2/playlist.xml b/examples/hierarchy/a2/b2/playlist.xml index c26b141c..121d4089 100644 --- a/examples/hierarchy/a2/b2/playlist.xml +++ b/examples/hierarchy/a2/b2/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_a2_b2 echo "success"; \ diff --git a/examples/hierarchy/a2/d2/playlist.xml b/examples/hierarchy/a2/d2/playlist.xml index 366614bc..5e00d80b 100644 --- a/examples/hierarchy/a2/d2/playlist.xml +++ b/examples/hierarchy/a2/d2/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_a2_d2 echo "success"; \ diff --git a/examples/hierarchy/a2/playlist.xml b/examples/hierarchy/a2/playlist.xml index f1581ec4..94fcbb7e 100644 --- a/examples/hierarchy/a2/playlist.xml +++ b/examples/hierarchy/a2/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_a2 echo "success"; \ diff --git a/examples/hierarchy/a3/b3/playlist.xml b/examples/hierarchy/a3/b3/playlist.xml index 5803f4bb..0e11f93b 100644 --- a/examples/hierarchy/a3/b3/playlist.xml +++ b/examples/hierarchy/a3/b3/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_a3_b3 echo "success"; \ diff --git a/examples/hierarchy/a3/c3/d3/playlist.xml b/examples/hierarchy/a3/c3/d3/playlist.xml index a364099c..9063fb1b 100644 --- a/examples/hierarchy/a3/c3/d3/playlist.xml +++ b/examples/hierarchy/a3/c3/d3/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_a3_b3_c3_d3 echo "success"; \ diff --git a/examples/hierarchy/a3/f3/playlist.xml b/examples/hierarchy/a3/f3/playlist.xml index d443f416..54b26324 100644 --- a/examples/hierarchy/a3/f3/playlist.xml +++ b/examples/hierarchy/a3/f3/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_a3_f3 echo "success"; \ diff --git a/examples/jdkVersion/playlist.xml b/examples/jdkVersion/playlist.xml index daf775cd..1bf5dfed 100644 --- a/examples/jdkVersion/playlist.xml +++ b/examples/jdkVersion/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_ver_11 echo "test for version 11"; \ diff --git a/examples/platformRequirements/playlist.xml b/examples/platformRequirements/playlist.xml index 514369e1..d1cc043c 100644 --- a/examples/platformRequirements/playlist.xml +++ b/examples/platformRequirements/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + test_arch_x86 echo "test arch.x86"; \ @@ -107,5 +107,82 @@ $(TEST_STATUS) ^os.linux.ubuntu.20+ + + test_not_arch_390 + echo "test on none arch.390"; \ + $(TEST_STATUS) + ^arch.390 + + + + test_arch_x86_skylake + echo "test arch.x86.skylake"; \ + $(TEST_STATUS) + + arch.x86.skylake + + + + + test_arch_390_z15plus + echo "test arch.390.z15+"; \ + $(TEST_STATUS) + + arch.390.z15+ + + + + + test_arch_390_z15 + echo "test arch.390.z15"; \ + $(TEST_STATUS) + + arch.390.z15 + + + + test_arch_390_z14plus + echo "test arch.390.z14+"; \ + $(TEST_STATUS) + + arch.390.z14+ + + + + + test_not_arch_390_z15plus + echo "test not arch.390.z15+"; \ + $(TEST_STATUS) + + ^arch.390.z15+ + + + + + test_arch_390_z14 + echo "test arch.390.z14"; \ + $(TEST_STATUS) + + arch.390.z14 + + + + + test_arch_390_z13plus + echo "test arch.390.z13+"; \ + $(TEST_STATUS) + + arch.390.z13+ + + + + + test_arch_390_z13 + echo "test arch.390.z13"; \ + $(TEST_STATUS) + + arch.390.z13 + + - + \ No newline at end of file diff --git a/examples/rerun/playlist.xml b/examples/rerun/playlist.xml index d3ce6eef..83ec89b7 100644 --- a/examples/rerun/playlist.xml +++ b/examples/rerun/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + testRerun echo "test rerun"; \ diff --git a/examples/rerun/rerunSub/playlist.xml b/examples/rerun/rerunSub/playlist.xml index 67fbeebe..763b0a0f 100644 --- a/examples/rerun/rerunSub/playlist.xml +++ b/examples/rerun/rerunSub/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + testRerunSubDir echo "test rerun in sub dir"; \ diff --git a/examples/sliceAndDice/level/playlist.xml b/examples/sliceAndDice/level/playlist.xml index af4eb302..2851f87f 100644 --- a/examples/sliceAndDice/level/playlist.xml +++ b/examples/sliceAndDice/level/playlist.xml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --> - + testDefault echo "default is extended"; \ diff --git a/makeGen.mk b/makeGen.mk index 4db53d59..89ece3ea 100644 --- a/makeGen.mk +++ b/makeGen.mk @@ -42,7 +42,7 @@ autoconfig: perl scripts$(D)configure.pl autogen: autoconfig - ${TEST_JDK_HOME}/bin/java -cp $(Q)$(TKG_JAR)$(P)$(JSON_SIMPLE)$(Q) org.testKitGen.MainRunner --mode=$(MODE) --spec=$(SPEC) --microArch=$(MICROARCH) --osLabel=$(Q)$(OS_LABEL)$(Q) --jdkVersion=$(JDK_VERSION) --impl=$(JDK_IMPL) --vendor=$(Q)$(JDK_VENDOR)$(Q) --buildList=${BUILD_LIST} --iterations=$(TKG_ITERATIONS) --aotIterations=$(AOT_ITERATIONS) --testFlag=$(TEST_FLAG) --testTarget=$(TESTTARGET) --testList=$(TESTLIST) --numOfMachines=$(NUM_MACHINES) --testTime=$(TEST_TIME) --TRSSURL=$(TRSS_URL) $(OPTS) + ${TEST_JDK_HOME}/bin/java -cp $(Q)$(TKG_JAR)$(P)$(JSON_SIMPLE)$(Q) org.testKitGen.MainRunner --mode=$(MODE) --spec=$(SPEC) --microArch=$(Q)$(MICROARCH)$(Q) --osLabel=$(Q)$(OS_LABEL)$(Q) --jdkVersion=$(JDK_VERSION) --impl=$(JDK_IMPL) --vendor=$(Q)$(JDK_VENDOR)$(Q) --buildList=${BUILD_LIST} --iterations=$(TKG_ITERATIONS) --aotIterations=$(AOT_ITERATIONS) --testFlag=$(TEST_FLAG) --testTarget=$(TESTTARGET) --testList=$(TESTLIST) --numOfMachines=$(NUM_MACHINES) --testTime=$(TEST_TIME) --TRSSURL=$(TRSS_URL) $(OPTS) AUTOGEN_FILES = $(wildcard $(CURRENT_DIR)$(D)jvmTest.mk) AUTOGEN_FILES += $(wildcard $(CURRENT_DIR)$(D)machineConfigure.mk) diff --git a/makefile b/makefile index 5253646b..789f3107 100644 --- a/makefile +++ b/makefile @@ -25,9 +25,6 @@ export JAVA_HOME := $(TEST_JDK_HOME) $(info JAVA_HOME is set to $(JAVA_HOME)) endif - - - D = / MKTREE = mkdir -p SUBDIRS = .. @@ -40,11 +37,21 @@ ifndef LIB_DIR endif UNAME := uname -UNAME_OS := $(shell $(UNAME) -s | $(CUT) -f1 -d_) +UNAME_OS := $(shell $(UNAME) -s | cut -f1 -d_) +$(info UNAME_OS is $(UNAME_OS)) ifeq ($(findstring CYGWIN,$(UNAME_OS)), CYGWIN) LIB_DIR:=$(shell cygpath -w $(LIB_DIR)) +else ifeq ($(UNAME_OS),OS/390) +# The issue is still being investigated. See backlog/issues/1424 +# set -Dfile.encoding=IBM-1047 for JDK21+ zOS for now +ifeq ($(shell test $(JDK_VERSION) -ge 21; echo $$?),0) +export IBM_JAVA_OPTIONS="-Dfile.encoding=IBM-1047" +$(info export IBM_JAVA_OPTIONS="-Dfile.encoding=IBM-1047") endif +endif + export LIB_DIR:=$(subst \,/,$(LIB_DIR)) +$(info LIB_DIR is set to $(LIB_DIR)) _TESTTARGET = $(firstword $(MAKECMDGOALS)) TESTTARGET = $(patsubst _%,%,$(_TESTTARGET)) diff --git a/resources/ottawa.csv b/resources/ottawa.csv index db24a2df..9aa28ae5 100644 --- a/resources/ottawa.csv +++ b/resources/ottawa.csv @@ -59,11 +59,11 @@ variation:Mode150-CS,no,no,no,no,no,no,no,yes,no,no,no,no,no,no,yes,no,no,no,no, variation:Mode152,no,no,yes,yes,no,no,yes,yes,no,no,yes,yes,no,yes,yes,no,no,yes,yes,yes,yes,no,no,yes,yes,no,no,no,yes,yes,yes,yes,no,no,yes,yes,no,yes,yes,yes,no,yes,yes,no,no,no,yes,yes,yes,yes variation:Mode153,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode154,no,no,yes,yes,no,no,yes,yes,no,no,yes,yes,no,yes,yes,no,no,no,no,no,no,no,no,yes,yes,no,no,no,yes,yes,yes,yes,no,no,yes,yes,no,yes,yes,yes,no,yes,yes,no,no,no,yes,yes,yes,yes -variation:Mode155,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,no,no,no,no,no,yes,yes +variation:Mode155,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode156,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode157,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes -variation:Mode158,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,yes,yes,no,no,no,no,no,yes,yes -variation:Mode159,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,yes,no,no,yes,yes +variation:Mode158,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes +variation:Mode159,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,no,no,yes,yes variation:Mode159-CS,no,no,no,no,no,no,no,yes,no,no,no,no,no,no,yes,no,no,no,no,yes,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,no,no,yes,yes variation:Mode166,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode167,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes @@ -88,8 +88,8 @@ variation:Mode192,no,no,yes,yes,no,no,yes,yes,no,no,yes,yes,no,yes,yes,no,no,yes variation:Mode193,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode194,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,yes,yes,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode195,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,yes,no,no,no,yes,yes,yes,yes -variation:Mode198,no,no,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,no,no,no,no,no,yes,yes -variation:Mode199,no,no,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes,no,no,no,no,no,yes,yes +variation:Mode198,no,no,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes +variation:Mode199,no,no,yes,yes,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode200,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode201,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes variation:Mode202,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,yes,yes diff --git a/scripts/getDependencies.pl b/scripts/getDependencies.pl index fc250099..3edaa248 100644 --- a/scripts/getDependencies.pl +++ b/scripts/getDependencies.pl @@ -74,6 +74,21 @@ fname => 'asm.jar', sha1 => 'a0f58cad836a410f6ba133aaa209aea7e54aaf8a' }, + byte_buddy => { + url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.14.12/byte-buddy-1.14.12.jar', + fname => 'byte-buddy.jar', + sha1 => '6e37f743dc15a8d7a4feb3eb0025cbc612d5b9e1' + }, + byte_buddy_agent => { + url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.12/byte-buddy-agent-1.14.12.jar', + fname => 'byte-buddy-agent.jar', + sha1 => 'be4984cb6fd1ef1d11f218a648889dfda44b8a15' + }, + objenesis => { + url => 'https://repo1.maven.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.jar', + fname => 'objenesis.jar', + sha1 => '1049c09f1de4331e8193e579448d0916d75b7631' + }, commons_cli => { url => 'https://repo1.maven.org/maven2/commons-cli/commons-cli/1.2/commons-cli-1.2.jar', fname => 'commons-cli.jar', @@ -94,6 +109,11 @@ fname => 'junit4.jar', sha1 => 'e4f1766ce7404a08f45d859fb9c226fc9e41a861' }, + mockito_core => { + url => 'https://repo1.maven.org/maven2/org/mockito/mockito-core/5.11.0/mockito-core-5.11.0.jar', + fname => 'mockito-core.jar', + sha1 => 'e4069fa4f4ff2c94322cfec5f2e45341c6c70aff' + }, testng => { url => 'https://repo1.maven.org/maven2/org/testng/testng/6.14.2/testng-6.14.2.jar', fname => 'testng.jar', @@ -140,13 +160,6 @@ shafn => 'jtreg_5_1_b01.tar.gz.sha256sum.txt', shaalg => '256' }, - jtreg_6_1 => { - url => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg-6+1.tar.gz', - fname => 'jtreg_6_1.tar.gz', - shaurl => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg-6+1.tar.gz.sha256sum.txt', - shafn => 'jtreg_6_1.tar.gz.sha256sum.txt', - shaalg => '256' - }, jtreg_7_3_1_1 => { url => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg-7.3.1+1.tar.gz', fname => 'jtreg_7_3_1_1.tar.gz', @@ -160,9 +173,49 @@ sha1 => '15592c29538abd36d15570eda9fa055ed1a618ba' }, jcstress => { - url => 'https://builds.shipilev.net/jcstress/jcstress-tests-all-20220908.jar', - fname => 'jcstress-tests-all-20220908.jar', - sha1 => '8cf348be49b8af939a3ce03216e3df53aa0f9ef2' + url => 'https://builds.shipilev.net/jcstress/jcstress-tests-all-20240222.jar', + fname => 'jcstress-tests-all-20240222.jar', + sha1 => '200da75e67689e8a604ec6fe9a6f55b2c000b6ce' + }, + hamcrest_core => { + url => 'https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar', + fname => 'hamcrest-core.jar', + sha1 => '42a25dc3219429f0e5d060061f71acb49bf010a0' + }, + bcprov_jdk18on => { + url => 'https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk18on/1.78.1/bcprov-jdk18on-1.78.1.jar', + fname => 'bcprov-jdk18on.jar', + sha1 => '39e9e45359e20998eb79c1828751f94a818d25f8' + }, + junit_vintage_engine => { + url => 'https://repo1.maven.org/maven2/org/junit/vintage/junit-vintage-engine/5.10.2/junit-vintage-engine-5.10.2.jar', + fname => 'junit-vintage-engine.jar', + sha1 => '2905387f99f86a6618d1f7c005e7a5946224f317' + }, + junit_platform_suite => { + url => 'https://repo1.maven.org/maven2/org/junit/platform/junit-platform-suite/1.10.1/junit-platform-suite-1.10.1.jar', + fname => 'junit-platform-suite.jar', + sha1 => 'a219dbd79ec2b1fc61b806554fcf4eb5c17a6d1d' + }, + junit_jupiter_api => { + url => 'https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-api/5.10.2/junit-jupiter-api-5.10.2.jar', + fname => 'junit-jupiter-api.jar', + sha1 => 'fb55d6e2bce173f35fd28422e7975539621055ef' + }, + junit_jupiter_engine => { + url => 'https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-engine/5.10.2/junit-jupiter-engine-5.10.2.jar', + fname => 'junit-jupiter-engine.jar', + sha1 => 'f1f8fe97bd58e85569205f071274d459c2c4f8cd' + }, + junit_jupiter_params => { + url => 'https://repo1.maven.org/maven2/org/junit/jupiter/junit-jupiter-params/5.10.2/junit-jupiter-params-5.10.2.jar', + fname => 'junit-jupiter-params.jar', + sha1 => '359132c82a9d3fa87a325db6edd33b5fdc67a3d8' + }, + junit_platform_suite_api => { + url => 'https://repo1.maven.org/maven2/org/junit/platform/junit-platform-suite-api/1.10.2/junit-platform-suite-api-1.10.2.jar', + fname => 'junit-platform-suite-api.jar', + sha1 => '174bba1574c37352b0eb2c06e02b6403738ad57c' }); my @dependencies = split(',', $dependencyList); diff --git a/scripts/getDependencies.xml b/scripts/getDependencies.xml index 6b6c65b2..c5146362 100644 --- a/scripts/getDependencies.xml +++ b/scripts/getDependencies.xml @@ -29,22 +29,8 @@ - - - - - - - - - - - - - - - + diff --git a/scripts/resultsSum.pl b/scripts/resultsSum.pl old mode 100644 new mode 100755 index b98bdbe1..92bd95cf --- a/scripts/resultsSum.pl +++ b/scripts/resultsSum.pl @@ -106,12 +106,15 @@ sub resultReporter { my $numOfDisabled = 0; my $numOfTotal = 0; my $runningDisabled = 0; + my @passed; my @failed; my @disabled; my @capSkipped; my $tapString = ''; my $fhIn; + my @testCasesResults; + my $testCasesAllTargetsSummary; print "\n\n"; @@ -130,7 +133,8 @@ sub resultReporter { } my $startTime = 0; my $endTime = 0; - while ( $result = <$fhIn> ) { + my $testCasesPerTargetSummary = ''; + while ( $result = <$fhIn> ) { # remove extra carriage return $result =~ s/\r//g; $output .= ' ' . $result; @@ -144,25 +148,56 @@ sub resultReporter { $endTime = $1; $tapString .= " duration_ms: " . ($endTime - $startTime) . "\n ...\n"; last; + } elsif ($result =~ /(Test results: .*)(passed|skipped|failed|error)(: .*\d{1,}$)/) { + $testCasesPerTargetSummary = $result; + chomp($testCasesPerTargetSummary); + push (@testCasesResults, $result); } elsif ($result eq ($testName . "_PASSED\n")) { - push (@passed, $testName . " " . $successRate); $numOfPassed++; $numOfTotal++; - $tapString .= "ok " . $numOfTotal . " - " . $testName . "\n"; + my $summarySuffix = ''; + $tapString .= "ok " . $numOfTotal . " - " . $testName . "\n"; $tapString .= " ---\n"; + if ( $testCasesPerTargetSummary ) { + $summarySuffix = " - " . $testCasesPerTargetSummary . " "; + $tapString .= " output:\n |\n"; + $tapString .= " " . $testCasesPerTargetSummary . "\n"; + } + + push (@passed, $testName . $summarySuffix . $successRate); if ($diagnostic eq 'all') { $tapString .= $output; } } elsif ($result eq ($testName . "_FAILED\n")) { - push (@failed, $testName . " " . $successRate); $numOfFailed++; $numOfTotal++; - $tapString .= "not ok " . $numOfTotal . " - " . $testName . "\n"; + $tapString .= "not ok " . $numOfTotal . " - " . $testName . "\n"; $tapString .= " ---\n"; - if (($diagnostic eq 'failure') || ($diagnostic eq 'all')) { + # sometime jck test output shows after _FAILED message and before the $testName\E Finish Time + my $isJckFailedTestFinish = 0; + my $jckFailedDuration = ''; + if ($buildList =~ /jck/) { + while ( my $extraFailedOutput = <$fhIn> ) { + $extraFailedOutput =~ s/\r//g; + $output .= ' ' . $extraFailedOutput; + if ($extraFailedOutput =~ /^\Q$testName\E Finish Time: .* Epoch Time \(ms\): (.*)\n/) { + if ($successRate ne "") { + $successRate =~ s/\((.*)\)/$1/; + $jckFailedDuration .= ' ' . $successRate . "\n"; + } + $endTime = $1; + $jckFailedDuration .= " duration_ms: " . ($endTime - $startTime) . "\n ...\n"; + $isJckFailedTestFinish = 1; + last; + } + } + } + my $failureTests = ""; + if ($diagnostic ne 'failure' || ($buildList !~ /openjdk/ && $buildList !~ /jck/)) { + $tapString .= $output; + } else { #rerun jdk or jck* custom target only work for diagnostic=failure + my @lines = split('\\n', $output); if ($buildList =~ /openjdk/) { - my @lines = split('\\n', $output); - my $failureTests = ""; for my $i (0 .. $#lines) { if ( $lines[$i] =~ /[-]{50}/) { if ( ($lines[$i+1] =~ /(TEST: )(.*?)(\.java|\.sh|#.*)$/) || ($lines[$i+1] =~ /(Test results: .*)(failed|error)(: \d{1,}$)/) ) { @@ -171,21 +206,51 @@ sub resultReporter { } } } - if ( $failureTests eq "" ) { - # Output of dump or other non-test failures - $tapString .= $output; - } else { - $tapString .= " output:\n |\n"; - $tapString .= " Failed test cases: \n" . $failureTests; + } elsif ($buildList =~ /jck/) { + my $testResult = ""; + for my $i (0 .. $#lines) { + $lines[$i] =~ s/^\s+|\s+$//g; + if ( $lines[$i] =~ /(.*?)(\.html|#.*)(.*?)(Failed|Error\.)(.*?)/) { + my @testsInfo = split(/\s+/, $lines[$i]); + my $testName = $testsInfo[0]; + $testName =~ s/#.*//; + $failureTests .= ' ' ."TEST: " . $testName . "\n"; + } elsif ( $lines[$i] =~ /(Test results: .*)(skipped|failed|error)(: \d{1,}$)/) { + $testResult = $lines[$i]; + } } - } else { + $failureTests .= ' ' .$testResult . "\n"; + + } + if ( $failureTests eq "" ) { + # Output of dump or other non-test failures $tapString .= $output; + } else { + $tapString .= " output:\n |\n"; + $tapString .= " Failed test cases: \n" . $failureTests; + $tapString .= $jckFailedDuration ; } } + if ($spec =~ /zos/) { my $dmpDir = dirname($resultFile).'/'.$testName; moveTDUMPS($output, $dmpDir, $spec); } + + my $summarySuffix = ''; + if ( $testCasesPerTargetSummary ) { + $summarySuffix = " - " . $testCasesPerTargetSummary . " "; + $testCasesPerTargetSummary .= "\n"; + $failureTests =~ s/$testCasesPerTargetSummary//; + $failureTests =~ s/ /\t\t\t/; + chomp($failureTests); + $summarySuffix .= "\n\t\t" . "Failed test cases: \n" . "$failureTests"; + } + + push (@failed, $testName . $summarySuffix . $successRate); + if ( $isJckFailedTestFinish ) { + last; + } } elsif ($result eq ($testName . "_DISABLED\n")) { $result =~ s/_DISABLED\n$//; push (@disabled, $result); @@ -213,7 +278,6 @@ sub resultReporter { } } } - close $fhIn; } @@ -247,16 +311,24 @@ sub resultReporter { $numOfExecuted = $numOfTotal - $numOfSkipped - $numOfDisabled; - my $testStatus = "TOTAL: $numOfTotal EXECUTED: $numOfExecuted PASSED: $numOfPassed FAILED: $numOfFailed"; + my $testTargetStatus = "TOTAL: $numOfTotal EXECUTED: $numOfExecuted PASSED: $numOfPassed FAILED: $numOfFailed"; # Hide numOfDisabled when running disabled tests list. if ($runningDisabled == 0) { - $testStatus .= " DISABLED: $numOfDisabled"; + $testTargetStatus .= " DISABLED: $numOfDisabled"; } - $testStatus .= " SKIPPED: $numOfSkipped"; + $testTargetStatus .= " SKIPPED: $numOfSkipped"; if ($comment ne "") { - $testStatus = "($testStatus)"; + $testTargetStatus = "($testTargetStatus)"; } - print "$testStatus\n"; + print "$testTargetStatus\n"; + + print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n"; + if (@testCasesResults && ($buildList =~ /openjdk/ || $buildList =~ /jck/)) { + $testCasesAllTargetsSummary = getTestcaseResults(\@testCasesResults); + print $testCasesAllTargetsSummary . "\n"; + print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"; + } + if ($numOfTotal > 0) { # set tap file name if not given if ($tapName eq '') { @@ -301,8 +373,11 @@ sub resultReporter { print $fhOut "# CUSTOM_TARGET: " . "${customTarget}" . "\n"; } - print $fhOut "# RESULTS_SUMMARY: TOTAL: $numOfTotal EXECUTED: $numOfExecuted PASSED: $numOfPassed FAILED: $numOfFailed DISABLED: $numOfDisabled SKIPPED: $numOfSkipped\n"; - + print $fhOut "# TEST TARGETS RESULTS SUMMARY: $testTargetStatus\n"; + if ( $testCasesAllTargetsSummary ) { + print $fhOut "# $testCasesAllTargetsSummary " . "\n"; + } + print $fhOut "1.." . $numOfTotal . "\n"; print $fhOut $tapString; close $fhOut; @@ -310,9 +385,7 @@ sub resultReporter { print "ALL TESTS PASSED\n"; } } - - print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"; - + if ($numOfFailed != 0) { my $buildParam = ""; if ($buildList ne '') { @@ -351,11 +424,39 @@ sub resultReporter { print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"; } } - unlink($resultFile); + unlink($resultFile); return ($numOfTotal, \@failed); } +sub getTestcaseResults() { + my $testCaseResults = ''; + my @resultsArray = @{$_[0]}; + my %testCasesSummary = ( 'passed: ' => 0, 'failed: ' => 0, 'error: ' => 0, 'skipped: ' => 0 ); + + for my $result (@resultsArray) { + $result =~ s/Test results: //; + my @statusNumbers = split(";", $result); + for my $statusNumber (@statusNumbers) { + $statusNumber =~ s/,//; + for (keys %testCasesSummary ) { + if ( $statusNumber =~ /\Q$_\E/) { + $statusNumber =~ s/\Q$_\E//; + $testCasesSummary{$_} += $statusNumber; + last; + } + } + } + } + + for (keys %testCasesSummary ) { + while ($testCasesSummary{$_} =~ s/^(\d+)(\d{3})/$1,$2/) {} + } + + $testCaseResults = "TESTCASES RESULTS SUMMARY: passed: " . $testCasesSummary{'passed: '} . "; failed: " . $testCasesSummary{'failed: '} . "; error: " . $testCasesSummary{'error: '} . "; skipped: " . $testCasesSummary{'skipped: '}; + return $testCaseResults; +} + sub getTargetsFromResults() { my $results = $_[0]; my @targets = (); diff --git a/scripts/testTKG/test_platformRequirements.py b/scripts/testTKG/test_platformRequirements.py index 62e0bc65..a41d4c5b 100644 --- a/scripts/testTKG/test_platformRequirements.py +++ b/scripts/testTKG/test_platformRequirements.py @@ -16,105 +16,164 @@ from utils import * def run_test(): - rt = True - printTestheader("platformRequirements") - - buildList = "TKG/examples/platformRequirements" - command = "make _all" - print(f"\t{command}") - result = subprocess.run(f"{EXPORT_BUILDLIST}={buildList}; {CD_TKG}; {MAKE_CLEAN}; {MAKE_COMPILE}; {command}", stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True, check=False) - - stdout = result.stdout.decode() - specStr = re.search(r"set SPEC to (.*)", stdout) - - if specStr is not None: - spec = specStr.group(1) - else: - printError("Could not parse spec from output.") - return False - - passed = set() - skipped = set() - - if 'linux' in spec: - skipped.add('test_not_linux_arch_x86_0') - else: - if 'x86' in spec: - passed.add('test_not_linux_arch_x86_0') - else: - skipped.add('test_not_linux_arch_x86_0') - - if 'x86' in spec: - passed.add('test_arch_x86_0') - skipped.add('test_arch_nonx86_0') - else: - passed.add('test_arch_nonx86_0') - skipped.add('test_arch_x86_0') - - if '64' in spec: - passed.add('test_bits_64_0') - else: - skipped.add('test_bits_64_0') - - if 'osx' in spec: - passed.add('test_os_osx_0') - else: - skipped.add('test_os_osx_0') - - if 'osx_x86-64' in spec: - passed.add('test_osx_x86-64_0') - else: - skipped.add('test_osx_x86-64_0') - - if 'x86' in spec or '390' in spec: - passed.add('test_arch_x86_390_0') - else: - skipped.add('test_arch_x86_390_0') - - if 'osx_x86-64' in spec or ('win_x86' in spec and 'win_x86-64' not in spec) or 'aix_ppc-64' in spec: - passed.add('test_osx_x86-64_win_x86_aix_ppc-64_0') - else: - skipped.add('test_osx_x86-64_win_x86_aix_ppc-64_0') - - os_label = re.search(r"set OS_LABEL to (.*)", stdout) - if os_label is not None: - os_label = os_label.group(1) - label_str = os_label.split(".") - # os_label example: ubuntu.22 - try: - ver = int(label_str[1],10) - if label_str[0] == "ubuntu": - if ver >= 22: - passed.add('test_os_linux_ubuntu22_0') - if ver >= 20: - passed.add('test_os_linux_ubuntu20plus_0') - passed.add('test_os_linux_ubuntu20plus_rhel8plus_0') - if ver < 20: - passed.add('test_not_os_linux_ubuntu20plus_0') - - if label_str[0] == "rhel": - if ver >= 8: - passed.add('test_os_linux_ubuntu20plus_rhel8plus_0') - except ValueError as ve: - print ("warning: os version value failed to convert to an integer") - passed.add('test_not_os_linux_ubuntu20plus_0') - else: - passed.add('test_not_os_linux_ubuntu20plus_0') - - if 'test_os_linux_ubuntu20plus_0' not in passed: - skipped.add('test_os_linux_ubuntu20plus_0') - - if 'test_os_linux_ubuntu22_0' not in passed: - skipped.add('test_os_linux_ubuntu22_0') - - if 'test_os_linux_ubuntu20plus_rhel8plus_0' not in passed: - skipped.add('test_os_linux_ubuntu20plus_rhel8plus_0') - - if 'test_not_os_linux_ubuntu20plus_0' not in passed: - skipped.add('test_not_os_linux_ubuntu20plus_0') - - rt &= checkResult(result, passed, set(), set(), skipped) - return rt + rt = True + printTestheader("platformRequirements") + + buildList = "TKG/examples/platformRequirements" + command = "make _all" + print(f"\t{command}") + result = subprocess.run(f"{EXPORT_BUILDLIST}={buildList}; {CD_TKG}; {MAKE_CLEAN}; {MAKE_COMPILE}; {command}", stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True, check=False) + + stdout = result.stdout.decode() + specStr = re.search(r"set SPEC to (.*)", stdout) + + if specStr is not None: + spec = specStr.group(1) + else: + printError("Could not parse spec from output.") + return False + + passed = set() + skipped = set() + + if 'linux' in spec: + skipped.add('test_not_linux_arch_x86_0') + else: + if 'x86' in spec: + passed.add('test_not_linux_arch_x86_0') + else: + skipped.add('test_not_linux_arch_x86_0') + + if 'x86' in spec: + passed.add('test_arch_x86_0') + skipped.add('test_arch_nonx86_0') + else: + passed.add('test_arch_nonx86_0') + skipped.add('test_arch_x86_0') + + if '64' in spec: + passed.add('test_bits_64_0') + else: + skipped.add('test_bits_64_0') + + if 'osx' in spec: + passed.add('test_os_osx_0') + else: + skipped.add('test_os_osx_0') + + if 'osx_x86-64' in spec: + passed.add('test_osx_x86-64_0') + else: + skipped.add('test_osx_x86-64_0') + + if 'x86' in spec or '390' in spec: + passed.add('test_arch_x86_390_0') + else: + skipped.add('test_arch_x86_390_0') + + if 'osx_x86-64' in spec or ('win_x86' in spec and 'win_x86-64' not in spec) or 'aix_ppc-64' in spec: + passed.add('test_osx_x86-64_win_x86_aix_ppc-64_0') + else: + skipped.add('test_osx_x86-64_win_x86_aix_ppc-64_0') + + os_label = re.search(r"set OS_LABEL to (.*)", stdout) + print("os_label in : {}".format(os_label)) + if os_label is not None: + os_label = os_label.group(1) + label_str = os_label.split(".") + # os_label example: ubuntu.22 + try: + ver = int(label_str[1],10) + if label_str[0] == "ubuntu": + if ver >= 22: + passed.add('test_os_linux_ubuntu22_0') + if ver >= 20: + passed.add('test_os_linux_ubuntu20plus_0') + passed.add('test_os_linux_ubuntu20plus_rhel8plus_0') + if ver < 20: + passed.add('test_not_os_linux_ubuntu20plus_0') + + if label_str[0] == "rhel": + if ver >= 8: + passed.add('test_os_linux_ubuntu20plus_rhel8plus_0') + except ValueError as ve: + print ("warning: os version value failed to convert to an integer") + passed.add('test_not_os_linux_ubuntu20plus_0') + else: + passed.add('test_not_os_linux_ubuntu20plus_0') + + if 'test_os_linux_ubuntu20plus_0' not in passed: + skipped.add('test_os_linux_ubuntu20plus_0') + + if 'test_os_linux_ubuntu22_0' not in passed: + skipped.add('test_os_linux_ubuntu22_0') + + if 'test_os_linux_ubuntu20plus_rhel8plus_0' not in passed: + skipped.add('test_os_linux_ubuntu20plus_rhel8plus_0') + + if 'test_not_os_linux_ubuntu20plus_0' not in passed: + skipped.add('test_not_os_linux_ubuntu20plus_0') + + micro_arch = re.search(r"set MICROARCH to (.*)", stdout) + # micro_arch = "set MICROARCH to z14" + print("micro_arch in platform req: {}".format(micro_arch)) + pattern = r"set MICROARCH to (.*)" + # micro_arch = re.search(pattern, micro_arch) + if micro_arch is not None: + print(micro_arch) + micro_arch = micro_arch.group(1) + label_str = micro_arch + print("Label_str:",label_str) + # micro_arch example: skylake + try: + ver = int(''.join(filter(str.isdigit, micro_arch.split()[-1]))) + print("ver:",ver) + if label_str == "skylake": + passed.add('test_arch_x86_skylake_0') + if ver == 13: + passed.add('test_arch_390_z13_0') + elif ver > 13: + passed.add('test_arch_390_z13plus_0') + if ver == 14: + passed.add('test_arch_390_z14_0') + elif ver > 14: + passed.add('test_arch_390_z14plus_0') + if ver == 15: + passed.add('test_arch_390_z15_0') + elif ver > 15: + passed.add('test_arch_390_z15plus_0') + else: + skipped.add('test_not_arch_390_0') + except ValueError as ve: + print("warning: microarch version value failed to convert to an integer") + skipped.add('test_not_arch_390_0') + else: + passed.add('test_not_arch_390_0') + + if 'test_arch_390_z15_0' not in passed: + skipped.add('test_arch_390_z15_0') + + if 'test_arch_390_z14_0' not in passed: + skipped.add('test_arch_390_z14_0') + + if 'test_arch_390_z13_0' not in passed: + skipped.add('test_arch_390_z13_0') + + if 'test_arch_390_z15plus_0' not in passed: + skipped.add('test_arch_390_z15plus_0') + + if 'test_arch_390_z14plus_0' not in passed: + skipped.add('test_arch_390_z14plus_0') + + if 'test_arch_390_z13plus_0' not in passed: + skipped.add('test_arch_390_z13plus_0') + + if 'test_arch_x86_skylake_0' not in passed: + skipped.add('test_arch_x86_skylake_0') + + + rt &= checkResult(result, passed, set(), set(), skipped) + return rt if __name__ == "__main__": - run_test() \ No newline at end of file + run_test() \ No newline at end of file diff --git a/src/org/openj9/envInfo/JavaInfo.java b/src/org/openj9/envInfo/JavaInfo.java index 510289bf..fdc02f01 100644 --- a/src/org/openj9/envInfo/JavaInfo.java +++ b/src/org/openj9/envInfo/JavaInfo.java @@ -192,6 +192,10 @@ public String getJDKVendor() { return "microsoft"; } else if (vendorLC.contains("loongson")) { return "loongson"; + } else if (vendorLC.contains("fujitsu")) { + return "fujitsu"; + } else if (vendorLC.contains("temurin")) { + return "temurin"; } else { System.out.println("Warning: cannot determine vendor, use System.getProperty('java.vendor')=" + vendor + " directly.\n"); return vendor; @@ -226,9 +230,12 @@ public String getJavaVersion() { } public void checkCRIU() { - String isCRIUCapable = System.getProperty("org.eclipse.openj9.criu.isCRIUCapable"); - if ((isCRIUCapable != null) && isCRIUCapable.equals("true")) { + if ("true".equalsIgnoreCase(System.getProperty("org.eclipse.openj9.criu.isCRIUCapable"))) { detectedTfs.add("CRIU"); + // CRIU support is required by CRaC + if ("true".equalsIgnoreCase(System.getProperty("org.eclipse.openj9.criu.isCRaCCapable"))) { + detectedTfs.add("CRAC"); + } } } diff --git a/src/org/openj9/envInfo/MachineInfo.java b/src/org/openj9/envInfo/MachineInfo.java index 94151154..4ee164e6 100644 --- a/src/org/openj9/envInfo/MachineInfo.java +++ b/src/org/openj9/envInfo/MachineInfo.java @@ -38,7 +38,8 @@ public class MachineInfo { public static final String[] LINUX_OS_NAME_CMD = new String[] {"bash", "-c", "grep '^NAME' /etc/os-release | awk -F'=' ' gsub(/\"/,\"\") { print $2}'"}; public static final String[] LINUX_OS_VERSION_CMD = new String[] {"bash", "-c", "grep '^VERSION_ID' /etc/os-release | awk -F'=' ' gsub(/\"/,\"\") { print $2}'"}; - public static final String[] MICRO_ARCH_CMD = new String[] {"bash", "-c", "cat /proc/cpuinfo | grep 'model name' | uniq"}; + public static final String[] MICRO_ARCH_CMD = new String[] {"bash", "-c", "cat /proc/cpuinfo | grep -E 'machine|model name' | uniq"}; + public static final String[] ULIMIT_CMD = new String[] {"bash", "-c", "ulimit -a"}; public static final String[] INSTALLED_MEM_CMD = new String[] {"bash", "-c", "grep MemTotal /proc/meminfo | awk '{print $2}"}; @@ -116,8 +117,8 @@ public String toString() { } private String parseInfo(String output) { - if (output == null) return ""; - Pattern pattern = Pattern.compile("[0-9]+[.][0-9]+([.][0-9]+)?"); + if (output == null) return ""; + Pattern pattern = Pattern.compile("[0-9]+[.][0-9]+([.][0-9]+)?"); Matcher matcher = pattern.matcher(output); if (matcher.find()) { return matcher.group(0); @@ -201,15 +202,36 @@ private void getSysInfo() { putInfo(new Info("sysArch", SYS_ARCH_CMD, ce.execute(SYS_ARCH_CMD), null)); putInfo(new Info("procArch", PROC_ARCH_CMD, ce.execute(PROC_ARCH_CMD), null)); String microArchOutput = ce.execute(MICRO_ARCH_CMD); + String microArch = ""; + // Check for specific machine versions and set the microArch accordingly if (microArchOutput.toLowerCase().contains("skylake")) { - String microArch = "skylake"; + microArch = "skylake"; + } else if (microArchOutput.contains("8562")) { + microArch = "z15"; + } else if (microArchOutput.contains("8561")) { + microArch = "z15"; + } else if (microArchOutput.contains("3907")) { + microArch = "z14"; + } else if (microArchOutput.contains("3906")) { + microArch = "z14"; + } else if (microArchOutput.contains("2965")) { + microArch = "z13"; + } else if (microArchOutput.contains("2964")) { + microArch= "z13"; + } + else { + System.out.println("Unfamiliar microArch detected in TKG. It will not be added in TKG microArch!"); + System.out.println("microArchOutput: " + microArchOutput); + } + + if (!microArch.isEmpty()) { putInfo(new Info("microArch", MICRO_ARCH_CMD, microArch, null)); } putInfo(new Info("sysOS", SYS_OS_CMD, ce.execute(SYS_OS_CMD), null)); putInfo(new Info("ulimit", ULIMIT_CMD, ce.execute(ULIMIT_CMD), null)); putInfo(new Info("docker", CHECK_DOCKER_CMD, ce.execute(CHECK_DOCKER_CMD), null)); } - + private void getOsLabel() { if (System.getProperty("os.name").toLowerCase().contains("linux")) { String osName = ce.execute(LINUX_OS_NAME_CMD).toLowerCase(); @@ -231,7 +253,7 @@ private void getOsLabel() { putInfo(new Info("osInfo", LINUX_OS_CMD, ce.execute(LINUX_OS_CMD), null)); } } - + private void getPrerequisiteInfo() { putInfo(new Info("antVersion", ANT_VERSION_CMD, ce.execute(ANT_VERSION_CMD), "1.9.6")); /* required version is 4.1, but some exception applies, do not verify for now*/ @@ -252,7 +274,7 @@ private void getRuntimeInfo() { putInfo(new Info("vmVendor", new String[] {"ManagementFactory.getRuntimeMXBean().getSpecVendor()"}, ManagementFactory.getRuntimeMXBean().getSpecVendor(), null)); putInfo(new Info("vmVersion", new String[] {"ManagementFactory.getRuntimeMXBean().getVmVersion()"}, ManagementFactory.getRuntimeMXBean().getVmVersion(), null)); } - + private void getPhysicalMemoryInfo() { OperatingSystemMXBean osBean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean(); putInfo(new Info("Total Physical Memory Size", new String[] {"osBean.getTotalPhysicalMemorySize()"}, String.valueOf(osBean.getTotalPhysicalMemorySize()), null)); diff --git a/src/org/testKitGen/TestInfoParser.java b/src/org/testKitGen/TestInfoParser.java index df0b7c67..93eb652d 100644 --- a/src/org/testKitGen/TestInfoParser.java +++ b/src/org/testKitGen/TestInfoParser.java @@ -15,6 +15,7 @@ package org.testKitGen; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -412,7 +413,6 @@ private boolean checkPlatformReq(List platformRequirementsList) { } String spec = arg.getSpec(); String fullSpec = spec; - // Special case 32/31-bit specs which do not have 32 or 31 in the name (i.e. // aix_ppc) if (!spec.contains("-64")) { @@ -442,14 +442,13 @@ private boolean matchPlat(String fullSpec, String pr) { if (!fullSpec.contains(prSplitOnDot[1])) { return false; } - if (prSplitOnDot[0].equals("arch") && (prSplitOnDot.length == 3)) { - String microArch = prSplitOnDot[2]; - if (!microArch.equals(arg.getMicroArch())) { - return false; - } + String requiredMicroArch = prSplitOnDot[2]; + String actualMicroArch = arg.getMicroArch(); + return compareVersion(requiredMicroArch, actualMicroArch); } else if (prSplitOnDot[0].equals("os") && (prSplitOnDot.length == 4)) { String osName = prSplitOnDot[2]; + String osVersion = prSplitOnDot[3]; if (arg.getOsLabel().isEmpty()) { return false; } @@ -457,31 +456,42 @@ private boolean matchPlat(String fullSpec, String pr) { if (!osLabelArg[0].equals(osName)) { return false; } - String osVersion = prSplitOnDot[3]; - if (osVersion.endsWith("+")) { - int verInt = 0; - try { - verInt = Integer.parseInt(osVersion.substring(0, osVersion.length() - 1)); - } catch (NumberFormatException e) { - System.out.println("Error: unrecognized platformRequirement: " + prSplitOnDot + ". Only support integer OS version."); - System.exit(1); - } - int argVerInt = 0; + return compareVersion(osVersion, osLabelArg[1]); + } + return true; + } + + private boolean compareVersion(String requiredLabel, String actualLabel) { + if (requiredLabel.isEmpty() || actualLabel.isEmpty()) { + return false; + } else if (requiredLabel.equals(actualLabel)) { + return true; + } else if (requiredLabel.endsWith("+")) { + Pattern pattern = Pattern.compile("(\\D+)?(\\d+)"); + Matcher requiredLabelMatcher = pattern.matcher(requiredLabel); + Matcher actualLabelMatcher = pattern.matcher(actualLabel); + + if (requiredLabelMatcher.find() && actualLabelMatcher.find()) { + String requiredPrefix = requiredLabelMatcher.group(1) != null ? requiredLabelMatcher.group(1) : ""; + String actualPrefix = actualLabelMatcher.group(1) != null ? actualLabelMatcher.group(1) : ""; + if (requiredPrefix.equals(actualPrefix)) { + int requiredLabelNum = 0; + int actualLabelNum = 0; try { - argVerInt = Integer.parseInt(osLabelArg[1]); + requiredLabelNum = Integer.parseInt(requiredLabelMatcher.group(2)); + actualLabelNum = Integer.parseInt(actualLabelMatcher.group(2)); } catch (NumberFormatException e) { - System.out.println("Error: unrecognized osLabel: " + arg.getOsLabel() + ". Only support integer OS version."); - System.exit(1); - } - if (verInt > argVerInt) { - return false; + System.out.println("Error: unrecognized requiredLabel:" + requiredLabel + " or actualLabel:" + actualLabel); + System.err.println(e.getMessage()); + System.exit(1); } - } else { - if (!osLabelArg[1].equals(osVersion)) { - return false; + if (actualLabelNum >= requiredLabelNum) { + return true; } } + } } - return true; - } + return false; + } + }