From mboxrd@z Thu Jan 1 00:00:00 1970 From: Remy Horton Subject: Re: [RFC 0/4] Use Google Test as DPDK unit test framework Date: Fri, 5 Aug 2016 15:54:00 +0100 Message-ID: References: <1470170269-20721-1-git-send-email-declan.doherty@intel.com> <5511822.hGlaykcsx3@xps13> <345C63BAECC1AD42A2EC8C63AFFC3ADC2829180F@irsmsx105.ger.corp.intel.com> <20160805125952.GA22528@hmsreliant.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Yerden Zhumabekov , "Doherty, Declan" , Thomas Monjalon , "dev@dpdk.org" To: Neil Horman Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A0CA82951 for ; Fri, 5 Aug 2016 16:54:03 +0200 (CEST) In-Reply-To: <20160805125952.GA22528@hmsreliant.think-freely.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 05/08/2016 13:59, Neil Horman wrote: > On Fri, Aug 05, 2016 at 10:11:56AM +0100, Remy Horton wrote: [..] >> Cmocka's mocking relies on Gnu ld's --wrap feature, which has problems if >> the function being mocked is defined in the same compilation unit that it is >> used. Pity really as otherwise it looked quite good to me. >> > Can't you use ld's --undefined option to get the correct behavior? I thought > that was specifically what it was there for. Not sure - I'll try playing around with it when I next have some spare time.. :) The C-Mock extension (https://github.com/hjagodzinski/C-Mock) for GMock uses some dynamic linker trickery which I'm guessing is probably not C++ specific, and I quite like that approach as it avoids the need to pre-specify in makefiles which functions are to be mocked. ..Remy