Skip to content

Commit aa44b26

Browse files
committed
flux-sharness: add env vars for heaptrack and wrap
problem: I've been using heaptrack a lot, and other tools that need to be wrapped around flux itself. This is difficult without something to integrate with test_funder_flux solution: add some env vars to do a heaptrack recording or add a generic wrapper
1 parent 7231fee commit aa44b26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

t/sharness.d/flux-sharness.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ test_under_flux() {
253253
valgrind="$valgrind,--trace-children=no,--child-silent-after-fork=yes"
254254
valgrind="$valgrind,--leak-resolution=med,--error-exitcode=1"
255255
valgrind="$valgrind,--suppressions=${VALGRIND_SUPPRESSIONS}"
256+
elif test -n "$FLUX_TEST_HEAPTRACK" ; then
257+
valgrind="--wrap=heaptrack,--record-only"
258+
elif test -n "$FLUX_TEST_WRAP" ; then
259+
valgrind="$FLUX_TEST_WRAP"
256260
fi
257261
# Extend timeouts when running under AddressSanitizer
258262
if test_have_prereq ASAN; then

0 commit comments

Comments
 (0)