tail -n +3 | \
awk '{print $$2}')
-extra-tests: test-tools-null test-tools-internal test-tools-real
+extra-tests: \
+ test-tools-null \
+ test-tools-internal \
+ test-tools-real \
+ test-ocaml
# Null invocations of the basic tools shouldn't leak memory.
test-tools-null:
if [ $$r -ne 0 ]; then exit $$r; fi; \
done
-
# XXX Not tested:
# ../clone/virt-sysprep
# ../edit/virt-edit
# ../sparsify/virt-sparsify (OCaml)
# ../tools/virt-win-reg (Perl)
# ../tools/virt-make-fs (Perl)
+
+# Test OCaml bindings under valgrind.
+test-ocaml:
+ $(MAKE) -C ../ocaml VG="$(VG)" check
fun:calloc
obj:/usr/lib/libnl.so.1.1
}
+
+# OCaml, by design, doesn't bother to free the major heap before
+# calling exit. Ignore that leak.
+{
+ ocaml_heap_leak
+ Memcheck:Leak
+ ...
+ fun:caml_alloc_for_heap
+}
+# On the other hand, these seem to be a real bugs in OCaml:
+{
+ ocaml_heap_leak_2
+ Memcheck:Leak
+ fun:malloc
+ fun:caml_thread_new_descriptor
+ fun:caml_thread_new
+}
+{
+ ocaml_heap_leak_3
+ Memcheck:Leak
+ fun:malloc
+ fun:caml_thread_new_descriptor
+ fun:caml_thread_initialize
+}
+{
+ ocaml_heap_leak_4
+ Memcheck:Leak
+ ...
+ fun:pthread_create*
+ ...
+ fun:caml_thread_new
+}