From fd10ed752370e4e5eec01598d98987d11fc57761 Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Thu, 24 Oct 2024 11:31:27 +0200 Subject: [PATCH] vm: ram: double amount when GCOV is used The CI reported some issue when extracting GCOV files: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/11491898749 It looks like the SWAP is being used. We have 16GB on GitHub Actions, no need to limit the RAM to only 2GB. Signed-off-by: Matthieu Baerts (NGI0) --- entrypoint.sh | 5 ++++- run.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 91dbcfc..2b947a7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -52,6 +52,7 @@ set_trace_on : "${INPUT_SELFTESTS_MPTCP_LIB_OVERRIDE_FLAKY:=0}" : "${INPUT_SELFTESTS_MPTCP_LIB_COLOR_FORCE:=1}" : "${INPUT_CPUS:=""}" +: "${INPUT_RAM:=""}" : "${INPUT_GCOV:=""}" : "${INPUT_CI_RESULTS_DIR:=""}" : "${INPUT_CI_PRINT_EXIT_CODE:=1}" @@ -109,7 +110,6 @@ VIRTME_RUN="virtme-run" VIRTME_RUN_OPTS=( --arch "${VIRTME_ARCH}" --name "mptcpdev" # hostname - --memory 2048M --mods=auto --rw # Don't use "rwdir", it will use 9p ; in a container, we can use rw --pwd @@ -285,9 +285,12 @@ setup_env() { local mode VIRTME_RUN_OPTS+=("--net") fi + : "${INPUT_RAM:="$((2048 * (1 + INPUT_GCOV)))M"}" # More needed for GCOV, not to swap + VIRTME_RUN_OPTS+=( --kdir "${VIRTME_BUILD_DIR}" --cpus "${INPUT_CPUS}" + --memory "${INPUT_RAM}" ) OUTPUT_VIRTME="${RESULTS_DIR}/output.log" diff --git a/run.sh b/run.sh index fef0162..1ff1ff0 100755 --- a/run.sh +++ b/run.sh @@ -40,6 +40,7 @@ docker run \ -e "INPUT_EXPECT_TIMEOUT" \ -e "INPUT_EXTRA_ENV" \ -e "INPUT_CPUS" \ + -e "INPUT_RAM" \ -e "INPUT_GCOV" \ -e "VIRTME_ARCH" \ -e "COMPILER" \