diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 16d81dba..1bf2df31 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6 + uses: github/codeql-action/init@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7 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@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6 + uses: github/codeql-action/autobuild@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7 # ℹī¸ 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@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6 + uses: github/codeql-action/analyze@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7 diff --git a/.github/workflows/runAqa.yml b/.github/workflows/runAqa.yml index d22763ff..3ad14a79 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: path: 'main' - name: Parse parameters @@ -107,7 +107,7 @@ jobs: sourceType: 'buildType' impl: ${{ matrix.jdk_impl }} - name: Checkout PR Ref - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 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@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 if: failure() with: name: test_output diff --git a/.github/workflows/testTKG.yml b/.github/workflows/testTKG.yml index d6f6142f..1f43316b 100644 --- a/.github/workflows/testTKG.yml +++ b/.github/workflows/testTKG.yml @@ -15,12 +15,12 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.event.comment.body, 'run tkg-test') steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: refs/pull/${{ github.event.issue.number }}/head - name: Set up JDK - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2 + uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 with: distribution: 'temurin' java-version: 11 diff --git a/scripts/getDependencies.pl b/scripts/getDependencies.pl index 85528a2b..ecc2a730 100644 --- a/scripts/getDependencies.pl +++ b/scripts/getDependencies.pl @@ -75,14 +75,14 @@ sha1 => 'a0f58cad836a410f6ba133aaa209aea7e54aaf8a' }, byte_buddy => { - url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.14.12/byte-buddy-1.14.12.jar', + url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.15.4/byte-buddy-1.15.4.jar', fname => 'byte-buddy.jar', - sha1 => '6e37f743dc15a8d7a4feb3eb0025cbc612d5b9e1' + sha1 => 'e8bd42992701720649765383ff570f415190b83f' }, byte_buddy_agent => { - url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.12/byte-buddy-agent-1.14.12.jar', + url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.15.4/byte-buddy-agent-1.15.4.jar', fname => 'byte-buddy-agent.jar', - sha1 => 'be4984cb6fd1ef1d11f218a648889dfda44b8a15' + sha1 => '58e850dde88f3cf20f41f659440bef33f6c4fe02' }, objenesis => { url => 'https://repo1.maven.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.jar', @@ -125,9 +125,9 @@ sha1 => 'bfcb96281ea3b59d626704f74bc6d625ff51cbce' }, asmtools => { - url => 'https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/asmtools/asmtools-core-7.0.b10-ea.jar', + url => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/asmtools/asmtools-core-7.0.b10-ea.jar', fname => 'asmtools.jar', - shaurl => 'https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/asmtools/asmtools-core-7.0.b10-ea.jar.sha256sum.txt', + shaurl => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/asmtools/asmtools-core-7.0.b10-ea.jar.sha256sum.txt', shafn => 'asmtools.jar.sha256sum.txt', shaalg => '256' }, @@ -167,6 +167,13 @@ shafn => 'jtreg_7_3_1_1.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_4_1 => { url => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg-7.4+1.tar.gz', fname => 'jtreg_7_4_1.tar.gz', @@ -306,10 +313,10 @@ $url_custom .= "systemtest_prereqs/"; $url_custom .= $jars_info[$i]{dir}; $url_custom .= '/' unless $url_custom =~ /\/$/; - $url_custom .= $jars_info[$i]{fname}; - $url = "$url_custom"; } + $url = "$url_custom/$jars_info[$i]{fname}"; + if (defined $shaurl && $shaurl ne '') { $shaurl = "$url_custom/$shafn"; } diff --git a/scripts/getDependencies.xml b/scripts/getDependencies.xml index 205ae7e7..8ca2da9d 100644 --- a/scripts/getDependencies.xml +++ b/scripts/getDependencies.xml @@ -21,12 +21,28 @@ + + + + + + + + + + + + + @@ -39,6 +55,7 @@ + diff --git a/scripts/resultsSum.pl b/scripts/resultsSum.pl index 92bd95cf..04804d87 100755 --- a/scripts/resultsSum.pl +++ b/scripts/resultsSum.pl @@ -351,6 +351,7 @@ sub resultReporter { my $timeStamp = gmtime(); #add AQACert.log content in TAP file + $tapPath =~ s[\\][/]g; my $AQACert = $tapPath."../AQACert.log"; my $AQACertContent = `cat $AQACert`; $AQACertContent =~ s/\n/\n# /g; diff --git a/scripts/testTKG/test_platformRequirements.py b/scripts/testTKG/test_platformRequirements.py index a41d4c5b..dd10f6b8 100644 --- a/scripts/testTKG/test_platformRequirements.py +++ b/scripts/testTKG/test_platformRequirements.py @@ -149,6 +149,7 @@ def run_test(): skipped.add('test_not_arch_390_0') else: passed.add('test_not_arch_390_0') + passed.add('test_not_arch_390_z15plus_0') if 'test_arch_390_z15_0' not in passed: skipped.add('test_arch_390_z15_0') diff --git a/settings.mk b/settings.mk index 4224a716..268db9f6 100644 --- a/settings.mk +++ b/settings.mk @@ -168,6 +168,11 @@ ifdef JRE_IMAGE JRE_COMMAND:=$(Q)$(JRE_IMAGE)$(D)bin$(D)java$(Q) endif +JAVA_TO_TEST = $(JAVA_COMMAND) +ifeq ($(USE_JRE),1) + JAVA_TO_TEST = $(JRE_COMMAND) +endif + ####################################### # common dir and jars ####################################### @@ -414,7 +419,6 @@ OPENDJK_METHODHANDLES_ENABLED?=$(shell $(JAVA_COMMAND) -XshowSettings:properties ifneq (,$(findstring true,$(OPENDJK_METHODHANDLES_ENABLED))) export EXCLUDE_FILE:=$(EXCLUDE_FILE),$(TEST_ROOT)$(D)TestConfig$(D)resources$(D)excludes$(D)feature_ojdkmh_exclude.txt endif -# Issue to track excluded tests in x86-64_linux_vt_standard build: https://github.com/eclipse-openj9/openj9/issues/12878 VALUE_TYPE_STANDARD_BUILD?=$(shell $(JAVA_COMMAND) -version 2>&1 | grep 'vtstandard') ifneq (,$(findstring vtstandard,$(VALUE_TYPE_STANDARD_BUILD))) export EXCLUDE_FILE:=$(EXCLUDE_FILE),$(TEST_ROOT)$(D)TestConfig$(D)resources$(D)excludes$(D)feature_vtstandard_exclude.txt diff --git a/src/org/openj9/envInfo/JavaInfo.java b/src/org/openj9/envInfo/JavaInfo.java index 46242d7f..7dea134c 100644 --- a/src/org/openj9/envInfo/JavaInfo.java +++ b/src/org/openj9/envInfo/JavaInfo.java @@ -259,7 +259,7 @@ public String getTestFlag() { checkJFR(); String envTf = System.getenv("TEST_FLAG"); String paddedTf = null; - if (envTf != null) { + if (envTf != null && !envTf.isEmpty()) { testFlag = envTf; paddedTf = "," + envTf + ","; } diff --git a/src/org/testKitGen/MkGen.java b/src/org/testKitGen/MkGen.java index c37e23b3..3bf84918 100644 --- a/src/org/testKitGen/MkGen.java +++ b/src/org/testKitGen/MkGen.java @@ -101,7 +101,24 @@ private void writeSingleTest(List testsInPlaylist, TestInfo testInfo, Wr f.write(testTargetName + ": TEST_GROUP=" + testInfo.getLevelStr() + "\n"); f.write(testTargetName + ": TEST_ITERATIONS=" + testInfo.getIterations() + "\n"); f.write(testTargetName + ": AOT_ITERATIONS=" + testInfo.getAotIterations() + "\n"); - + + // Set special openjdk problem list for JVM options that contains FIPS profile + // This feature is ignored if TEST_FLAG contains FIPS + if (arg.getBuildList().contains("openjdk")) { + String jvmOpts = var.getJvmOptions(); + String customprofileStr = "-Dsemeru.customprofile="; + if (!arg.getTestFlag().contains("FIPS") && !jvmOpts.isEmpty() && jvmOpts.contains(customprofileStr)) { + String[] splited = jvmOpts.split("\\s+"); + for (int i = 0; i < splited.length; i++) { + if (splited[i].contains(customprofileStr)) { + String fipsProfile = splited[i].replace(customprofileStr, "").trim(); + f.write(testTargetName + ": FIPS_VARIATION_PROBLEM_LIST_FILE=-exclude:$(Q)$(JTREG_JDK_TEST_DIR)/ProblemList-" + fipsProfile + ".txt$(Q)\n"); + break; + } + } + } + } + f.write(testTargetName + ":\n"); f.write(indent + "@echo \"\" | tee -a $(Q)$(TESTOUTPUT)$(D)TestTargetResult$(Q);\n"); f.write(indent diff --git a/src/org/testKitGen/TestInfoParser.java b/src/org/testKitGen/TestInfoParser.java index 93eb652d..01eeaf03 100644 --- a/src/org/testKitGen/TestInfoParser.java +++ b/src/org/testKitGen/TestInfoParser.java @@ -88,11 +88,15 @@ public TestInfo parse() { ti.addFeature(featElements[0].toLowerCase(), featElements[1].toLowerCase()); } Set testFlags = new HashSet<>(arg.getTestFlag()); + boolean requiredFeatureFound = false; + boolean hasRequiredFeature = false; for (Map.Entry entry : ti.getFeatures().entrySet()) { String featureOpt = entry.getValue().toLowerCase(); if (featureOpt.equals("required")) { - if (!isFeatureInTestFlags(testFlags, entry.getKey())) { - return null; + hasRequiredFeature = true; + if (isFeatureInTestFlags(testFlags, entry.getKey())) { + requiredFeatureFound = true; + break; } } else if (featureOpt.equals("nonapplicable")) { // Do not generate make target if the test is not applicable for one feature defined in TEST_FLAG @@ -106,7 +110,9 @@ public TestInfo parse() { System.exit(1); } } - + if (hasRequiredFeature && !requiredFeatureFound) { + return null; + } if (testFlags.contains("aot")) { for (Map.Entry entry : ti.getFeatures().entrySet()) { if (doesFeatureMatchTestFlag("aot", entry.getKey())) { @@ -147,12 +153,17 @@ public TestInfo parse() { getElements(ti.getPlatformRequirementsList(), "platformRequirementsList", "platformRequirements", null, ti.getTestCaseName()); List variations = new ArrayList(); - getElements(variations, "variations", "variation", null, ti.getTestCaseName()); List listOfVars = new ArrayList(); - for (int i = 0; i < variations.size(); i++) { - String subTestName = ti.getTestCaseName() + "_" + i; - Variation var = parseVariation(subTestName, variations.get(i), ti.getPlatform(), ti.getPlatformRequirementsList()); - listOfVars.add(var); + String jvmOptions = System.getenv("JVM_OPTIONS"); + if (jvmOptions == null || jvmOptions.isEmpty()) { + getElements(variations, "variations", "variation", null, ti.getTestCaseName()); + for (int i = 0; i < variations.size(); i++) { + String subTestName = ti.getTestCaseName() + "_" + i; + Variation var = parseVariation(subTestName, variations.get(i), ti.getPlatform(), ti.getPlatformRequirementsList()); + listOfVars.add(var); + } + } else { + System.out.println("Warning: JVM_OPTIONS specified, ignoring variations for " + testCaseName + "."); } if (variations.size() == 0) { String subTestName = ti.getTestCaseName() + "_0";