Skip to content

Commit

Permalink
Merge branch 'latest' into net
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
  • Loading branch information
matttbe committed Dec 2, 2024
2 parents 6eaea49 + 7e39805 commit 4ca3be2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 29 deletions.
3 changes: 2 additions & 1 deletion connect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# SPDX-License-Identifier: GPL-2.0
DIR="$(dirname "$(realpath -P "${0}")")"

export INPUT_TRACE=0
if [[ "${-}" =~ "x" ]]; then
export INPUT_TRACE=1
INPUT_TRACE=1
fi
bash "-${-}" "${DIR}/container.sh" /entrypoint.sh connect "${@}"
7 changes: 6 additions & 1 deletion container.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0

envs=()
for env in "${!INPUT_@}"; do
envs+=(-e "${env}=${!env}")
done

docker exec -it \
-e "INPUT_TRACE=${INPUT_TRACE:-0}" \
"${envs[@]}" \
"$(docker ps --filter "label=name=mptcp-upstream-virtme-docker" -l --format "{{.ID}}")" \
"${@:-bash}"
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ EXIT_STATUS=0
EXIT_REASONS=()
EXIT_TITLE="KVM Validation"
EXPECT=0
VIRTME_EXEC_RUN="${KERNEL_SRC}/.virtme-exec-run"
VIRTME_EXEC_RUN="${INPUT_VIRTME_EXEC_RUN:-"${KERNEL_SRC}/.virtme-exec-run"}"
VIRTME_EXEC_PRE="${KERNEL_SRC}/.virtme-exec-pre"
VIRTME_EXEC_POST="${KERNEL_SRC}/.virtme-exec-post"
VIRTME_PREPARE_POST="${KERNEL_SRC}/.virtme-prepare-post"
Expand Down
33 changes: 7 additions & 26 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ VIRTME_GIT_DIR="$(realpath "$(git rev-parse --git-common-dir)")"

HOME_DIR="$(realpath "$(dirname "${0}")/.home")"

envs=()
for env in "${!INPUT_@}"; do
envs+=(-e "${env}=${!env}")
done

docker run \
-v "${PWD}:${PWD}:rw" \
-v "${VIRTME_GIT_DIR}:${VIRTME_GIT_DIR}:ro" \
Expand All @@ -19,34 +24,10 @@ docker run \
${VIRTME_SYZKALLER_PATH:+ -v "${VIRTME_SYZKALLER_PATH}:/opt/syzkaller:rw"} \
${VIRTME_NG_PATH:+ -v "${VIRTME_NG_PATH}:/opt/virtme-ng:ro"} \
-w "${PWD}" \
-e "INPUT_CLANG" \
-e "INPUT_TRACE" \
-e "INPUT_NO_BLOCK" \
-e "INPUT_RUN_LOOP_CONTINUE" \
-e "INPUT_BUILD_SKIP" \
-e "INPUT_BUILD_SKIP_PERF" \
-e "INPUT_BUILD_SKIP_SELFTESTS" \
-e "INPUT_BUILD_SKIP_BPFTESTS" \
-e "INPUT_BUILD_SKIP_PACKETDRILL" \
-e "INPUT_BUILD_SUFFIX" \
-e "INPUT_MAKE_ARGS" \
-e "INPUT_RUN_TESTS_ONLY" \
-e "INPUT_RUN_TESTS_EXCEPT" \
-e "INPUT_SELFTESTS_DIR" \
-e "INPUT_SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES" \
-e "INPUT_SELFTESTS_MPTCP_LIB_OVERRIDE_FLAKY" \
-e "INPUT_PACKETDRILL_NO_SYNC=${VIRTME_PACKETDRILL_PATH:+1}" \
-e "INPUT_PACKETDRILL_NO_MORE_TOLERANCE=${INPUT_PACKETDRILL_NO_MORE_TOLERANCE:-${VIRTME_PACKETDRILL_PATH:+1}}" \
-e "INPUT_PACKETDRILL_NO_MORE_TOLERANCE=${VIRTME_PACKETDRILL_PATH:+1}" \
-e "INPUT_PACKETDRILL_STABLE=${VIRTME_PACKETDRILL_STABLE:-0}" \
-e "INPUT_EXPECT_TIMEOUT" \
-e "INPUT_EXTRA_ENV" \
-e "INPUT_HOSTNAME" \
-e "INPUT_CPUS" \
-e "INPUT_RAM" \
-e "INPUT_GCOV" \
-e "INPUT_NET_BRIDGES" \
-e "INPUT_MAC_ADDRESS_PREFIX" \
-e "INPUT_VSOCK_CID" \
"${envs[@]}" \
-e "VIRTME_ARCH" \
-e "COMPILER" \
--privileged \
Expand Down

0 comments on commit 4ca3be2

Please sign in to comment.