Skip to content

Commit

Permalink
suppress valgrind err for sd simulation during unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
djb committed Jan 9, 2018
1 parent 021451c commit 40b0e77
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -63,7 +63,7 @@ script:
make test;
fi;
- if [ "$TEST" = "yes" ] && [ "${CC}" = "gcc" ]; then
valgrind --leak-check=full --num-callers=40 --error-exitcode=1 bin/tests_api;
valgrind --leak-check=full --num-callers=40 --suppressions=../.valgrind.supp --error-exitcode=1 bin/tests_api;
fi;
- if [ "$TEST" = "yes" ] && [ "${CC}" = "gcc" ]; then
valgrind --leak-check=full --num-callers=40 --error-exitcode=1 bin/tests_u2f_hid;
Expand Down
23 changes: 23 additions & 0 deletions .valgrind.supp
@@ -0,0 +1,23 @@
# Valgrind suppression file
#
# Note: Could not figure out how to fix this error. Suppressed instead as it only affects unit testing (simulating the SD card).
{
SUPPRESS (travis): Conditional jump or move depends on uninitialised value(s)/sd.c[TESTING=true]>sd_list>opendir()
Memcheck:Cond
fun:vfprintf
fun:vsnprintf
fun:snprintf
fun:tests_seed_xpub_backup
fun:run_utests
fun:main
}
{
SUPPRESS (ubuntu): Conditional jump or move depends on uninitialised value(s)/sd.c[TESTING=true]>sd_list>opendir()
Memcheck:Cond
fun:vfprintf
fun:__vsnprintf_chk
fun:__snprintf_chk
fun:tests_seed_xpub_backup
fun:run_utests
fun:main
}

0 comments on commit 40b0e77

Please sign in to comment.