All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gow <davidgow@google.com>
To: Rae Moar <rmoar@google.com>
Cc: shuah@kernel.org, dlatypov@google.com, brendan.higgins@linux.dev,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org, keescook@chromium.org,
	linux-hardening@vger.kernel.org, jstultz@google.com,
	tglx@linutronix.de, sboyd@kernel.org
Subject: Re: [RFC v1 5/6] kunit: memcpy: Mark tests as slow using test attributes
Date: Sat, 10 Jun 2023 16:29:30 +0800	[thread overview]
Message-ID: <CABVgOSkKYzynFcAdSKbdbVjL0bYnXtgM8XbkkRc2+9mef1wCzQ@mail.gmail.com> (raw)
In-Reply-To: <20230610005149.1145665-6-rmoar@google.com>

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

On Sat, 10 Jun 2023 at 08:52, Rae Moar <rmoar@google.com> wrote:
>
> Mark slow memcpy KUnit tests using test attributes.
>
> Tests marked as slow are as follows: memcpy_large_test, memmove_test,
> memmove_large_test, and memmove_overlap_test.
>
> These tests were the slowest of the memcpy tests and relatively slower to
> most other KUnit tests. Most of these tests are already skipped when
> CONFIG_MEMCPY_SLOW_KUNIT_TEST is not enabled.

I assume the plan will be to eventually remove the
CONFIG_MEMCPY_SLOW_KUNIT_TEST option and just rely on the "speed"
attribute to filter these out. That has the disadvantage that the
tests will still be built, but is probably the nicer long-term
solution.

I suppose we could remove it in this patch, too, but I suspect it
makes more sense to have a deprecation period to make sure the
attributes are working well. That being said, maybe add a note to the
CONFIG_MEMCPY_SLOW_KUNIT_TEST help text to advertise this?


>
> These tests can now be filtered on using the KUnit test attribute filtering
> feature. Example: --filter "speed>slow". This will run only the tests that
> have speeds faster than slow. The slow attribute will also be outputted in
> KTAP.
>
> Signed-off-by: Rae Moar <rmoar@google.com>
> ---
>  lib/memcpy_kunit.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/memcpy_kunit.c b/lib/memcpy_kunit.c
> index 887926f04731..440aee705ccc 100644
> --- a/lib/memcpy_kunit.c
> +++ b/lib/memcpy_kunit.c
> @@ -551,10 +551,10 @@ static void strtomem_test(struct kunit *test)
>  static struct kunit_case memcpy_test_cases[] = {
>         KUNIT_CASE(memset_test),
>         KUNIT_CASE(memcpy_test),
> -       KUNIT_CASE(memcpy_large_test),
> -       KUNIT_CASE(memmove_test),
> -       KUNIT_CASE(memmove_large_test),
> -       KUNIT_CASE(memmove_overlap_test),
> +       KUNIT_CASE_SLOW(memcpy_large_test),
> +       KUNIT_CASE_SLOW(memmove_test),
> +       KUNIT_CASE_SLOW(memmove_large_test),
> +       KUNIT_CASE_SLOW(memmove_overlap_test),
>         KUNIT_CASE(strtomem_test),
>         {}
>  };
> --
> 2.41.0.162.gfafddb0af9-goog
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]

  reply	other threads:[~2023-06-10  8:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-10  0:51 [RFC v1 0/6] kunit: Add test attributes API Rae Moar
2023-06-10  0:51 ` [RFC v1 1/6] kunit: Add test attributes API structure Rae Moar
2023-06-10  8:29   ` David Gow
2023-06-13 20:36     ` Rae Moar
2023-06-10  0:51 ` [RFC v1 2/6] kunit: Add speed attribute Rae Moar
2023-06-10  3:13   ` kernel test robot
2023-06-10  8:29   ` David Gow
2023-06-13 20:37     ` Rae Moar
2023-06-10  0:51 ` [RFC v1 3/6] kunit: Add ability to filter attributes Rae Moar
2023-06-10  3:57   ` kernel test robot
2023-06-10  8:29   ` David Gow
2023-06-13 20:42     ` Rae Moar
2023-06-13 20:26   ` Kees Cook
2023-06-13 20:58     ` Rae Moar
2023-06-10  0:51 ` [RFC v1 4/6] kunit: tool: Add command line interface to filter and report attributes Rae Moar
2023-06-10  8:29   ` David Gow
2023-06-13 20:44     ` Rae Moar
2023-06-10  0:51 ` [RFC v1 5/6] kunit: memcpy: Mark tests as slow using test attributes Rae Moar
2023-06-10  8:29   ` David Gow [this message]
2023-06-13 20:44     ` Rae Moar
2023-06-10  0:51 ` [RFC v1 6/6] kunit: time: Mark test " Rae Moar
2023-06-10  8:29 ` [RFC v1 0/6] kunit: Add test attributes API David Gow
2023-06-13 20:34   ` Rae Moar

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=CABVgOSkKYzynFcAdSKbdbVjL0bYnXtgM8XbkkRc2+9mef1wCzQ@mail.gmail.com \
    --to=davidgow@google.com \
    --cc=brendan.higgins@linux.dev \
    --cc=dlatypov@google.com \
    --cc=jstultz@google.com \
    --cc=keescook@chromium.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=rmoar@google.com \
    --cc=sboyd@kernel.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    /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.