diff --git a/test/functional/cmdLineTests/criu/criuSoftmxScript.sh b/test/functional/cmdLineTests/criu/criuSoftmxScript.sh new file mode 100644 index 00000000000..94bf1515d52 --- /dev/null +++ b/test/functional/cmdLineTests/criu/criuSoftmxScript.sh @@ -0,0 +1,161 @@ +#!/bin/sh + +# +# Copyright IBM Corp. and others 2023 +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] https://openjdk.org/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0 +# + +echo "start running script"; +# the expected arguments are: +# $1 is the TEST_ROOT +# $2 is the JAVA_COMMAND +# $3 is the JVM_OPTIONS +# $4 is the MAINCLASS +# $5 is the APP ARGS +# $6 is the NUM_CHECKPOINT +# $7 is the KEEP_CHECKPOINT +# $8 is the KEEP_TEST_OUTPUT +# $9 is the dynamicHeapAdjustmentForRestore +# $10 is the Xmx +# $11 is the MaxRAMPercentage +# $12 is the Xms +# $13 is the Xsoftmx +# $14 is the expected softmx numerator +# $15 is the expected softmx denominator +echo "export GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load"; +export GLIBC_TUNABLES=glibc.pthread.rseq=0:glibc.cpu.hwcaps=-XSAVEC,-XSAVE,-AVX2,-ERMS,-AVX,-AVX_Fast_Unaligned_Load +echo "export LD_BIND_NOT=on"; +export LD_BIND_NOT=on +# get the system memory +MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}') +MEMORY=$((1024*MEMORY)) +echo "actual memory use" +echo $MEMORY +UPPER=26843545600 +# because the computeDefaultMaxHeapForJava has upper limit for 25 GB +if [ "$MEMORY" -ge "$UPPER" ]; then + # just hard code to meet the required output + echo "Large Heap Pre-checkpoint" + echo "Skip. Machine RAM too large" + exit 1 +fi +XDynamicHeapAdjustment="" +if [ "$9" == true ]; then + XDynamicHeapAdjustment="-XX:+dynamicHeapAdjustmentForRestore" +fi +Xmx="" +if [ "${10}" == true ]; then + Xmx="-Xmx$((MEMORY*2))" +fi +MaxRAMPercentage="" +if [ "${11}" == true ]; then + MaxRAMPercentage="-XX:MaxRAMPercentage=50" +fi +Xms="" +if [ "${12}" == true ]; then + Xms="-Xms$((MEMORY/2))" +fi +Xsoftmx="" +if [ "${13}" == true ]; then + Xsoftmx="-Xsoftmx$((MEMORY/2))" +fi +echo "Xmx" +echo $Xmx +echo "MaxRAMPercentage" +echo $MaxRAMPercentage +echo "Xms" +echo $Xms +echo "Xsoftmx" +echo $Xsoftmx +echo "$2 -XX:+EnableCRIUSupport -XX:+fvtest_testContainerMemLimit $XDynamicHeapAdjustment $Xmx $MaxRAMPercentage $Xms $Xsoftmx $3 -cp "$1/criu.jar" $4 $5 $6 >testOutput 2>&1;" +$2 -XX:+EnableCRIUSupport -XX:+fvtest_testContainerMemLimit $XDynamicHeapAdjustment $Xmx $MaxRAMPercentage $Xms $Xsoftmx $3 -cp "$1/criu.jar" $4 $5 $6 >testOutput 2>&1; + +if [ "$7" != true ]; then + NUM_CHECKPOINT=$6 + for ((i=0; i<$NUM_CHECKPOINT; i++)); do + sleep 2; + criu restore -D ./cpData --shell-job >criuOutput 2>&1; + done +fi +echo "test output" +cat testOutput; +echo "end test output" +echo "" +echo "restore output" +cat criuOutput +echo "end restore output" +echo "" +echo "restore verbose" +cat output.txt +echo "end restore verbose" +if grep -q "Unable to create a thread" criuOutput +then + echo "reach thread error 1" + exit 1 +fi +if grep -q "do not match expected" criuOutput +then + echo "reach thread error 2" + exit 1 +fi +# get the decimal representation of the current softmx value +softMX=$(($(cat output.txt | grep "softMx" | cut -d'"' -f 4))) +echo "actual softmx" +echo $softMX +# assume that 64K is the largest alignment that JVM will apply out of +# extensions->heapAlignment (not in VGC) +# regionSize for standard GCs (not in VGC) +# and pageSize (in VGC) +processedsoftMX=$((softMX - (softMX%(64*1024)))) +echo $processedsoftMX +if [ "$7" != true ]; then + if [ "$8" != true ]; then + rm -rf testOutput criuOutput output.txt + echo "Removed test output files" + fi +fi +if [ "$((${14}))" -eq 0 ]; then + if [ "$softMX" -ne 0 ]; then + echo "Error condition: softMX value should be 0 but it's not." + exit 1 + fi + echo "Success condition: SoftMX value is 0 as expected." + exit 1 +fi +echo "" +echo "" +echo "before alignment expected" +echo $((MEMORY * ${14} / ${15})) +echo "expected softmx" +# same as above, use 64K for alignment +regionAligned=$(((MEMORY * ${14} / ${15}) - ((MEMORY * ${14} / ${15}) % (64*1024)))) +echo $regionAligned +if [ "$((${15}))" -eq 0 ]; then + echo "Error condition: the denominator should never be 0." + exit 1 +else + echo "Both are not 0, we check the proposed softmx against the actual one." + if [ "$processedsoftMX" -eq "$regionAligned" ]; then + echo "Success condition: The proposed softmx equals the actual one." + else + echo "Error condition: the proposed softmx doesn't equal the actual one." + fi +fi +echo "finished script"; \ No newline at end of file diff --git a/test/functional/cmdLineTests/criu/criu_softmx.xml b/test/functional/cmdLineTests/criu/criu_softmx.xml new file mode 100644 index 00000000000..ed3d6769d53 --- /dev/null +++ b/test/functional/cmdLineTests/criu/criu_softmx.xml @@ -0,0 +1,1067 @@ + + + + + + + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false true false false false false 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false true false false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false true false false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false true true false false false 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false true true false false false 3 4 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false true true false false false 9 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false true false true false false 1 4 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false true false true false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false true false true false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false true true true false false 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false true true true false false 3 4 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false true true true false false 9 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false true false false true false 1 2 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false true false false true false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false true false false true false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false true false false false true 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false true false false false true 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false true false false false true 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSizeSoftmxRestore 1 false false true false false false false 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSizeSoftmxRestore 1 false false true false false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSizeSoftmxRestore 1 false false true false false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSizeSoftmxRestore 1 false false true false false false true 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSizeSoftmxRestore 1 false false true false false false true 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSizeSoftmxRestore 1 false false true false false false true 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false false false false false false 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false false false false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false false false false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false false true false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false false true false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false false true false false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false false false true false false 1 4 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false false false true false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false false false true false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false false true true false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false false true true false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false false true true false false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false false false false true false 1 2 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false false false false true false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false false false false true false 0 0 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + SoftMX value is 0 as expected + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSize 1 false false false false false false true 1 2 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSize 1 false false false false false false true 1 2 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSize 1 false false false false false false true 1 2 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSizeSoftmxRestore 1 false false false false false false false 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSizeSoftmxRestore 1 false false false false false false false 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSizeSoftmxRestore 1 false false false false false false false 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ HalfSizeSoftmxRestore 1 false false false false false false true 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ FullSizeSoftmxRestore 1 false false false false false false true 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + + bash $SCRIPPATH$ $TEST_RESROOT$ $JAVA_COMMAND$ "$JVM_OPTIONS$" $MAINCLASS_OPTIONSFILE_TEST$ OneAndHalfSizeSoftmxRestore 1 false false false false false false true 3 8 + Killed + failed properties test + Pre-checkpoint + Post-checkpoint + java.lang.NullPointerException + org.eclipse.openj9.criu.JVMRestoreException + CRIU is not enabled + Operation not permitted + Thread pid mismatch + do not match expected + Unable to create a thread: + Could not dump the JVM processes, err=-70 + User requested Java dump using + The proposed softmx equals the actual one + Error condition: softMX value should be 0 but it's not + Error condition: the proposed softmx doesn't equal the actual one + Error condition: the denominator should never be 0 + Skip. Machine RAM too large + + \ No newline at end of file diff --git a/test/functional/cmdLineTests/criu/playlist.xml b/test/functional/cmdLineTests/criu/playlist.xml index 06638eaedcc..d210eccac3a 100644 --- a/test/functional/cmdLineTests/criu/playlist.xml +++ b/test/functional/cmdLineTests/criu/playlist.xml @@ -582,4 +582,32 @@ openj9 - + + cmdLineTester_criu_softmx + + + https://github.com/eclipse-openj9/openj9/pull/18532#discussion_r1450778067 + + + + $(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS) -Xdump \ + -DSCRIPPATH=$(TEST_RESROOT)$(D)criuSoftmxScript.sh -DTEST_RESROOT=$(TEST_RESROOT) \ + -DJAVA_COMMAND=$(JAVA_COMMAND) -DJVM_OPTIONS=$(SQ)$(JVM_OPTIONS)$(SQ) \ + -jar $(CMDLINETESTER_JAR) -config $(Q)$(TEST_RESROOT)$(D)criu_softmx.xml$(Q) \ + -explainExcludes -xids all,$(PLATFORM),$(VARIATION) -nonZeroExitWhenError; \ + $(TEST_STATUS) + + + CRIU:required + + + sanity + + + functional + + + openj9 + + + \ No newline at end of file diff --git a/test/functional/cmdLineTests/criu/src/org/openj9/criu/SoftmxTest.java b/test/functional/cmdLineTests/criu/src/org/openj9/criu/SoftmxTest.java new file mode 100644 index 00000000000..1907512ab4a --- /dev/null +++ b/test/functional/cmdLineTests/criu/src/org/openj9/criu/SoftmxTest.java @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright IBM Corp. and others 2023 + * + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which accompanies this + * distribution and is available at https://www.eclipse.org/legal/epl-2.0/ + * or the Apache License, Version 2.0 which accompanies this distribution and + * is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * This Source Code may also be made available under the following + * Secondary Licenses when the conditions for such availability set + * forth in the Eclipse Public License, v. 2.0 are satisfied: GNU + * General Public License, version 2 with the GNU Classpath + * Exception [1] and GNU General Public License, version 2 with the + * OpenJDK Assembly Exception [2]. + * + * [1] https://www.gnu.org/software/classpath/license.html + * [2] https://openjdk.org/legal/assembly-exception.html + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0 + *******************************************************************************/ +package org.openj9.criu; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.nio.file.Files; +import java.lang.management.*; +import java.util.*; +import java.util.stream.*; +import java.io.File; +import java.io.BufferedReader; +import java.io.FileReader; +import org.eclipse.openj9.criu.*; + + +public class SoftmxTest { + public static void main(String[] args) { + String test = args[0]; + + switch (test) { + case "HalfSize": + PercentAndSoftmx(1, 0); + break; + case "FullSize": + PercentAndSoftmx(2, 0); + break; + case "OneAndHalfSize": + PercentAndSoftmx(3, 0); + break; + case "HalfSizeSoftmxRestore": + PercentAndSoftmx(1, 1); + break; + case "FullSizeSoftmxRestore": + PercentAndSoftmx(2, 1); + break; + case "OneAndHalfSizeSoftmxRestore": + PercentAndSoftmx(3, 1); + break; + default: + throw new RuntimeException("incorrect parameters"); + } + + } + static void PercentAndSoftmx(Integer percent_type, Integer restore_type) { + String optionsContents = "-XXgc:fvtest_testRAMSizePercentage="; + if (1 == percent_type) { + optionsContents += "50"; + } + else if (2 == percent_type) { + optionsContents += "100"; + } + else if (3 == percent_type) { + optionsContents += "150"; + } + optionsContents += "\n-Xverbosegclog:output.txt"; + if (1 == restore_type) { + optionsContents += "\n"; + optionsContents += "-Xsoftmx"; + try { + // read total memory value + BufferedReader Buff = new BufferedReader(new FileReader("/proc/meminfo")); + String text = Buff.readLine(); + String numberOnly= text.replaceAll("[^0-9]", ""); + System.out.println(numberOnly); + long memorySize = Long.parseLong(numberOnly); + optionsContents = optionsContents + Long.toString(memorySize/8*3) + "k"; + } catch (IOException e) { + System.out.println("/proc/meminfo file cannot be found."); + e.printStackTrace(); + } + } + Path optionsFilePath = CRIUTestUtils.createOptionsFile("options", optionsContents); + Path imagePath = Paths.get("cpData"); + CRIUTestUtils.createCheckpointDirectory(imagePath); + CRIUSupport criuSupport = new CRIUSupport(imagePath); + criuSupport.registerRestoreOptionsFile(optionsFilePath); + + System.out.println("Pre-checkpoint"); + CRIUTestUtils.checkPointJVM(criuSupport, imagePath, true); + System.out.println("Post-checkpoint"); + } +} \ No newline at end of file