[Spice-commits] server/tests

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri Mar 24 11:59:08 UTC 2017


 server/tests/test-leaks.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 3c788828843de7cc68750938263500da64bd4f5f
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Mar 10 14:36:00 2017 +0000

    test-leaks: Document test program
    
    This test needs some additional setup to do its job.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/tests/test-leaks.c b/server/tests/test-leaks.c
index 8ab8e154..4985a1e3 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>
 


More information about the Spice-commits mailing list