Skip to content

Commit 388c8be

Browse files
authored
Support CRIU combo list for other platforms (#4618)
Signed-off-by: Lan Xia <[email protected]>
1 parent 6935afa commit 388c8be

File tree

6 files changed

+73
-11
lines changed

6 files changed

+73
-11
lines changed

buildenv/jenkins/openjdk_tests

+31-1
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,38 @@ timestamps{
177177
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.x86.skylake"],
178178
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.x86.amd"],
179179
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.x86.skylake"]
180+
],
181+
'linux_aarch64' : [
182+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22"],
183+
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8"],
184+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9"]
185+
],
186+
's390x_linux' : [
187+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.s390x.z13"],
188+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.s390x.z14"],
189+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22&&hw.arch.s390x.z15"],
190+
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.s390x.z13"],
191+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.s390x.z14"],
192+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8&&hw.arch.s390x.z15"],
193+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.s390x.z14"],
194+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9&&hw.arch.s390x.z15"]
180195
]
181196
]
182197
def imagePullMap = [
183198
'x86-64_linux' : [
184199
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22"],
185200
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8"],
186201
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9"]
202+
],
203+
'linux_aarch64' : [
204+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.ubuntu.22"],
205+
// no machine available ['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.8"],
206+
['LABEL_ADDITION' : "${commonLabel}&&sw.os.rhel.9"]
207+
],
208+
's390x_linux' : [
209+
['LABEL_ADDITION' : "${commonLabel}&&hw.arch.s390x.z13"],
210+
['LABEL_ADDITION' : "${commonLabel}&&hw.arch.s390x.z14"],
211+
['LABEL_ADDITION' : "${commonLabel}&&hw.arch.s390x.z15"]
187212
]
188213
]
189214
if (params.PLATFORM && imageUploadMap[params.PLATFORM] != null && imagePullMap[params.PLATFORM] != null) {
@@ -194,6 +219,11 @@ timestamps{
194219

195220
def imageUploadJobs = [:]
196221
def target = "testList TESTLIST=disabled.criu_pingPerf_testCreateRestoreImageAndPushToRegistry,disabled.criu-portable-checkpoint_test,disabled.criu-ubi-portable-checkpoint_test"
222+
// exclude criu-ubi-portable-checkpoint_test on zlinux due to https://github.com/adoptium/aqa-tests/issues/4617
223+
if (params.PLATFORM == "s390x_linux") {
224+
target = target.minus(",disabled.criu-ubi-portable-checkpoint_test")
225+
}
226+
197227
echo "Trigger ${imageUploadJobName} job ..."
198228
for (int i = 0; i < imageUploadMap[params.PLATFORM].size(); i++) {
199229
def labelAddition = imageUploadMap[params.PLATFORM][i].LABEL_ADDITION
@@ -217,7 +247,7 @@ timestamps{
217247
}
218248
parallel imagePullJobs
219249
} else {
220-
assert false : "Cannot find key PLATFORM: ${params.PLATFORM} in imageGenMap: ${imageGenMap} and/or imagePullMap: ${imagePullMap}."
250+
assert false : "Cannot find key PLATFORM: ${params.PLATFORM} in imageUploadMap: ${imageUploadMap} and/or imagePullMap: ${imagePullMap}."
221251
}
222252
} else {
223253
if (PLATFORM_MAP.containsKey(params.PLATFORM)) {

external/criu-portable-restore/playlist.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<include>../criuSettings.mk</include>
1717
<test>
1818
<testCaseName>criu-portable-restore_test</testCaseName>
19-
<command> $(TEST_ROOT)$(D)external$(D)external.sh --load --tag "${DOCKERIMAGE_TAG}" --dir criu-portable-restore --testtarget _cmdLineTester_criu_keepCheckpoint --portable "true" --platform "${PLATFORM}" --node_name "${NODE_NAME}" --node_labels "${NODE_LABELS}" --docker_registry_required "true" --docker_registry_url $(DOCKER_REGISTRY_URL) --docker_registry_dir "$(DOCKER_REGISTRY_DIR)" --criu_default_image_job_name "$(CRIU_DEFAULT_IMAGE_JOB_NAME)" --criu_combo_os_microarch_list "$(CRIU_XLINUX_COMBO_LIST)" --reportdst $(REPORTDIR) --docker_args "$(EXTRA_DOCKER_ARGS) --tmpfs /run"; \
19+
<command> $(TEST_ROOT)$(D)external$(D)external.sh --load --tag "${DOCKERIMAGE_TAG}" --dir criu-portable-restore --testtarget _cmdLineTester_criu_keepCheckpoint --portable "true" --platform "${PLATFORM}" --node_name "${NODE_NAME}" --node_labels "${NODE_LABELS}" --docker_registry_required "true" --docker_registry_url $(DOCKER_REGISTRY_URL) --docker_registry_dir "$(DOCKER_REGISTRY_DIR)" --criu_default_image_job_name "$(CRIU_DEFAULT_IMAGE_JOB_NAME)" --reportdst $(REPORTDIR) --docker_args "$(EXTRA_DOCKER_ARGS) --tmpfs /run"; \
2020
$(TEST_STATUS); \
2121
$(TEST_ROOT)$(D)external$(D)external.sh --clean --tag "${DOCKERIMAGE_TAG}" --dir criu-portable-restore --platform "${PLATFORM}" --node_labels "${NODE_LABELS}" --docker_registry_url $(DOCKER_REGISTRY_URL) --docker_registry_dir "$(DOCKER_REGISTRY_DIR)" --criu_default_image_job_name "$(CRIU_DEFAULT_IMAGE_JOB_NAME)"
2222
</command>

external/criu-ubi-portable-restore/playlist.xml

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@
1616
<include>../criuSettings.mk</include>
1717
<test>
1818
<testCaseName>criu-ubi-portable-restore_test</testCaseName>
19-
<command> $(TEST_ROOT)$(D)external$(D)external.sh --load --tag "${DOCKERIMAGE_TAG}" --dir criu-ubi-portable-restore --testtarget _cmdLineTester_criu_keepCheckpoint --portable "true" --platform "${PLATFORM}" --node_name "${NODE_NAME}" --node_labels "${NODE_LABELS}" --docker_registry_required "true" --docker_registry_url $(DOCKER_REGISTRY_URL) --docker_registry_dir "$(DOCKER_REGISTRY_DIR)" --criu_default_image_job_name "$(CRIU_DEFAULT_IMAGE_JOB_NAME)" --criu_combo_os_microarch_list "$(CRIU_XLINUX_COMBO_LIST)" --reportdst $(REPORTDIR) --docker_args "$(EXTRA_DOCKER_ARGS) --tmpfs /run"; \
19+
<command> $(TEST_ROOT)$(D)external$(D)external.sh --load --tag "${DOCKERIMAGE_TAG}" --dir criu-ubi-portable-restore --testtarget _cmdLineTester_criu_keepCheckpoint --portable "true" --platform "${PLATFORM}" --node_name "${NODE_NAME}" --node_labels "${NODE_LABELS}" --docker_registry_required "true" --docker_registry_url $(DOCKER_REGISTRY_URL) --docker_registry_dir "$(DOCKER_REGISTRY_DIR)" --criu_default_image_job_name "$(CRIU_DEFAULT_IMAGE_JOB_NAME)" --reportdst $(REPORTDIR) --docker_args "$(EXTRA_DOCKER_ARGS) --tmpfs /run"; \
2020
$(TEST_STATUS); \
2121
$(TEST_ROOT)$(D)external$(D)external.sh --clean --tag "${DOCKERIMAGE_TAG}" --dir criu-ubi-portable-restore --platform "${PLATFORM}" --node_labels "${NODE_LABELS}" --docker_registry_url $(DOCKER_REGISTRY_URL) --docker_registry_dir "$(DOCKER_REGISTRY_DIR)" --criu_default_image_job_name "$(CRIU_DEFAULT_IMAGE_JOB_NAME)"
2222
</command>
23+
<disables>
24+
<disable>
25+
<comment>https://github.com/adoptium/aqa-tests/issues/4617</comment>
26+
<platform>s390x_linux</platform>
27+
</disable>
28+
</disables>
2329
<features>
2430
<feature>CRIU:required</feature>
2531
</features>

external/criu/pingPerf.sh

+13-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ getSemeruDockerfile() {
4646
sed -i 's;-H "Authorization: Bearer ${ARTIFACTORY_TOKEN}";--user "${DOCKER_REGISTRY_CREDENTIALS_USR}:${DOCKER_REGISTRY_CREDENTIALS_PSW}";' $semeruDockerfile
4747
# delete line: ENV JAVA_VERSION .*
4848
sed -i "s:ENV JAVA_VERSION .*: :" $semeruDockerfile
49+
# delete line: exit 1; as we need to test platforms that do not have ea build yet
50+
sed -i '/exit 1;/d' $semeruDockerfile
4951
# delete line: curl -LfsSo /tmp/openjdk.tar.xz ${BINARY_URL};
5052
sed -i '/curl -LfsSo \/tmp\/openjdk.tar.gz ${BINARY_URL};/d' $semeruDockerfile
5153
# delete line: echo "${ESUM} */tmp/openjdk.tar.xz" | sha256sum -c -;
@@ -205,7 +207,17 @@ getImageNameList() {
205207
restore_docker_image_name_list+=("${DOCKER_REGISTRY_URL}/$docker_image_source_job_name:${build_number}")
206208
else
207209
echo "Testing all images from: ${docker_image_source_job_name}:${build_number}"
208-
image_os_combo_list=($CRIU_XLINUX_COMBO_LIST)
210+
# - is shell metacharacter. In PLATFORM value, replace - with _
211+
echo "PLATFORM: ${PLATFORM}"
212+
platValue=$(echo $PLATFORM | sed "s/-/_/")
213+
comboList=CRIU_COMBO_LIST_$platValue
214+
if [[ "$PLATFORM" =~ "linux_390-64" ]]; then
215+
micro_architecture=$(echo $node_label_micro_architecture | sed "s/hw.arch.s390x.//")
216+
comboList=$comboList_$micro_architecture
217+
fi
218+
219+
image_os_combo_list="${!comboList}"
220+
echo "${comboList}: ${image_os_combo_list}"
209221
for image_os_combo in ${image_os_combo_list[@]}
210222
do
211223
restore_docker_image_name_list+=("${DOCKER_REGISTRY_URL}/${docker_image_source_job_name}/pingperf_${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${PLATFORM}-${image_os_combo}:${build_number}")

external/criuSettings.mk

+11-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,15 @@
1212
# limitations under the License.
1313
##############################################################################
1414

15-
export CRIU_XLINUX_COMBO_LIST=sw.os.ubuntu.22-hw.arch.x86.broadwell sw.os.ubuntu.22-hw.arch.x86.amd sw.os.rhel.8-hw.arch.x86.broadwell sw.os.rhel.8-hw.arch.x86.amd sw.os.rhel.8-hw.arch.x86.skylake sw.os.rhel.9-hw.arch.x86.amd sw.os.rhel.9-hw.arch.x86.skylake
15+
# - is shell metacharacter. In PLATFORM value, replace - with _
16+
export CRIU_COMBO_LIST_x86_64_linux=sw.os.ubuntu.22-hw.arch.x86.broadwell sw.os.ubuntu.22-hw.arch.x86.amd sw.os.rhel.8-hw.arch.x86.broadwell sw.os.rhel.8-hw.arch.x86.amd sw.os.rhel.8-hw.arch.x86.skylake sw.os.rhel.9-hw.arch.x86.amd sw.os.rhel.9-hw.arch.x86.skylake
1617
# not available: sw.os.ubuntu.22-hw.arch.x86.skylake sw.os.rhel.9-hw.arch.x86.broadwell
18+
19+
export CRIU_COMBO_LIST_linux_390_64_z13=sw.os.ubuntu.22-hw.arch.s390x.z13
20+
# not available: sw.os.rhel.8-hw.arch.s390x.z13
21+
export CRIU_COMBO_LIST_linux_390_64_z14=sw.os.ubuntu.22-hw.arch.s390x.z14 sw.os.rhel.8-hw.arch.s390x.z14 sw.os.rhel.9-hw.arch.s390x.z14
22+
export CRIU_COMBO_LIST_linux_390_64_z15=sw.os.ubuntu.22-hw.arch.s390x.z15 sw.os.rhel.8-hw.arch.s390x.z15 sw.os.rhel.9-hw.arch.s390x.z15
23+
24+
# placeholder
25+
export CRIU_COMBO_LIST_aarch64_linux=
26+
export CRIU_COMBO_LIST_ppc64le_linux=

external/external.sh

+10-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ container_push="docker push"
4444
container_pull="docker pull"
4545
container_rm="docker rm"
4646
container_rmi="docker rmi"
47-
criu_combo_os_microarch_list=""
4847
docker_registry_required="false"
4948
docker_registry_url=""
5049
docker_registry_dir=""
@@ -57,7 +56,7 @@ imageArg=""
5756

5857

5958
usage () {
60-
echo 'Usage : external.sh --dir TESTDIR --tag DOCKERIMAGE_TAG --version JDK_VERSION --impl JDK_IMPL [--docker_os docker_os][--platform PLATFORM] [--portable portable] [--node_name node_name] [--node_labels node_labels] [--docker_registry_required docker_registry_required] [--docker_registry_url DOCKER_REGISTRY_URL] [--docker_registry_dir DOCKER_REGISTRY_DIR] [--criu_combo_os_microarch_list CRIU_XLINUX_COMBO_LIST] [--mount_jdk mount_jdk] [--test_root TEST_ROOT] [--reportsrc appReportDir] [--reportdst REPORTDIR] [--testtarget target] [--docker_args EXTRA_DOCKER_ARGS] [--build|--run|--load|--clean]'
59+
echo 'Usage : external.sh --dir TESTDIR --tag DOCKERIMAGE_TAG --version JDK_VERSION --impl JDK_IMPL [--docker_os docker_os][--platform PLATFORM] [--portable portable] [--node_name node_name] [--node_labels node_labels] [--docker_registry_required docker_registry_required] [--docker_registry_url DOCKER_REGISTRY_URL] [--docker_registry_dir DOCKER_REGISTRY_DIR] [--mount_jdk mount_jdk] [--test_root TEST_ROOT] [--reportsrc appReportDir] [--reportdst REPORTDIR] [--testtarget target] [--docker_args EXTRA_DOCKER_ARGS] [--build|--run|--load|--clean]'
6160
}
6261

6362
supported_tests="external_custom aot camel criu-portable-checkpoint criu-portable-restore criu-ubi-portable-checkpoint criu-ubi-portable-restore derby elasticsearch jacoco jenkins functional-test kafka lucene-solr openliberty-mp-tck payara-mp-tck quarkus quarkus_quickstarts scala system-test tomcat tomee wildfly wycheproof netty spring"
@@ -178,9 +177,6 @@ parseCommandLineArgs() {
178177
"--criu_default_image_job_name" )
179178
criu_default_image_job_name="$1"; shift;;
180179

181-
"--criu_combo_os_microarch_list" )
182-
criu_combo_os_microarch_list="$1"; shift;;
183-
184180
"--test_root" )
185181
test_root="$1"; shift;;
186182

@@ -334,7 +330,15 @@ if [ $command_type == "load" ]; then
334330
restore_docker_image_name_list+=("${docker_registry_url}/$docker_image_source_job_name:${build_number}")
335331
else
336332
echo "Testing images from nightly builds"
337-
image_os_micro_architecture_list=($criu_combo_os_microarch_list)
333+
# - is shell metacharacter. In PLATFORM value, replace - with _
334+
platValue=$(echo $PLATFORM | sed "s/-/_/")
335+
comboList=CRIU_COMBO_LIST_$platValue
336+
if [[ "$PLATFORM" =~ "linux_390-64" ]]; then
337+
micro_architecture=$(echo $node_label_micro_architecture | sed "s/hw.arch.s390x.//")
338+
comboList=$comboList_$micro_architecture
339+
fi
340+
image_os_micro_architecture_list="${!comboList}"
341+
echo "${comboList}: ${image_os_micro_architecture_list}"
338342
for image_os_micro_architecture in ${image_os_micro_architecture_list[@]}
339343
do
340344
restore_docker_image_name_list+=("${docker_registry_url}/$docker_image_source_job_name/${JDK_VERSION}-${JDK_IMPL}-${docker_os}-${platform}-${image_os_micro_architecture}:${build_number}")

0 commit comments

Comments
 (0)