Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5F0B101E2 for ; Thu, 23 May 2024 22:37:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716503857; cv=none; b=R6tYEfbZRscmqnONlyJAlsObdPSwljXTl7ByTUdB986pDxssTOEw1tBs0mowNJ3uHC0s1odrNTPFIPbT3NiaJev2rT/RfrCzCIg+cKKjePzeo/PLzGs3+Zzwd6N0ho0vw1H2E/3qGgJ3aC5BwwR0P4fdt7HLZmMA23+vyKxCzW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716503857; c=relaxed/simple; bh=fV+E1ZxPVpWuwoJEnDFXOysaN+f6bqNJAG5Lqjz9a6c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AKedasKTEDkSTQ7FriN/ex466MP5WQJm4h6T0g5fYMYIjHHhVCYu1bAUdwgtcIPZFDI6NJwbrjTpTKdya/Y62PpwnselqBNhZPTV086AiBu1rMOVyqM677BPn0lZ3l3BD5y/Vt0/Shv8h1qfYrT7XYkC1ZhUMR96EImiHV83c/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=TrojKUrD; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="TrojKUrD" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=eQRij/ulwyfQdfiSRpbr+abzjlbRwlXBSg0kOjxBanU=; b=TrojKUrDV+IpVT/64i6wKyhCnS YtF1Se03qnXQpoSt2+61pSG76MdczgupntuuLZhrTcyqL0n4c5U21w6KBOdI3t24N/xfO8B4B6SPC 2/lamfm+zdQjipA1pxNdobByZpplrsFH8QN9GCgGnkiQNTnCvps56AaWNBLP8Em5E+QuQeGDVdt6L Y7JP+ylvrMZe4A4lvdHd5fhipBzY2D/MFP8+4ucbZ4uXHBCYFKdiS+bWwOHkKG9s1dy5sA57Zvb1b ix4/40i+K2US4EtKHE6GSMaa/M2fH+WMqA+Be7prd8qeMFeWkEH+QDZuOV+B7uyCo/glXVuRo3t4Z BfT0/JyQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sAH3y-00000007Tbi-1oQK; Thu, 23 May 2024 22:37:30 +0000 Date: Thu, 23 May 2024 15:37:30 -0700 From: Luis Chamberlain To: Jan Kara Cc: mgorman@suse.de, vbabka@suse.cz, dave@stgolabs.net, ziy@nvidia.com, ryan.roberts@arm.com, kdevops@lists.linux.dev, p.raghav@samsung.com, da.gomez@samsung.com Subject: Re: [RFT 1/2] MMTests::Stat: replace List::BinarySearch Message-ID: References: <20240319044621.2682968-1-mcgrof@kernel.org> <20240319044621.2682968-2-mcgrof@kernel.org> <20240320183714.bp7hgrxgn5tm4bm3@quack3> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240320183714.bp7hgrxgn5tm4bm3@quack3> Sender: Luis Chamberlain On Wed, Mar 20, 2024 at 07:37:14PM +0100, Jan Kara wrote: > On Mon 18-03-24 21:46:19, Luis Chamberlain wrote: > > List::BinarySearch is ancient and has a few issues: > > > > a) The project hasnt't received any updates since 2018 > > b) It's licensed under GPLv1 or Artistica v1 license which are > > not compatible with GPLv2 > > c) Some distributions don't carry a package for it > > > > Debian in particular doesn't have it anymore. I looked at the code > > and was bewildered with the amount of insane hacks to support ancient > > versions of perl and to also support running our custom comparison > > routine. > > > > All the above challenges seem silly to deal with on users if we can > > just implement what we need and call it a day. So let's do that, and > > also add unit tests for mmtests while at it, setting a set of a few > > examples we can easily grow. > > > > While at it use SPDX license identifiers to simplify license clarity > > just as we have in the kernel. The same SPDX tag is already upstream > > on Linux. We can expand on this to keep things simpler later. > > > > Signed-off-by: Luis Chamberlain > > I agree the module is probably not worth the hassle so I agree with > replacing it. But given we need this only from Stat module, I just would > not bother with BinarySearch.pm you introduce and place the two functions > directly in Stat. Sure thing, I'll do that in my next v2. > Also I'm not sure we really need a testing framework for > this :) (I'll defer to Mel for final decision on this though). We can add that later if we want, I'll drop it for now and move that test cases to prove correctness and equivalence compatibility with the old library to its own repository. That was a lot more work than I expected... but its let's us now have *one* set of unit tests to prove the code works exactly the same with the old library and thew new replacement code with *one* set of unit tests outside of mmtests. I'll send a v2 shortly. Luis