From: Darren Tucker Date: Wed, 17 Jul 2019 11:24:55 +0000 (+1000) Subject: Put valgrind vgdb files to a specific directory. X-Git-Tag: V_8_1_P1~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a5bb3e78191cc206f970c26d2a26c949971e91a;p=thirdparty%2Fopenssh-portable.git 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. --- 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"