From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752583AbcGGRnj (ORCPT ); Thu, 7 Jul 2016 13:43:39 -0400 Received: from smtp08.smtpout.orange.fr ([80.12.242.130]:51994 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbcGGRnd (ORCPT ); Thu, 7 Jul 2016 13:43:33 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Thu, 07 Jul 2016 19:43:31 +0200 X-ME-IP: 90.38.169.64 From: Robert Jarzmik To: Mark Brown Cc: "Franklin S Cooper Jr." , Andy Shevchenko , david.s.gordon@intel.com, Jens Axboe , Andrew Morton , Ming Lin , "linux-kernel\@vger.kernel.org" , linux-spi , Sekhar Nori , Peter Ujfalusi Subject: Re: [RFC] [PATCH v2 1/3] scatterlist: Add support to clone scatterlist References: <1467039249-7816-1-git-send-email-fcooper@ti.com> <1467039249-7816-2-git-send-email-fcooper@ti.com> <577D3B5C.7080805@ti.com> <577D5E78.2010307@ti.com> <871t368lu6.fsf@belgarion.home> <20160707080241.GE6247@sirena.org.uk> X-URL: http://belgarath.falguerolles.org/ Date: Thu, 07 Jul 2016 19:43:25 +0200 In-Reply-To: <20160707080241.GE6247@sirena.org.uk> (Mark Brown's message of "Thu, 7 Jul 2016 10:02:41 +0200") Message-ID: <87twg1739e.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mark Brown writes: > On Thu, Jul 07, 2016 at 12:04:33AM +0200, Robert Jarzmik wrote: > >> For these "tricky" cases, at the time I created sg_split I had done a tester as >> well. It's very basic, doesn't cover all the corner cases, is a bit dumb, but >> you might have a look, and the brain cost you'll pay to adapt it to test what >> you want will hopefully pay off by the knowledge gained on scatterlist. It is >> appended at the end of the mail. > > Might be worth getting this into the kernel source, under tools/testing > perhaps? Maybe so. I'll try, but I don't trust much my chances of success, given that this tester : - should compile and link in $(TOP)/lib/scatterlist.c, as this is where sg_split() is defined - this implies all its includes - this implies at least these ones : bug.h mm.h scatterlist.h string.h types.h - this implies having page_to_phys and co. defined somewhere without draining the whole include/linux and include/asm* trees For the tester, I had created an apart include/linux tree where all the includes were _manually_ filled in with minimal content. I don't know if an existing selftest had already this kind of problem, ie. having to compile and link a kernel .c file, and that makes me feel this might be difficult to keep a nice standalone tester. Cheers. -- Robert