[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFd5g44JgvUBZteUY=KVCiiD+yu1DtYE+phm4R4uxcH7N22Ffw@mail.gmail.com>
Date: Mon, 30 Nov 2020 14:13:51 -0800
From: Brendan Higgins <brendanhiggins@...gle.com>
To: Daniel Latypov <dlatypov@...gle.com>
Cc: David Gow <davidgow@...gle.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v2] Documentation: kunit: provide guidance for testing
many inputs
On Mon, Nov 23, 2020 at 2:59 PM Daniel Latypov <dlatypov@...gle.com> wrote:
>
> usage.rst goes into a detailed section about faking out classes, but
> currently lacks wording about how one might idiomatically test a range
> of inputs.
>
> Add a new chapter for "Common Patterns" and group "Isolating behvaior"
> and this new section under there.
>
> Give an example of how one might test a hash function via macros/helper
> funcs and a table-driven test and very briefly discuss pros and cons.
>
> Also highlight the KUNIT_EXPECT_*_MSG() variants (that aren't mentioned
> elsewhere [1]) which are particularly useful in these situations.
>
> It is also criminally underused at the moment, only appearing in 2
> tests (both written by people involved in KUnit).
>
> [1] not even on
> https://www.kernel.org/doc/html/latest/dev-tools/kunit/api/test.html
>
> Signed-off-by: Daniel Latypov <dlatypov@...gle.com>
Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>
Powered by blists - more mailing lists