From 8a5bb3e78191cc206f970c26d2a26c949971e91a Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 17 Jul 2019 21:24:55 +1000 Subject: [PATCH] Put valgrind vgdb files to a specific directory. Valgrind by default puts vgdb files and pipes under /tmp, however it is not always able to clean them up, which can cause test failures when there's a pid/file collision. Using a specific directory ensures that we can clean up and start clean. --- regress/test-exec.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/regress/test-exec.sh b/regress/test-exec.sh index 5394119bd..274470761 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -152,8 +152,8 @@ SFTPSERVER_BIN=${SFTPSERVER} SCP_BIN=${SCP} if [ "x$USE_VALGRIND" != "x" ]; then - mkdir -p $OBJ/valgrind-out - rm -f $OBJ/valgrind-out/* + rm -rf $OBJ/valgrind-out $OBJ/valgrind-vgdb + mkdir -p $OBJ/valgrind-out $OBJ/valgrind-vgdb # ensure agent low-priv tests can write logs. chmod 777 $OBJ/valgrind-out VG_TEST=`basename $SCRIPT .sh` @@ -174,6 +174,7 @@ if [ "x$USE_VALGRIND" != "x" ]; then VG_OPTS="--track-origins=yes $VG_LEAK" VG_OPTS="$VG_OPTS --trace-children=yes" VG_OPTS="$VG_OPTS --trace-children-skip=${VG_IGNORE}" + VG_OPTS="$VG_OPTS --vgdb-prefix=$OBJ/valgrind-vgdb/" VG_PATH="valgrind" if [ "x$VALGRIND_PATH" != "x" ]; then VG_PATH="$VALGRIND_PATH"