[Spice-devel] [PATCH spice-server] test-leaks: Document test program
Frediano Ziglio
fziglio at redhat.com
Fri Mar 10 14:36:22 UTC 2017
This test needs some additional setup to do its job.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/tests/test-leaks.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/server/tests/test-leaks.c b/server/tests/test-leaks.c
index 8ab8e15..4985a1e 100644
--- a/server/tests/test-leaks.c
+++ b/server/tests/test-leaks.c
@@ -15,6 +15,19 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/*
+ * This test allocate and free some resources in order to be able to detect
+ * leaks using a leak detector.
+ *
+ * To use with GCC/Clang address sanitizer you can set or add these options:
+ * CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
+ * LDFLAGS="-fsanitize=address -lasan"
+ * Note that early GCC address sanitizer don't have a leak detector.
+ *
+ * To use Valgrind you can run the test with:
+ * valgrind --tool=memcheck --leak-check=full ./test-leaks
+ * For cleaner output you should suppress GLib checks with glib.supp file.
+ */
#include <config.h>
#include <spice.h>
--
2.9.3
More information about the Spice-devel
mailing list