All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: keyrings@vger.kernel.org,
	Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <david@davidgow.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rae Moar <raemoar63@gmail.com>,
	Ryota Sakamoto <sakamo.ryota@gmail.com>,
	Kuan-Wei Chiu <visitorckw@gmail.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	Kir Chou <note351@hotmail.com>, Petr Mladek <pmladek@suse.com>,
	Dmitry Antipov <dmantipov@yandex.ru>,
	Guan-Chun Wu <409411716@gms.tku.edu.tw>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:KERNEL UNIT TESTING FRAMEWORK (KUnit)"
	<linux-kselftest@vger.kernel.org>,
	"open list:KERNEL UNIT TESTING FRAMEWORK (KUnit)"
	<kunit-dev@googlegroups.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] lib/tests: kunit for associative array
Date: Wed, 14 Oct 2026 18:35:50 +0200	[thread overview]
Message-ID: <20261014163550.GA327771@quark> (raw)
In-Reply-To: <20261014160144.1835860-1-jarkko@kernel.org>

On Wed, Oct 14, 2026 at 07:01:38PM +0300, Jarkko Sakkinen wrote:
> This is a kunit test for lib/assoc_array.c, which maintains a shadow model
> across assoc_array operations, and checks its integrity after every
> operation.
> 
> I wrote a draft version so that I could properly test 'assoc-array-fixes'
> tag at Linus' tree, and spent today rewriting a new more polished version
> with as good description as I could possibly could on how the seeded test
> keys were cherry-picked. Along the way I also tweaked the numbers to be
> a bit less messier set than in my original version.
> 
> The transcripts that follow were executed with this command-line:
> 
>     ./tools/testing/kunit/kunit.py run --raw_output assoc_array
> 
> With 'assoc-array-fixes' commits and its subsequent tag iterations all
> eight tests pass, and without them all of them fail.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>

Would this effort (and Linus's effort) be better spent on converting
keyrings to use an rhashtable?

keyrings is the only user of assoc_array.  So if it's made to use
something else, assoc_array (all 1724 lines of it!) can just be deleted.

I understand assoc_array.c was intended to be for general use.  But
clearly that hasn't happened in the 13 years it's been in the kernel.
Keyrings has always been its only user.  All other kernel code needing a
map data structure uses something else.

- Eric

  reply	other threads:[~2026-10-14 16:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 16:01 [PATCH] lib/tests: kunit for associative array Jarkko Sakkinen
2026-10-14 16:35 ` Eric Biggers [this message]
2026-10-14 16:56   ` Jarkko Sakkinen
2026-10-14 17:03     ` Jarkko Sakkinen
2026-10-14 17:32       ` Jarkko Sakkinen
2026-10-14 17:01   ` Linus Torvalds

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=20261014163550.GA327771@quark \
    --to=ebiggers@kernel.org \
    --cc=409411716@gms.tku.edu.tw \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brendan.higgins@linux.dev \
    --cc=david@davidgow.net \
    --cc=dmantipov@yandex.ru \
    --cc=jarkko@kernel.org \
    --cc=keyrings@vger.kernel.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=note351@hotmail.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=pmladek@suse.com \
    --cc=raemoar63@gmail.com \
    --cc=sakamo.ryota@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=visitorckw@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.