-
Notifications
You must be signed in to change notification settings - Fork 14
ci: restore EL7 stresstest coverage, add nightly EL7 functional tests #805
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6759bdc
ci: restore EL7 stresstest coverage, add nightly EL7 functional tests
rkennke 11c391b
ci: run functional:x64-el7-jdk8 on every PR, not just nightly
rkennke 8e2a2fb
ci: pin BUILD_IMAGE_X64_EL7 to the rebuilt image digest
rkennke 696f18e
fix(ci): install gcc-c++ in the EL7 image to satisfy Gradle's compile…
rkennke a2e55b1
ci: repin BUILD_IMAGE_X64_EL7 to the gcc-c++ fixed image
rkennke 997092a
fix(ci): make functional-tests.sh executable
rkennke d5de387
fix(ci): raise test heap for the EL7 functional job
rkennke c93ae51
fix(ci): let -Pskip-native target specific projects
rkennke fd1abe0
fix(ci): compile ddprof-test-native as C99 on Linux
rkennke c89382e
fix(ci): run testRelease, not testDebug, in the EL7 functional job
rkennke 09aed94
ci: add temporary diagnostic jobs for the NativeSocket* investigation
rkennke dd37c3f
ci(diag): statically link libstdc++ into the debug diagnostic build
rkennke 8f241b4
ci: remove the temporary NativeSocket* diagnostic jobs
rkennke 49f6f07
docs: comments describe current state, not what changed
rkennke 924d668
fix: pre-review cleanup - comment history archeology, skip-native con…
rkennke b7970ee
ci: cache the JDK-under-test tarball across functional job runs
rkennke cb4d5a1
fix: use isNativeSkipped() everywhere skip-native is checked
rkennke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,32 @@ | ||
| # Runtime-only image for exercising the shipped x64 binary on its actual | ||
| # glibc floor (2.17). Oracle Linux 7 is the best-maintained EL7 derivative — | ||
| # live CDN, current package levels, no ELS subscription needed — see PR #790. | ||
| # | ||
| # This image never compiles anything real: the shipped libjavaProfiler.so is | ||
| # built in the AlmaLinux 8 image (.gitlab/base/el8/Dockerfile) and consumed | ||
| # here via -Pskip-native -Pwith-libs, which gates every actual compile/link | ||
| # task onlyIf. It still needs *a* C++ compiler on PATH, though: Gradle's | ||
| # ConfigurationPresets.setupStandardConfigurations() calls | ||
| # PlatformUtils.findCompiler() unconditionally at project-configuration time | ||
| # (build-logic/conventions/.../ConfigurationPresets.kt:35), before -Pskip-native | ||
| # is even consulted — with none present, configuration itself fails with | ||
| # "No C++ compiler found." The stock EL7 gcc-c++ (4.8.5) is only here to | ||
| # satisfy that `--version` probe; it is never invoked to build anything. | ||
| # | ||
| # Gradle 9 requires JDK 17+ to run, so JAVA_HOME is a single build JDK (21). | ||
| # Suites that test against other JDKs (8, 11, 17, ...) fetch that JDK at job | ||
| # runtime into JAVA_TEST_HOME (see .gitlab/scripts/functional-tests.sh) — | ||
| # the profiler-test Gradle plugin already runs the test JVM from | ||
| # JAVA_TEST_HOME when it is set, independently of the JDK running Gradle | ||
| # itself. | ||
| ARG BASE_IMAGE=oraclelinux:7 | ||
| FROM ${BASE_IMAGE} as base | ||
| WORKDIR /root | ||
|
|
||
| RUN yum -y install git make zip unzip which wget curl jq gcc-c++ \ | ||
| && yum -y clean all | ||
|
|
||
| RUN curl -s "https://get.sdkman.io" | bash && \ | ||
| bash -c "source /root/.sdkman/bin/sdkman-init.sh && sdk install java 21.0.3-tem" | ||
| ENV JAVA_HOME=/root/.sdkman/candidates/java/current | ||
| ENV PATH="/root/.sdkman/candidates/java/current/bin:${PATH}" |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,73 @@ | ||
| #! /bin/bash | ||
|
|
||
| set -eo pipefail # exit on any failure, including mid-pipeline | ||
| set -x | ||
|
|
||
| if [ ! -z "${CANCELLED:-}" ]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ -z "$TARGET" ]; then | ||
| echo "Expecting the TARGET variable to be set" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$TEST_JDK" ]; then | ||
| echo "Expecting the TEST_JDK variable to be set (Adoptium major version, e.g. 8, 11, 17, 21)" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Release, not Debug: build:x64 (.gitlab/scripts/build.sh) only ever produces | ||
| # and ships the release-config libjavaProfiler.so -- that's the actual | ||
| # shipped artifact this job exists to exercise. testDebug would set | ||
| # ddprof_test.config=debug while the loaded library was in fact built | ||
| # release, so debug-only assertions (e.g. JVMAccessTest's [TEST::INFO] log | ||
| # lines, only compiled into debug builds) would fail outright instead of | ||
| # correctly assumeTrue-skipping. | ||
| TEST_CONFIG="${TEST_CONFIG:-Release}" | ||
|
|
||
| HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
| REPO_ROOT=$( cd "${HERE}/../.." && pwd ) | ||
|
|
||
| if [ -z "${JAVA_HOME}" ]; then | ||
| # workaround for CI when JAVA_HOME is not properly defined | ||
| export JAVA_HOME=~/.sdkman/candidates/java/current | ||
| fi | ||
|
|
||
| echo "Using Java (build) @ ${JAVA_HOME}" | ||
|
|
||
| # Fetch the JDK under test independently of the JDK running Gradle: the | ||
| # profiler-test Gradle plugin runs the test JVM from JAVA_TEST_HOME when it | ||
| # is set, so this is the only way to exercise multiple JDKs without needing | ||
| # a Gradle version that runs on each of them. | ||
| JDK_CACHE_DIR="${REPO_ROOT}/.jdk-cache/${TEST_JDK}" | ||
| if [ ! -x "${JDK_CACHE_DIR}/bin/java" ]; then | ||
| rm -rf "${JDK_CACHE_DIR}" | ||
| mkdir -p "${JDK_CACHE_DIR}" | ||
| curl -sL "https://api.adoptium.net/v3/binary/latest/${TEST_JDK}/ga/linux/x64/jdk/hotspot/normal/eclipse" \ | ||
| -o /tmp/test-jdk.tar.gz | ||
| tar -xzf /tmp/test-jdk.tar.gz -C "${JDK_CACHE_DIR}" --strip-components=1 | ||
| rm -f /tmp/test-jdk.tar.gz | ||
| fi | ||
| export JAVA_TEST_HOME="${JDK_CACHE_DIR}" | ||
| echo "Using Java (test) @ ${JAVA_TEST_HOME}" | ||
| "${JAVA_TEST_HOME}/bin/java" -version | ||
|
|
||
| source .gitlab/scripts/includes.sh | ||
|
|
||
| function onexit { | ||
| local out_dir="${REPO_ROOT}/functional/${TARGET}/jdk${TEST_JDK}" | ||
| mkdir -p "${out_dir}/reports" | ||
| mkdir -p "${out_dir}/logs" | ||
| mv "${REPO_ROOT}/ddprof-test/build/reports" "${out_dir}/" 2>/dev/null || true | ||
| mv /tmp/*.jfr "${out_dir}/logs" 2>/dev/null || true | ||
| mv /tmp/*.json "${out_dir}/logs" 2>/dev/null || true | ||
| mv /tmp/*.txt "${out_dir}/logs" 2>/dev/null || true | ||
| find . -name 'hs_err*' | xargs -I {} cp {} "${out_dir}/logs" 2>/dev/null || true | ||
| } | ||
|
|
||
| trap onexit EXIT | ||
|
|
||
| ./gradlew -Pddprof_version="$(get_version)" -Pskip-native=ddprof-lib,malloc-shim -Pwith-libs="$(pwd)/libs" -PCI \ | ||
| -PtestMaxHeap=1536m \ | ||
| ":ddprof-test:test${TEST_CONFIG}" --max-workers=1 --build-cache --stacktrace --info --no-watch-fs --no-daemon | ||
|
rkennke marked this conversation as resolved.
rkennke marked this conversation as resolved.
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.