Skip to content

Commit d1ec2e1

Browse files
authored
Merge pull request #216 from ldorau/Enable_drd_and_helgrind_in_the_Nightly_CI_job
Enable drd and helgrind in the valgrind jobs
2 parents f3006bf + 38e2586 commit d1ec2e1

11 files changed

+114
-154
lines changed

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
tool: ['memcheck'] # TODO: enable 'drd' and 'helgrind' when all issues are fixed
19+
tool: ['memcheck', 'drd', 'helgrind']
2020
runs-on: ubuntu-latest
2121

2222
steps:

.github/workflows/valgrind.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
tool: ['memcheck'] # TODO: enable 'drd' and 'helgrind' when all issues are fixed
14+
tool: ['memcheck', 'drd', 'helgrind']
1515
runs-on: ubuntu-latest
1616

1717
steps:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
Conflicting Access in libjemalloc.so - internal issue of libjemalloc
3+
drd:ConflictingAccess
4+
obj:*libjemalloc.so*
5+
...
6+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
Conflicting Access in libtbbmalloc.so - internal issue of libjemalloc
3+
drd:ConflictingAccess
4+
obj:*libtbbmalloc.so*
5+
...
6+
}
7+
8+
{
9+
[false-positive] Conflicting Access in memset in pow2AlignedAllocHelper
10+
drd:ConflictingAccess
11+
fun:memset
12+
fun:*pow2AlignedAllocHelper*
13+
fun:*umfPoolTest_multiThreadedpow2AlignedAlloc_Test*
14+
...
15+
}
16+
17+
{
18+
[false-positive] Conflicting Access in tbb_realloc in multiThreadedReallocFree test
19+
drd:ConflictingAccess
20+
fun:memmove
21+
obj:*libtbbmalloc.so*
22+
fun:tbb_realloc
23+
fun:umfPoolRealloc
24+
fun:*umfPoolTest_multiThreadedReallocFree*
25+
...
26+
}
27+
28+
{
29+
[false-positive] Conflicting Access in memset in multiThreadedCallocFree test
30+
drd:ConflictingAccess
31+
fun:memset
32+
fun:tbb_calloc
33+
fun:umfPoolCalloc
34+
fun:*umfPoolTest_multiThreadedCallocFree*
35+
...
36+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
Race in libjemalloc.so - internal issue of libjemalloc
3+
Helgrind:Race
4+
obj:*libjemalloc.so*
5+
...
6+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
Race in libtbbmalloc.so - internal issue of libjemalloc
3+
Helgrind:Race
4+
obj:*libtbbmalloc.so*
5+
...
6+
}
7+
8+
{
9+
[false-positive] Race Access in memset in pow2AlignedAllocHelper
10+
Helgrind:Race
11+
fun:memset
12+
fun:*pow2AlignedAllocHelper*
13+
fun:*umfPoolTest_multiThreadedpow2AlignedAlloc_Test*
14+
...
15+
}
16+
17+
{
18+
[false-positive] Race in tbb_realloc in multiThreadedReallocFree test
19+
Helgrind:Race
20+
fun:memmove
21+
obj:*libtbbmalloc.so*
22+
fun:tbb_realloc
23+
fun:umfPoolRealloc
24+
fun:*umfPoolTest_multiThreadedReallocFree*
25+
...
26+
}
27+
28+
{
29+
[false-positive] Race in memset in multiThreadedCallocFree test
30+
Helgrind:Race
31+
fun:memset
32+
fun:tbb_calloc
33+
fun:umfPoolCalloc
34+
fun:*umfPoolTest_multiThreadedCallocFree*
35+
...
36+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
[false-positive] invalid store - see pool_jemalloc.c for more details
3+
Memcheck:Addr8
4+
fun:memmove
5+
...
6+
fun:op_realloc
7+
}

test/supp/umf_test-jemalloc_pool.supp

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/supp/umf_test-memspace_host_all.supp

Lines changed: 0 additions & 21 deletions
This file was deleted.

test/supp/umf_test-provider_os_memory_config.supp

Lines changed: 0 additions & 117 deletions
This file was deleted.

test/test_valgrind.sh

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,43 @@ echo "Running: \"valgrind $OPTION\" for the following tests:"
7171
FAIL=0
7272
rm -f umf_test-*.log umf_test-*.err
7373

74-
for test in $(ls -1 ./umf_test-*); do
74+
for test in $(ls -1 umf_test-*); do
7575
[ ! -x $test ] && continue
7676
echo -n "$test "
7777
LOG=${test}.log
7878
ERR=${test}.err
79-
SUP="${WORKSPACE}/test/supp/${test}.supp"
79+
SUP="${WORKSPACE}/test/supp/${TOOL}-${test}.supp"
8080
OPT_SUP=""
81-
[ -f ${SUP} ] && OPT_SUP="--suppressions=${SUP}"
81+
[ -f ${SUP} ] && OPT_SUP="--suppressions=${SUP}" && echo -n "(${TOOL}-${test}.supp) "
8282

8383
# skip tests incompatible with valgrind
84+
FILTER=""
8485
case $test in
85-
./umf_test-disjointPool) # TODO: temporarily skip failing disjointPool tests - fix it
86+
umf_test-disjointPool) # TODO: temporarily skip failing disjointPool tests - fix it
8687
FILTER='--gtest_filter="-*pow2AlignedAlloc:*multiThreadedpow2AlignedAlloc"'
8788
;;
88-
./umf_test-memspace_host_all)
89+
umf_test-memspace_host_all)
8990
FILTER='--gtest_filter="-*allocsSpreadAcrossAllNumaNodes"'
9091
;;
91-
./umf_test-provider_os_memory_config)
92+
umf_test-provider_os_memory_config)
9293
FILTER='--gtest_filter="-*protection_flag_none:*protection_flag_read:*providerConfigTestNumaMode*"'
9394
;;
95+
umf_test-memspace_highest_capacity)
96+
FILTER='--gtest_filter="-*highestCapacityVerify*"'
97+
;;
9498
esac
9599

96-
HWLOC_CPUID_PATH=./cpuid valgrind $OPTION $OPT_SUP --gen-suppressions=all $test $FILTER >$LOG 2>&1 || echo -n "(valgrind failed) "
100+
[ "$FILTER" != "" ] && echo -n "($FILTER) "
101+
102+
if ! HWLOC_CPUID_PATH=./cpuid valgrind $OPTION $OPT_SUP --gen-suppressions=all ./$test $FILTER >$LOG 2>&1; then
103+
FAIL=1
104+
echo "(valgrind FAILED) "
105+
echo "Command: HWLOC_CPUID_PATH=./cpuid valgrind $OPTION $OPT_SUP --gen-suppressions=all ./$test $FILTER >$LOG 2>&1"
106+
echo "Output:"
107+
cat $LOG
108+
echo "====================="
109+
echo
110+
fi || true
97111
# grep for "ERROR SUMMARY" with errors (there can be many lines with "ERROR SUMMARY")
98112
grep -e "ERROR SUMMARY:" $LOG | grep -v -e "ERROR SUMMARY: 0 errors from 0 contexts" > $ERR || true
99113
if [ $(cat $ERR | wc -l) -eq 0 ]; then

0 commit comments

Comments
 (0)