From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id 1130B91BF for ; Thu, 19 May 2016 10:52:52 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3r9PwM5TGRz5N8; Thu, 19 May 2016 10:52:51 +0200 (CEST) Date: Thu, 19 May 2016 10:51:08 +0200 From: Jan Viktorin To: dev@dpdk.org Cc: Thomas Monjalon , David Marchand , Bruce Richardson Message-ID: <20160519105108.3879dd84@pcviktorin.fit.vutbr.cz> In-Reply-To: <1463510101-5633-2-git-send-email-viktorin@rehivetech.com> References: <1463510101-5633-1-git-send-email-viktorin@rehivetech.com> <1463510101-5633-2-git-send-email-viktorin@rehivetech.com> Organization: RehiveTech MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 01/11] app/test: introduce resources for tests 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: Thu, 19 May 2016 08:52:52 -0000 I forgot to fix this: Check patch error: 12817: ERROR: space required after that ',' (ctx:VxV) #244: FILE: app/test/resource.h:93: +static void __attribute__((constructor,used)) resinitfn_ ##n(void) ^ total: 1 errors, 0 warnings, 259 lines checked will do for v4. Jan On Tue, 17 May 2016 20:34:51 +0200 Jan Viktorin wrote: > Certain internal mechanisms of DPDK access different file system structures > (e.g. /sys/bus/pci/devices). It is difficult to test those cases automatically > by a unit test when such path is not hard-coded and there is no simple way how > to distribute fake ones with the current testing environment. > > This patch adds a possibility to declare a resource embedded in the test binary > itself. The structure resource cover the generic situation - it provides a name > for lookup and pointers to the embedded data blob. A resource is registered > in a constructor by the macro REGISTER_RESOURCE. > > Some initial tests of simple resources is included and added into the group_1. > > Signed-off-by: Jan Viktorin > --- > v3: > * fixed doc comments > --- > app/test/Makefile | 2 + > app/test/autotest_data.py | 6 +++ > app/test/resource.c | 66 +++++++++++++++++++++++++++++++ > app/test/resource.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++ > app/test/test_resource.c | 75 ++++++++++++++++++++++++++++++++++++ > 5 files changed, 247 insertions(+) > create mode 100644 app/test/resource.c > create mode 100644 app/test/resource.h > create mode 100644 app/test/test_resource.c [...]