public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Jan Kara <jack@suse.cz>
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
Date: Thu, 23 May 2024 15:37:30 -0700	[thread overview]
Message-ID: <Zk_FKp3ZLRWDipYC@bombadil.infradead.org> (raw)
In-Reply-To: <20240320183714.bp7hgrxgn5tm4bm3@quack3>

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 <mcgrof@kernel.org>
> 
> 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

  reply	other threads:[~2024-05-23 22:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19  4:46 [mmtests RFT 0/2] fix debian dependencies Luis Chamberlain
2024-03-19  4:46 ` [RFT 1/2] MMTests::Stat: replace List::BinarySearch Luis Chamberlain
2024-03-20 18:37   ` Jan Kara
2024-05-23 22:37     ` Luis Chamberlain [this message]
2024-03-19  4:46 ` [RFT 2/2] bin/install-depends: call ldconfig Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zk_FKp3ZLRWDipYC@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=da.gomez@samsung.com \
    --cc=dave@stgolabs.net \
    --cc=jack@suse.cz \
    --cc=kdevops@lists.linux.dev \
    --cc=mgorman@suse.de \
    --cc=p.raghav@samsung.com \
    --cc=ryan.roberts@arm.com \
    --cc=vbabka@suse.cz \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox