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: <CAGS_qxqQWVmmgou9rg-KdfuN9aj+mcjFUh5y8AEyvunUcn9hOQ@mail.gmail.com>
Date:   Wed, 25 Aug 2021 18:36:24 -0700
From:   Daniel Latypov <dlatypov@...gle.com>
To:     Isabella Basso <isabellabdoamaral@....br>
Cc:     linux@...encehorizons.net, geert@...ux-m68k.org,
        ferreiraenzoa@...il.com, augusto.duraes33@...il.com,
        brendanhiggins@...gle.com, davidgow@...gle.com,
        linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
        kunit-dev@...glegroups.com, ~lkcamp/patches@...ts.sr.ht,
        rodrigosiqueiramelo@...il.com
Subject: Re: [PATCH 0/6] test_hash.c: refactor into KUnit

On Wed, Aug 25, 2021 at 6:26 PM Isabella Basso <isabellabdoamaral@....br> wrote:
>
> We refactored the lib/test_hash.c file into KUnit as part of the student
> group LKCAMP [1] introductory hackathon for kernel development.
>
> This test was pointed to our group by Daniel Latypov [2], so its full

Oh, I hope I didn't lead you down a rabbit hole.

I just looked and saw that it used pr_info()'s to show that it was
skipping some stuff.
And I thought the new SKIP test support in 5.14 was something y'all
might not have been aware of, so I pointed to it as a motivating
example to rebase to get the latest KUnit patches.

I didn't do my homework and look into the test to see how suitable or
not it was for KUnit.
But I'll try and find some time soon to go over and review at the
KUnit parts of this patch series.

> conversion into a pure KUnit test was our goal in this patch series, but
> we ran into many problems relating to it not being split as unit tests,
> which complicated matters a bit, as the reasoning behind the original
> tests is quite cryptic for those unfamiliar with hash implementations.
>
> Some interesting developments we'd like to highlight are:
>
> - In patch 1/6 we noticed that there was an unused define directive that
>   could be removed.
> - In patch 5/6 we noticed how stringhash and hash tests are all under
>   the lib/test_hash.c file, which might cause some confusion, and we
>   also broke those kernel config entries up.
>
> Overall KUnit developments have been made in the other patches in this
> series:
>
> In patches 2/6 through 4/6 and 6/6 we refactored the lib/test_hash.c
> file so as to make it more compatible with the KUnit style, whilst
> preserving the original idea of the maintainer who designed it (i.e.
> George Spelvin), which might be undesirable for unit tests, but we
> assume it is enough for a first patch.
>
> This is our first patch series so we hope our contributions are
> interesting and also hope to get some useful criticism from the
> community :)
>
> [1] - https://lkcamp.dev/
> [2] - https://lore.kernel.org/linux-kselftest/CAGS_qxojszgM19u=3HLwFgKX5bm5KhywvsSunuBAt5RtR+GyxQ@mail.gmail.com/
>
> Isabella Basso (6):
>   hash.h: remove unused define directive
>   test_hash.c: move common definitions to top of file
>   test_hash.c: split test_int_hash into arch-specific functions
>   test_hash.c: split test_hash_init
>   lib/Kconfig.debug: properly split hash test kernel entries
>   test_hash.c: refactor into kunit
>
>  include/linux/hash.h       |   5 +-
>  lib/Kconfig.debug          |  28 ++++-
>  lib/Makefile               |   3 +-
>  lib/test_hash.c            | 249 ++++++++++++++++---------------------
>  tools/include/linux/hash.h |   5 +-
>  5 files changed, 136 insertions(+), 154 deletions(-)
>
> --
> 2.33.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ