<html><body><div>Niels you are correct. Let me take a look. 
<br>
<br>Luis 
<br>
<br>
<br>-----Original Message-----
<br>From: Niels de Vos [ndevos@redhat.com]
<br>Received: Monday, 21 Jul 2014, 10:41AM
<br>To: Luis Pabon [lpabon@redhat.com]
<br>CC: Anders Blomdell [anders.blomdell@control.lth.se]; gluster-devel@gluster.org
<br>Subject: Re: [Gluster-devel] Cmockery2 in GlusterFS
<br>
<br></div><br><div>On Mon, Jul 21, 2014 at 04:27:18PM +0200, Anders Blomdell wrote:
<br>&gt; On 2014-07-21 16:17, Anders Blomdell wrote:
<br>&gt; &gt; On 2014-07-20 16:01, Niels de Vos wrote:
<br>&gt; &gt;&gt; On Fri, Jul 18, 2014 at 02:52:18PM -0400, Luis Pabón wrote:
<br>&gt; &gt;&gt;&gt; Hi all,
<br>&gt; &gt;&gt;&gt; &nbsp; &nbsp; A few months ago, the unit test framework based on cmockery2 was
<br>&gt; &gt;&gt;&gt; in the repo for a little while, then removed while we improved the
<br>&gt; &gt;&gt;&gt; packaging method. &nbsp;Now support for cmockery2 (
<br>&gt; &gt;&gt;&gt; <a href="http://review.gluster.org/#/c/7538/">http://review.gluster.org/#/c/7538/</a> ) has been merged into the repo
<br>&gt; &gt;&gt;&gt; again. &nbsp;This will most likely require you to install cmockery2 on
<br>&gt; &gt;&gt;&gt; your development systems by doing the following:
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; * Fedora/EPEL:
<br>&gt; &gt;&gt;&gt; $ sudo yum -y install cmockery2-devel
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; * All other systems please visit the following page: <a href="https://github.com/lpabon/cmockery2/blob/master/doc/usage.md#installation">https://github.com/lpabon/cmockery2/blob/master/doc/usage.md#installation</a>
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; Here is also some information about Cmockery2 and how to use it:
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; * Introduction to Unit Tests in C Presentation:
<br>&gt; &gt;&gt;&gt; <a href="http://slides-lpabon.rhcloud.com/feb24_glusterfs_unittest.html#/">http://slides-lpabon.rhcloud.com/feb24_glusterfs_unittest.html#/</a>
<br>&gt; &gt;&gt;&gt; * Cmockery2 Usage Guide:
<br>&gt; &gt;&gt;&gt; <a href="https://github.com/lpabon/cmockery2/blob/master/doc/usage.md">https://github.com/lpabon/cmockery2/blob/master/doc/usage.md</a>
<br>&gt; &gt;&gt;&gt; * Using Cmockery2 with GlusterFS: <a href="https://github.com/gluster/glusterfs/blob/master/doc/hacker-guide/en-US/markdown/unittest.md">https://github.com/gluster/glusterfs/blob/master/doc/hacker-guide/en-US/markdown/unittest.md</a>
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt;
<br>&gt; &gt;&gt;&gt; When starting out writing unit tests, I would suggest writing unit
<br>&gt; &gt;&gt;&gt; tests for non-xlator interface files when you start. &nbsp;Once you feel
<br>&gt; &gt;&gt;&gt; more comfortable writing unit tests, then move to writing them for
<br>&gt; &gt;&gt;&gt; the xlators interface files.
<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt; Awesome, many thanks! I'd like to add some unittests for the RPC and NFS
<br>&gt; &gt;&gt; layer. Several functions (like ip-address/netmask matching for ACLs) 
<br>&gt; &gt;&gt; look very suitable.
<br>&gt; &gt;&gt;
<br>&gt; &gt;&gt; Did you have any particular functions in mind that you would like to see 
<br>&gt; &gt;&gt; unittests for? If so, maybe you can file some bugs for the different 
<br>&gt; &gt;&gt; tests so that we won't forget about it? Depending on the tests, these 
<br>&gt; &gt;&gt; bugs may get the EasyFix keyword if there is a clear description and 
<br>&gt; &gt;&gt; some pointers to examples.
<br>&gt; &gt; 
<br>&gt; &gt; Looks like parts of cmockery was forgotten in glusterfs.spec.in:
<br>&gt; &gt; 
<br>&gt; &gt; # rpm -q -f &nbsp;`which gluster`
<br>&gt; &gt; glusterfs-cli-3.7dev-0.9.git5b8de97.fc20.x86_64
<br>&gt; &gt; # ldd `which gluster`
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;linux-vdso.so.1 =&gt; &nbsp;(0x00007ffff4dfe000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libglusterfs.so.0 =&gt; /lib64/libglusterfs.so.0 (0x00007fe034cc4000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libreadline.so.6 =&gt; /lib64/libreadline.so.6 (0x00007fe034a7d000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libncurses.so.5 =&gt; /lib64/libncurses.so.5 (0x00007fe034856000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libtinfo.so.5 =&gt; /lib64/libtinfo.so.5 (0x00007fe03462c000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libgfxdr.so.0 =&gt; /lib64/libgfxdr.so.0 (0x00007fe034414000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libgfrpc.so.0 =&gt; /lib64/libgfrpc.so.0 (0x00007fe0341f8000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libxml2.so.2 =&gt; /lib64/libxml2.so.2 (0x00007fe033e8f000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libz.so.1 =&gt; /lib64/libz.so.1 (0x00007fe033c79000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libm.so.6 =&gt; /lib64/libm.so.6 (0x00007fe033971000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libdl.so.2 =&gt; /lib64/libdl.so.2 (0x00007fe03376d000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libcmockery.so.0 =&gt; not found
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x00007fe03354f000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libcrypto.so.10 =&gt; /lib64/libcrypto.so.10 (0x00007fe033168000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libc.so.6 =&gt; /lib64/libc.so.6 (0x00007fe032da9000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libcmockery.so.0 =&gt; not found
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libcmockery.so.0 =&gt; not found
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;libcmockery.so.0 =&gt; not found
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;liblzma.so.5 =&gt; /lib64/liblzma.so.5 (0x00007fe032b82000)
<br>&gt; &gt; &nbsp; &nbsp; &nbsp;/lib64/ld-linux-x86-64.so.2 (0x00007fe0351f1000)
<br>&gt; &gt; 
<br>&gt; &gt; Should I file a bug report or could someone on the fast-lane fix this?
<br>&gt; My bad (installation with --nodeps --force :-()
<br>
<br>Actually, I was not expecting a dependency on cmockery2. My 
<br>understanding was that only some temporary test-applications would be 
<br>linked with libcmockery and not any binaries that would get packaged in 
<br>the RPMs.
<br>
<br>Luis, could you clarify that?
<br>
<br>Thanks,
<br>Niels
<br></div></body></html>