Skip to content

Commit

Permalink
valgrind qa: refactor
Browse files Browse the repository at this point in the history
1. apply $PCPQA_VALGRIND=both logic to all valgrind tests
   (new-grind does this automagically when creating the valgrind
   variant of an existing test, but some pairs were create before
   new-grind or befroe new-grind knew about $PCPQA_VALGRIND)

2. audit all the valgrind tests, and when valgrind variant does
   not provide funtional coverage (typically filtering away stdout
   and/or stderr to focus on Leakage Report from valgrind), remove
   the $PCPQA_VALGRIND guard so both variants of the test will
   be run indpendent of the setting of $PCPQA_VALGRIND

3. for bozo (recent Ubuntu) and vm03 (recent Fedora), export
   PCPQA_VALGRIND=both for a QA Farm run.
  • Loading branch information
kmcdonell committed Jan 26, 2024
1 parent ea5f008 commit ef84c00
Show file tree
Hide file tree
Showing 32 changed files with 82 additions and 29 deletions.
3 changes: 2 additions & 1 deletion qa/1283
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1467 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1467 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1285
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1469 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1469 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1298
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1470 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1470 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1316
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ then
do_valgrind=true
elif _prefer_valgrind
then
_notrun "valgrind variant qa/1317 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1317 will be run"
elif [ "$1" = "--helgrind" ]
then
_check_valgrind
Expand Down
3 changes: 2 additions & 1 deletion qa/1320
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1322 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1322 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1325
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1327 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1327 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1332
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1333 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1333 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1335
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1336 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1336 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1345
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1468 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1468 will be run"
fi

_cleanup()
Expand Down
4 changes: 3 additions & 1 deletion qa/1346
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1348 will be run"
: note we want to run both variants for this test, as the
: valgrind variant filters away the functional checks and
: only reports memory issues
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1361
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ then
do_valgrind=true
elif _prefer_valgrind
then
_notrun "valgrind variant qa/1363 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1363 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1364
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1365 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1365 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1366
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1371 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1371 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1373
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ then
do_valgrind=true
elif _prefer_valgrind
then
_notrun "valgrind variant qa/1374 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1374 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1375
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1376 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1376 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1378
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1380 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1380 will be run"
fi

_cleanup()
Expand Down
4 changes: 3 additions & 1 deletion qa/1381
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1382 will be run"
: note we want to run both variants for this test, as the
: valgrind variant filters away the functional checks and
: only reports memory issues
fi

_cleanup()
Expand Down
4 changes: 3 additions & 1 deletion qa/1384
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1386 will be run"
: note we want to run both variants for this test, as the
: valgrind variant filters away the functional checks and
: only reports memory issues
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1387
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1392 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1392 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1420
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1421 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1421 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1438
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ then
do_valgrind=true
elif _prefer_valgrind
then
_notrun "valgrind variant qa/1439 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1439 will be run"
fi

root_group_is_wheel=false
Expand Down
3 changes: 2 additions & 1 deletion qa/1445
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1446 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1446 will be run"
fi

_cleanup()
Expand Down
4 changes: 3 additions & 1 deletion qa/1447
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1448 will be run"
: note we want to run both variants for this test, as the
: valgrind variant filters away the functional checks and
: only reports memory issues
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1450
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1451 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1451 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1454
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ then
:
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1459 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1459 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1456
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1460 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1460 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1461
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1463 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1463 will be run"
fi

_cleanup()
Expand Down
3 changes: 2 additions & 1 deletion qa/1462
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ then
:
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1464 will be run"
[ $PCPQA_VALGRIND = both ] || \
_notrun "valgrind variant qa/1464 will be run"
fi

_cleanup()
Expand Down
5 changes: 5 additions & 0 deletions qa/1627
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ if [ "$1" = "--valgrind" ]
then
_check_valgrind
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
: note we want to run both variants for this test, as the
: valgrind variant filters away the functional checks and
: only reports memory issues
fi

_cleanup()
Expand Down
5 changes: 5 additions & 0 deletions qa/1826
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ if [ "$1" = "--valgrind" ]
then
_check_valgrind
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
: note we want to run both variants for this test, as the
: valgrind variant filters away the functional checks and
: only reports memory issues
fi

which sha256sum >/dev/null 2>&1 || _notrun "sha256sum tool not found"
Expand Down
4 changes: 3 additions & 1 deletion qa/822
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ then
do_valgrind=true
elif which valgrind >/dev/null 2>&1
then
_notrun "valgrind variant qa/1404 will be run"
: note we want to run both variants for this test, as the
: valgrind variant filters away the functional checks and
: only reports memory issues
fi


Expand Down
9 changes: 9 additions & 0 deletions qa/admin/pcp-daily
Original file line number Diff line number Diff line change
Expand Up @@ -789,10 +789,17 @@ do
echo "::: $host :::"

check_what="$what"
valgrind_opt=''
[ X"$what" = Xall ] && check_what=''
case "$host"
in

bozo|vm03)
# run both the valgrind and the non-valgrind variants of tests
#
valgrind_opt='export PCPQA_VALGRIND=both'
;;

vm01)
# 739 segv's sometimes deep inside Python
# and 749 recently (Dec 2023) has been locking the whole VM
Expand Down Expand Up @@ -1026,6 +1033,8 @@ do

_script_header daily.qa >$tmp.script.qa

[ -n "$valgrind_opt" ] && echo "$valgrind_opt" >>$tmp.script.qa

cat >>$tmp.script.qa <<End-of-File
cd $qa_dir
Expand Down

0 comments on commit ef84c00

Please sign in to comment.