mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 13:14:29 -08:00
Add valgrind tests and fix memleaks
This commit is contained in:
20
tests/valgrind.sh
Executable file
20
tests/valgrind.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $# in
|
||||
0)
|
||||
source_dir="."
|
||||
binary_dir="."
|
||||
;;
|
||||
2)
|
||||
source_dir=$1
|
||||
binary_dir=$2
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [source_dir] [binary_dir]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
cmd="valgrind --suppressions="${source_dir}/valgrind.supp" --fullpath-after="$source_dir" --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes --track-origins=yes"
|
||||
|
||||
$cmd "${binary_dir}/mfshell" -c "help; whoami"
|
||||
Reference in New Issue
Block a user