diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-09 20:21:54 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-10 16:32:06 -0600 |
commit | 6f2c1863821c0277fd072cf8fa994188fb14bb6d (patch) | |
tree | 450f1c45e1c420943cd0326723f10a85b03d4b8f /lib9p/tests | |
parent | 661dfbc4535894e5ee1464144977cb42fdf106cd (diff) |
Have valgrind detect memory leaks, not just errors
Diffstat (limited to 'lib9p/tests')
-rwxr-xr-x | lib9p/tests/runtest | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib9p/tests/runtest b/lib9p/tests/runtest index 379ea6d..95f3218 100755 --- a/lib9p/tests/runtest +++ b/lib9p/tests/runtest @@ -7,8 +7,10 @@ set -euE -o pipefail set -x +build_aux=$(realpath --canonicalize-missing -- "${BASH_SOURCE[0]}/../../../build-aux") + port=$(python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()') -valgrind --error-exitcode=2 ./tests/test_server/test_server "$port" & +"${build_aux}/valgrind" ./tests/test_server/test_server "$port" & server_pid=$! # shellcheck disable=SC2064 trap "kill $server_pid || true; wait $server_pid || true" EXIT |