@@ -7,7 +7,7 @@ test -n "$FLUX_TESTS_LOGFILE" && set -- "$@" --logfile
77. ` dirname $0 ` /sharness.sh
88
99# Do not run valgrind test by default unless FLUX_ENABLE_VALGRIND_TEST
10- # is set in environment (e.g. by CI), or the test run run with -d, --debug
10+ # is set in environment (e.g. by CI), or the test run run with -d, --debug
1111#
1212if test -z " $FLUX_ENABLE_VALGRIND_TEST " && test " $debug " = " " ; then
1313 skip_all=' skipping valgrind tests since FLUX_ENABLE_VALGRIND_TEST not set'
@@ -23,7 +23,7 @@ if ! test_have_prereq NO_ASAN; then
2323 test_done
2424fi
2525
26- # Do not run test by default unless valgrind/valgrind.h was found, since
26+ # Do not run test by default unless valgrind/valgrind.h was found, since
2727# this has been known to introduce false positives (#1097). However, allow
2828# run to be forced on the cmdline with -d, --debug.
2929#
@@ -48,7 +48,7 @@ test_expect_success \
4848 run_timeout 900 \
4949 flux start -s ${VALGRIND_NBROKERS} \
5050 --killer-timeout=120 \
51- --wrap=libtool,e, ${VALGRIND} \
51+ --wrap=${VALGRIND} \
5252 --wrap=--tool=memcheck \
5353 --wrap=--leak-check=full \
5454 --wrap=--gen-suppressions=all \
@@ -60,4 +60,42 @@ test_expect_success \
6060 --wrap=--suppressions=$VALGRIND_SUPPRESSIONS \
6161 ${VALGRIND_WORKLOAD}
6262'
63+
64+ # The Valgrind test above doesn't detect memory leaks in planner or schema
65+ test_expect_success \
66+ " valgrind reports no new errors on planner test 01" '
67+ ${VALGRIND} \
68+ --tool=memcheck \
69+ --leak-check=full \
70+ --error-exitcode=1 \
71+ ${SHARNESS_BUILD_DIRECTORY}/resource/planner/test/planner_test01
72+ '
73+
74+ test_expect_success \
75+ " valgrind reports no new errors on planner test 02" '
76+ ${VALGRIND} \
77+ --tool=memcheck \
78+ --leak-check=full \
79+ --error-exitcode=1 \
80+ ${SHARNESS_BUILD_DIRECTORY}/resource/planner/test/planner_test02
81+ '
82+
83+ test_expect_success \
84+ " valgrind reports no new errors on schema test 01" '
85+ ${VALGRIND} \
86+ --tool=memcheck \
87+ --leak-check=full \
88+ --error-exitcode=1 \
89+ ${SHARNESS_BUILD_DIRECTORY}/resource/schema/test/schema_test01
90+ '
91+
92+ test_expect_success \
93+ " valgrind reports no new errors on schema test 02" '
94+ ${VALGRIND} \
95+ --tool=memcheck \
96+ --leak-check=full \
97+ --error-exitcode=1 \
98+ ${SHARNESS_BUILD_DIRECTORY}/resource/schema/test/schema_test02
99+ '
100+
63101test_done
0 commit comments