lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240628151800.bokef4i6n7s4ds42@quentin>
Date: Fri, 28 Jun 2024 15:18:00 +0000
From: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	maple-tree@...ts.infradead.org
Subject: Re: [PATCH v2 3/5] rosebush: Add test suite

On Tue, Jun 25, 2024 at 10:17:58PM +0100, Matthew Wilcox (Oracle) wrote:
> This is not a very sophisticated test suite yet, but it helped find
> a few bugs and provides a framework for adding more tests as more
> bugs are found.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> ---
>  lib/Kconfig.debug   |   3 +
>  lib/Makefile        |   1 +
>  lib/test_rosebush.c | 140 ++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 144 insertions(+)
>  create mode 100644 lib/test_rosebush.c
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 59b6765d86b8..f3cfd79d8dbd 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -2447,6 +2447,9 @@ config TEST_RHASHTABLE
>  
>  	  If unsure, say N.
>  
> +config TEST_ROSEBUSH
> +	tristate "Test the Rosebush data structure"
> +

This needs a `depends on KUNIT`.

And compiling this test as module results in rbh_destroy not found. I
think you missed EXPORT_SYMBOL of rbh_destroy in the previous patch.

>  config TEST_IDA
>  	tristate "Perform selftest on IDA functions"
>  
> +
> +static void check_empty_rbh(struct kunit *test, struct rbh *rbh)
> +{
> +	iter_rbh(test, rbh, 0, NULL);
> +	iter_rbh(test, rbh, 1, NULL);
> +	iter_rbh(test, rbh, 17, NULL);
> +	iter_rbh(test, rbh, 42, NULL);
> +}

Do these hashes hold any significance that you test them often after an
insert?

--
Pankaj

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ