From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3AFC35477 for ; Fri, 29 Apr 2016 16:42:45 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 29 Apr 2016 07:42:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,552,1455004800"; d="scan'208";a="942902843" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.44]) by orsmga001.jf.intel.com with SMTP; 29 Apr 2016 07:42:28 -0700 Received: by (sSMTP sendmail emulation); Fri, 29 Apr 2016 15:42:27 +0025 Date: Fri, 29 Apr 2016 15:42:27 +0100 From: Bruce Richardson To: Jan Viktorin Cc: dev@dpdk.org, Thomas Monjalon , David Marchand Message-ID: <20160429144226.GA20192@bricha3-MOBL3> References: <1461935496-20367-1-git-send-email-viktorin@rehivetech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461935496-20367-1-git-send-email-viktorin@rehivetech.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [RFC 0/4] Include resources in 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: Fri, 29 Apr 2016 14:42:46 -0000 On Fri, Apr 29, 2016 at 03:11:32PM +0200, Jan Viktorin wrote: > Hello, > > this patch set introduces a mechanism to include a resource (in general a blob) > into the test binary. This allows to make tests less dependent on the target > testing environment. The first use case is testing of PCI bus scan by changing > the hard-coded path (/sys/bus/pci/devices) to something different and provide > a fake tree of devices with the test. It can help with testing of device-tree > parsing as I've proposed in [1] where such mechanism was missing at that time. > I'd like to use such framework for the SoC infra testing as well. > > The patch set introduces a struct resource into the app/test. The resource is > generic to include any kind of binary data. The binary data can be created in > C or linked as an object file (created by objcopy). I am not sure where to > place the objcopy logic and how to perform guessing of the objcopy arguments > as they are pretty non-standard. > > To include a complex resource (a file hierarchy), the last patch implements > an archive extraction logic. So, it is possible to include a tar archive and > unpack it before a test starts. Any ideas how to do this in a better way are > welcome. > > [1] http://comments.gmane.org/gmane.comp.networking.dpdk.devel/36545 > > Regards > Jan Viktorin > Hi Jan, this looks really interesting, especially since just yesterday I was looking at taking the million-entry lpm test routing table out of the C code and into a separate resource file in this case an ini file. In terms of a solution, I'm not convinced of the placing of the blobs inside the test binary. I think a better solution would be to allow the different autotests to take parameters from the commandline, so that the user can specify the path to the file to use for the test. What would be your opinion of such a scheme? /Bruce