Skip to content

Commit 8a26e79

Browse files
garlickchu11
andcommitted
testsuite: cover sdexec in valgrind test
Problem: there is no valgrind coverage for sdexec/sdbus. Pull in @chu11's valgrind test from the sdexec prototype. Co-authored-by: Albert Chu <[email protected]>
1 parent b6ae383 commit 8a26e79

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

t/t5000-valgrind.t

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,18 @@ VALGRIND_WORKLOAD=${SHARNESS_TEST_SRCDIR}/valgrind/valgrind-workload.sh
4040

4141
VALGRIND_NBROKERS=${VALGRIND_NBROKERS:-2}
4242

43+
# Allow jobs to run under sdexec in test, if available
44+
cat >valgrind.toml <<-EOT
45+
[exec]
46+
service-override = true
47+
EOT
48+
4349
test_expect_success \
4450
"valgrind reports no new errors on $VALGRIND_NBROKERS broker run" '
4551
run_timeout 300 \
4652
flux start -s ${VALGRIND_NBROKERS} \
4753
--test-exit-timeout=120 \
54+
-o,--config-path=valgrind.toml \
4855
--wrap=libtool,e,${VALGRIND} \
4956
--wrap=--tool=memcheck \
5057
--wrap=--leak-check=full \

t/valgrind/workload.d/job-sdexec

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
if ! flux version | grep systemd; then
2+
echo "flux was not built with systemd"
3+
exit 0
4+
fi
5+
if ! systemctl --user show --property Version; then
6+
echo "user systemd is not running"
7+
exit 0
8+
fi
9+
if ! busctl --user status >/dev/null; then
10+
echo "user dbus is not running"
11+
exit 0
12+
fi
13+
14+
flux module load sdbus
15+
flux module load sdexec
16+
17+
NJOBS=${NJOBS:-10}
18+
19+
for i in `seq 1 ${NJOBS}`
20+
do
21+
flux submit --wait \
22+
--setattr system.exec.bulkexec.service=sdexec \
23+
${SHARNESS_TEST_DIRECTORY}/shell/lptest 78 2
24+
done
25+
26+
flux module remove sdexec
27+
flux module remove sdbus

0 commit comments

Comments
 (0)