diff options
author | Darren Tucker <dtucker@dtucker.net> | 2019-07-17 21:24:55 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-07-17 21:24:55 +1000 |
commit | 8a5bb3e78191cc206f970c26d2a26c949971e91a (patch) | |
tree | cb958b1a04b5fe259409f0526cbd2387b8c50550 | |
parent | f8829fe57fb0479d6103cfe1190095da3c032c6d (diff) |
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.
-rw-r--r-- | regress/test-exec.sh | 5 |
1 files 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} | |||
152 | SCP_BIN=${SCP} | 152 | SCP_BIN=${SCP} |
153 | 153 | ||
154 | if [ "x$USE_VALGRIND" != "x" ]; then | 154 | if [ "x$USE_VALGRIND" != "x" ]; then |
155 | mkdir -p $OBJ/valgrind-out | 155 | rm -rf $OBJ/valgrind-out $OBJ/valgrind-vgdb |
156 | rm -f $OBJ/valgrind-out/* | 156 | mkdir -p $OBJ/valgrind-out $OBJ/valgrind-vgdb |
157 | # ensure agent low-priv tests can write logs. | 157 | # ensure agent low-priv tests can write logs. |
158 | chmod 777 $OBJ/valgrind-out | 158 | chmod 777 $OBJ/valgrind-out |
159 | VG_TEST=`basename $SCRIPT .sh` | 159 | VG_TEST=`basename $SCRIPT .sh` |
@@ -174,6 +174,7 @@ if [ "x$USE_VALGRIND" != "x" ]; then | |||
174 | VG_OPTS="--track-origins=yes $VG_LEAK" | 174 | VG_OPTS="--track-origins=yes $VG_LEAK" |
175 | VG_OPTS="$VG_OPTS --trace-children=yes" | 175 | VG_OPTS="$VG_OPTS --trace-children=yes" |
176 | VG_OPTS="$VG_OPTS --trace-children-skip=${VG_IGNORE}" | 176 | VG_OPTS="$VG_OPTS --trace-children-skip=${VG_IGNORE}" |
177 | VG_OPTS="$VG_OPTS --vgdb-prefix=$OBJ/valgrind-vgdb/" | ||
177 | VG_PATH="valgrind" | 178 | VG_PATH="valgrind" |
178 | if [ "x$VALGRIND_PATH" != "x" ]; then | 179 | if [ "x$VALGRIND_PATH" != "x" ]; then |
179 | VG_PATH="$VALGRIND_PATH" | 180 | VG_PATH="$VALGRIND_PATH" |