Skip to content

CXX-3273 revert to using system-installed valgrind #1400

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 1 commit into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

2 changes: 0 additions & 2 deletions .evergreen/config_generator/components/valgrind.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from config_generator.components.funcs.compile import Compile
from config_generator.components.funcs.fetch_det import FetchDET
from config_generator.components.funcs.install_c_driver import InstallCDriver
from config_generator.components.funcs.install_valgrind import InstallValgrind
from config_generator.components.funcs.install_uv import InstallUV
from config_generator.components.funcs.run_kms_servers import RunKMSServers
from config_generator.components.funcs.setup import Setup
Expand Down Expand Up @@ -68,7 +67,6 @@ def tasks():

commands += [
Setup.call(),
InstallValgrind.call(),
StartMongod.call(mongodb_version=mongodb_version, topology=topology),
InstallCDriver.call(vars=icd_vars),
InstallUV.call(),
Expand Down
64 changes: 0 additions & 64 deletions .evergreen/generated_configs/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,70 +418,6 @@ functions:
type: setup
params:
file: expansions.uv.yml
install-valgrind:
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- |
if [[ -n "$XDG_CACHE_DIR" ]]; then
cache_dir="$XDG_CACHE_DIR" # XDG Base Directory specification.
elif [[ -n "$LOCALAPPDATA" ]]; then
cache_dir="$LOCALAPPDATA" # Windows.
elif [[ -n "$USERPROFILE" ]]; then
cache_dir="$USERPROFILE/.cache" # Windows (fallback).
elif [[ -d "$HOME/Library/Caches" ]]; then
cache_dir="$HOME/Library/Caches" # MacOS.
elif [[ -n "$HOME" ]]; then
cache_dir="$HOME/.cache" # Linux-like.
elif [[ -d ~/.cache ]]; then
cache_dir="~/.cache" # Linux-like (fallback).
else
cache_dir="$(pwd)/.cache" # EVG task directory (fallback).
fi

mkdir -p "$cache_dir/mongo-cxx-driver" || exit
cache_dir="$(cd "$cache_dir/mongo-cxx-driver" && pwd)" || exit

printf "MONGO_CXX_DRIVER_CACHE_DIR: %s\n" "$cache_dir" >|expansions.set-cache-dir.yml
- command: expansions.update
type: setup
params:
file: expansions.set-cache-dir.yml
- command: subprocess.exec
type: setup
params:
binary: bash
args:
- -c
- |
set -o errexit
set -o pipefail

if [[ ! -n "${MONGO_CXX_DRIVER_CACHE_DIR}" ]]; then
echo "MONGO_CXX_DRIVER_CACHE_DIR is not defined!" 1>&2
exit 1
fi

valgrind_install_dir="${MONGO_CXX_DRIVER_CACHE_DIR}/valgrind-3.24.0"
mkdir -p "$valgrind_install_dir"

if ! command -v "$valgrind_install_dir/bin/valgrind" 2>/dev/null; then
env \
install_prefix="${MONGO_CXX_DRIVER_CACHE_DIR}/valgrind-3.24.0" \
mongo-cxx-driver/.evergreen/scripts/valgrind-installer.sh
fi

PATH="$valgrind_install_dir/bin:$PATH" command -V valgrind
PATH="$valgrind_install_dir/bin:$PATH" valgrind --version

printf "VALGRIND_INSTALL_DIR: %s\n" "$valgrind_install_dir/bin" >|expansions.valgrind.yml
- command: expansions.update
type: setup
params:
file: expansions.valgrind.yml
install_c_driver:
- command: expansions.update
type: setup
Expand Down
9 changes: 0 additions & 9 deletions .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15715,7 +15715,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
TOPOLOGY: replica_set
Expand Down Expand Up @@ -15745,7 +15744,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
TOPOLOGY: sharded_cluster
Expand Down Expand Up @@ -15775,7 +15773,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
mongodb_version: "4.0"
Expand Down Expand Up @@ -15804,7 +15801,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
TOPOLOGY: replica_set
Expand Down Expand Up @@ -15834,7 +15830,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
TOPOLOGY: sharded_cluster
Expand Down Expand Up @@ -15864,7 +15859,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
mongodb_version: "8.0"
Expand Down Expand Up @@ -15893,7 +15887,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
TOPOLOGY: replica_set
Expand Down Expand Up @@ -15923,7 +15916,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
TOPOLOGY: sharded_cluster
Expand Down Expand Up @@ -15953,7 +15945,6 @@ tasks:
updates:
- { key: build_type, value: Debug }
- func: setup
- func: install-valgrind
- func: start_mongod
vars:
mongodb_version: latest
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ else
export UBSAN_OPTIONS="print_stacktrace=1"
export PATH="/opt/mongodbtoolchain/v4/bin:${PATH:-}" # llvm-symbolizer
elif [[ "${TEST_WITH_VALGRIND:-}" == "ON" ]]; then
PATH="${VALGRIND_INSTALL_DIR:?}:${PATH:-}"
command -V valgrind
valgrind --version
run_test() {
valgrind --leak-check=full --track-origins=yes --num-callers=50 --error-exitcode=1 --error-limit=no --read-var-info=yes --suppressions=../etc/memcheck.suppressions "$@" "${test_args[@]:?}"
Expand Down
23 changes: 0 additions & 23 deletions .evergreen/scripts/valgrind-installer.sh

This file was deleted.