From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ernst.netinsight.se (ernst.netinsight.se [194.16.221.21]) by dpdk.org (Postfix) with SMTP id D613A58E4 for ; Tue, 24 Mar 2015 09:31:07 +0100 (CET) Received: from [10.100.1.152] (unverified [10.100.1.152]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id ; Tue, 24 Mar 2015 09:31:00 +0100 Message-ID: <551120C4.5070604@netinsight.net> Date: Tue, 24 Mar 2015 09:31:00 +0100 From: =?windows-1252?Q?Simon_K=E5gstr=F6m?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Thomas Monjalon References: <3571725.20GtF5MAnU@xps13> <550C3A56.5040000@netinsight.net> <1873484.xDChSqfmGy@xps13> In-Reply-To: <1873484.xDChSqfmGy@xps13> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] tools brainstorming X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 08:31:08 -0000 On 2015-03-23 17:29, Thomas Monjalon wrote: > 2015-03-20 16:18, Simon Kågström: >>> - make autotests easier and faster to run for smoke testing >>> - automated basic testpmd check >> >> Code coverage for automated tests can be useful as well. >> >> In a way I'm speaking in my own interests here since I've written a tool >> to do just this (and produce nice HTML etc output), kcov, that can be >> found at github (https://github.com/SimonKagstrom/kcov). > > Feel free to do some DPDK integration for your kcov tool. > It could definitely help to write good tests. Well, there's not that much integration needed for kcov. It needs debugging information in the binary, so something like the patch below is needed (and the same for clang, not sure about icc). Apart from that, I just ran it as kcov --exclude-path=/usr /tmp/kcov-dpdk ./basicfwd --no-huge -c 1 -n 1 to collect coverage info and generate a report. The report for this particular case can be seen here: http://www.c64-network.org/kcov-dpdk/index.html I'm not sure how your automatic test suite works, but just running it like you do today but through kcov like above should do the trick. // Simon diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 88f235c..d3cd9e5 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -60,7 +60,7 @@ endif HOSTAS = as TOOLCHAIN_ASFLAGS = -TOOLCHAIN_CFLAGS = +TOOLCHAIN_CFLAGS = -g TOOLCHAIN_LDFLAGS = ifeq ($(CONFIG_RTE_LIBRTE_GCOV),y)