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: Wed, 3 Aug 2016 10:16:53 +0100 Message-ID: References: <1470170269-20721-1-git-send-email-declan.doherty@intel.com> <5511822.hGlaykcsx3@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon , Declan Doherty Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 175F82C0C for ; Wed, 3 Aug 2016 11:16:55 +0200 (CEST) In-Reply-To: <5511822.hGlaykcsx3@xps13> 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 02/08/2016 22:52, Thomas Monjalon wrote: > 2016-08-02 21:37, Declan Doherty: [..] > You are not advocating but the unit test must be written in C++. > I don't think it is a good idea to force people to write and maintain the tests > in a different language than the code it tests. In principle I agree, but in practice I don't see any alternative. All the purely C-based frameworks I've (independently of Declan) tried don't have the same flexibility as the C++ ones. > It would be interesting to better describe in details what is missing currently > and what such a framework can bring. > (I agree there is a huge room for improvements on unit tests) From my own perspective, mocking of functions is the main thing that is missing. When testing KeepAlive this allowed me to reroute rte_malloc() calls to the OS malloc() rather than having to startup/teardown the hugepage subsystem. ..Remy