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: <CAFd5g47dRP9HvsZD3sqzzfbAthNq8gxEdh57owo3CqVHLNOf6w@mail.gmail.com>
Date:   Tue, 3 Dec 2019 09:54:25 -0800
From:   Brendan Higgins <brendanhiggins@...gle.com>
To:     Alan Maguire <alan.maguire@...cle.com>,
        "Theodore Ts'o" <tytso@....edu>, Iurii Zaikin <yzaikin@...gle.com>,
        David Gow <davidgow@...gle.com>
Cc:     "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        KUnit Development <kunit-dev@...glegroups.com>,
        Kees Cook <keescook@...omium.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        catalin.marinas@....com, joe.lawrence@...hat.com,
        penguin-kernel@...ove.sakura.ne.jp, urezki@...il.com,
        andriy.shevchenko@...ux.intel.com,
        Jonathan Corbet <corbet@....net>, adilger.kernel@...ger.ca,
        Luis Chamberlain <mcgrof@...nel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Knut Omang <knut.omang@...cle.com>
Subject: Re: [PATCH v5 linux-kselftest-test 3/6] kunit: allow kunit tests to
 be loaded as a module

On Tue, Dec 3, 2019 at 4:08 AM Alan Maguire <alan.maguire@...cle.com> wrote:
>
> As tests are added to kunit, it will become less feasible to execute
> all built tests together.  By supporting modular tests we provide
> a simple way to do selective execution on a running system; specifying
>
> CONFIG_KUNIT=y
> CONFIG_KUNIT_EXAMPLE_TEST=m
>
> ...means we can simply "insmod example-test.ko" to run the tests.
>
> To achieve this we need to do the following:
>
> o export the required symbols in kunit
> o string-stream tests utilize non-exported symbols so for now we skip
>   building them when CONFIG_KUNIT_TEST=m.
> o support a new way of declaring test suites.  Because a module cannot
>   do multiple late_initcall()s, we provide a kunit_test_suites() macro
>   to declare multiple suites within the same module at once.
> o some test module names would have been too general ("test-test"
>   and "example-test" for kunit tests, "inode-test" for ext4 tests);
>   rename these as appropriate ("kunit-test", "kunit-example-test"
>   and "ext4-inode-test" respectively).
>
> Co-developed-by: Knut Omang <knut.omang@...cle.com>
> Signed-off-by: Knut Omang <knut.omang@...cle.com>
> Signed-off-by: Alan Maguire <alan.maguire@...cle.com>

Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>

> ---
>  fs/ext4/Kconfig                                    |  2 +-
>  fs/ext4/Makefile                                   |  5 ++++
>  fs/ext4/inode-test.c                               |  4 ++-
>  include/kunit/test.h                               | 35 +++++++++++++++-------
>  kernel/sysctl-test.c                               |  4 ++-
>  lib/Kconfig.debug                                  |  4 +--
>  lib/kunit/Kconfig                                  |  4 +--
>  lib/kunit/Makefile                                 | 10 +++++--
>  lib/kunit/assert.c                                 |  8 +++++
>  lib/kunit/{example-test.c => kunit-example-test.c} |  4 ++-
>  lib/kunit/{test-test.c => kunit-test.c}            |  5 ++--
>  lib/kunit/string-stream-test.c                     |  2 +-
>  lib/kunit/test.c                                   |  8 +++++
>  lib/kunit/try-catch.c                              |  2 ++
>  lib/list-test.c                                    |  4 ++-
>  15 files changed, 76 insertions(+), 25 deletions(-)
>  rename lib/kunit/{example-test.c => kunit-example-test.c} (97%)
>  rename lib/kunit/{test-test.c => kunit-test.c} (98%)

Ted, David, and Iurii, can you each review/ack for the bits that each
of you own?

Thanks for all your hard work on this Alan!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ