<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testing on Chris J Arges</title><link>https://chrisarges.net/tags/testing/</link><description>Recent content in Testing on Chris J Arges</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 13 Nov 2014 09:45:00 -0800</lastBuildDate><atom:link href="https://chrisarges.net/tags/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>using gcov/lcov with the linux kernel</title><link>https://chrisarges.net/posts/2014-11-13-using-gcovlcov-with-linux-kernel/</link><pubDate>Thu, 13 Nov 2014 09:45:00 -0800</pubDate><guid>https://chrisarges.net/posts/2014-11-13-using-gcovlcov-with-linux-kernel/</guid><description>&lt;p&gt;GCOV/LCOV are amazing tools to figure out code coverage in the Linux kernel. It&#10;is fairly trivial to setup on your own machine. First, enable the following in&#10;your kernel configuration:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CONFIG_GCOV_KERNEL&lt;span style="color:#f92672"&gt;=&lt;/span&gt;y&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CONFIG_GCOV_PROFILE_ALL&lt;span style="color:#f92672"&gt;=&lt;/span&gt;y&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CONFIG_GCOV_FORMAT_AUTODETECT&lt;span style="color:#f92672"&gt;=&lt;/span&gt;y&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Build the kernel and install headers/debug/images to your machine. Note there&#10;may be issues if you run this on a separate machine so consult the official&#10;&lt;a href="https://www.kernel.org/doc/Documentation/gcov.txt" title="gcov docs"&gt;documentation&lt;/a&gt; for additional information.&lt;/p&gt;&#10;&lt;p&gt;Boot the machine with the instrumented kernel and use the following to verify&#10;GCOV_KERNEL was setup properly:&lt;/p&gt;</description></item></channel></rss>