[CRIU] FYI: ZDTM code coverage
Andrew Vagin
avagin at parallels.com
Tue Dec 4 11:25:40 EST 2012
# make clean
# make DEBUG=1
# make test
# gcov *.c
Lines executed:49.36% of 10107
File 'cr-check.c'
Lines executed:70.00% of 240
Creating 'cr-check.c.gcov'
File 'cr-dump.c'
Lines executed:78.18% of 990
Creating 'cr-dump.c.gcov'
File '/root/crtools/include/pstree.h'
Lines executed:100.00% of 3
Creating 'pstree.h.gcov'
File '/root/crtools/include/crtools.h'
Lines executed:100.00% of 7
Creating 'crtools.h.gcov'
File '/root/crtools/include/list.h'
Lines executed:100.00% of 60
Creating 'list.h.gcov'
File 'cr-restore.c'
Lines executed:36.29% of 970
Creating 'cr-restore.c.gcov'
File '/root/crtools/include/lock.h'
Lines executed:65.85% of 41
Creating 'lock.h.gcov'
File '/root/crtools/include/util.h'
Lines executed:60.00% of 30
Creating 'util.h.gcov'
File '/root/crtools/include/bitops.h'
Lines executed:75.00% of 40
Creating 'bitops.h.gcov'
File 'cr-show.c'
Lines executed:0.00% of 253
Creating 'cr-show.c.gcov'
File 'crtools.c'
Lines executed:43.07% of 202
Creating 'crtools.c.gcov'
File 'eventfd.c'
Lines executed:48.89% of 45
Creating 'eventfd.c.gcov'
File 'eventpoll.c'
Lines executed:37.33% of 75
Creating 'eventpoll.c.gcov'
File 'fifo.c'
Lines executed:30.19% of 53
Creating 'fifo.c.gcov'
File '/root/crtools/include/pipes.h'
Lines executed:100.00% of 2
Creating 'pipes.h.gcov'
File 'file-ids.c'
Lines executed:93.33% of 15
Creating 'file-ids.c.gcov'
File 'files.c'
Lines executed:27.74% of 292
Creating 'files.c.gcov'
File '/root/crtools/include/util-net.h'
Lines executed:85.71% of 7
Creating 'util-net.h.gcov'
File 'files-reg.c'
Lines executed:52.71% of 258
Creating 'files-reg.c.gcov'
File 'image.c'
Lines executed:65.65% of 131
Creating 'image.c.gcov'
File 'inotify.c'
Lines executed:23.71% of 97
Creating 'inotify.c.gcov'
File 'ipc_ns.c'
Lines executed:38.10% of 504
Creating 'ipc_ns.c.gcov'
File 'kcmp-ids.c'
Lines executed:95.51% of 89
Creating 'kcmp-ids.c.gcov'
File '/root/crtools/include/rbtree.h'
Lines executed:84.21% of 19
Creating 'rbtree.h.gcov'
File 'libnetlink.c'
Lines executed:57.69% of 78
Creating 'libnetlink.c.gcov'
File 'log.c'
Lines executed:64.71% of 102
Creating 'log.c.gcov'
File 'mount.c'
Lines executed:28.81% of 354
Creating 'mount.c.gcov'
File '/root/crtools/include/proc_parse.h'
Lines executed:100.00% of 4
Creating 'proc_parse.h.gcov'
File 'namespaces.c'
Lines executed:59.41% of 101
Creating 'namespaces.c.gcov'
File 'net.c'
Lines executed:38.74% of 191
Creating 'net.c.gcov'
File 'netfilter.c'
Lines executed:75.00% of 32
Creating 'netfilter.c.gcov'
File 'parasite-syscall.c'
Lines executed:71.03% of 428
Creating 'parasite-syscall.c.gcov'
File '/root/crtools/include/parasite.h'
Lines executed:100.00% of 2
Creating 'parasite.h.gcov'
File 'pipes.c'
Lines executed:32.35% of 204
Creating 'pipes.c.gcov'
File '/root/crtools/include/files.h'
Lines executed:0.00% of 2
Creating 'files.h.gcov'
File 'proc_parse.c'
Lines executed:75.70% of 461
Creating 'proc_parse.c.gcov'
File 'protobuf.c'
Lines executed:28.89% of 315
Creating 'protobuf.c.gcov'
File 'pstree.c'
Lines executed:83.26% of 239
Creating 'pstree.c.gcov'
File 'ptrace.c'
Lines executed:43.48% of 115
Creating 'ptrace.c.gcov'
File 'rbtree.c'
Lines executed:32.20% of 205
Creating 'rbtree.c.gcov'
File 'shmem.c'
Lines executed:43.93% of 173
Creating 'shmem.c.gcov'
File '/root/crtools/include/restorer.h'
Lines executed:0.00% of 5
Creating 'restorer.h.gcov'
File 'signalfd.c'
Lines executed:36.00% of 50
Creating 'signalfd.c.gcov'
File 'sk-inet.c'
Lines executed:51.86% of 295
Creating 'sk-inet.c.gcov'
File '/root/crtools/include/sk-inet.h'
Lines executed:0.00% of 5
Creating 'sk-inet.h.gcov'
File 'sk-packet.c'
Lines executed:45.77% of 260
Creating 'sk-packet.c.gcov'
File 'sk-queue.c'
Lines executed:39.29% of 112
Creating 'sk-queue.c.gcov'
File 'sk-tcp.c'
Lines executed:35.33% of 317
Creating 'sk-tcp.c.gcov'
File 'sk-unix.c'
Lines executed:44.94% of 385
Creating 'sk-unix.c.gcov'
File '/root/crtools/include/sockets.h'
Lines executed:0.00% of 2
Creating 'sockets.h.gcov'
File 'sockets.c'
Lines executed:53.31% of 317
Creating 'sockets.c.gcov'
File 'sysctl.c'
Lines executed:50.77% of 65
Creating 'sysctl.c.gcov'
File 'tty.c'
Lines executed:27.59% of 482
Creating 'tty.c.gcov'
File 'util.c'
Lines executed:59.50% of 279
Creating 'util.c.gcov'
File 'util-net.c'
Lines executed:65.71% of 70
Creating 'util-net.c.gcov'
File '/root/crtools/include/memcpy_64.h'
Lines executed:100.00% of 3
Creating 'memcpy_64.h.gcov'
File 'uts_ns.c'
Lines executed:29.03% of 31
Creating 'uts_ns.c.gcov'
-------------- next part --------------
diff --git a/Makefile b/Makefile
index 18db408..5cf8ec2 100644
--- a/Makefile
+++ b/Makefile
@@ -136,7 +136,7 @@ x86:
%.o: %.c
$(E) " CC " $@
- $(Q) $(CC) -c $(CFLAGS) $< -o $@
+ $(Q) $(CC) -c $(CFLAGS) --coverage $< -o $@
%.i: %.c
$(E) " CC " $@
@@ -152,7 +152,7 @@ x86:
$(PROGRAM): $(OBJS) $(SYSCALL-LIB) $(PROTOBUF-LIB)
$(E) " LINK " $@
- $(Q) $(CC) $(CFLAGS) $^ $(LIBS) -o $@
+ $(Q) $(CC) $(CFLAGS) --coverage $^ $(LIBS) -o $@
zdtm: all
$(Q) $(MAKE) -C test/zdtm all
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcov.tar.bz2
Type: application/x-bzip2
Size: 167057 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20121204/1246e3b5/attachment-0001.bz2>
More information about the CRIU
mailing list