From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 05 Aug 2016 07:54:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,474,1464678000"; d="scan'208";a="1035764150" Received: from rhorton-mobl.ger.corp.intel.com (HELO [163.33.228.104]) ([163.33.228.104]) by fmsmga002.fm.intel.com with ESMTP; 05 Aug 2016 07:54:01 -0700 To: Neil Horman 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> Cc: Yerden Zhumabekov , "Doherty, Declan" , Thomas Monjalon , "dev@dpdk.org" From: Remy Horton Organization: Intel Shannon Limited Message-ID: Date: Fri, 5 Aug 2016 15:54:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20160805125952.GA22528@hmsreliant.think-freely.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC 0/4] Use Google Test as DPDK unit test framework 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: Fri, 05 Aug 2016 14:54:04 -0000 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