[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFd5g44suSKUDXhAh6CNewGeg00BDJurYNMyY4vaAsaEZ1puWQ@mail.gmail.com>
Date: Thu, 5 Aug 2021 11:14:47 -0700
From: Brendan Higgins <brendanhiggins@...gle.com>
To: David Gow <davidgow@...gle.com>
Cc: Shuah Khan <skhan@...uxfoundation.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Daniel Latypov <dlatypov@...gle.com>,
Rae Moar <rmoar@...gle.com>, kunit-dev@...glegroups.com,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] kunit: Print test statistics on failure
On Tue, Aug 3, 2021 at 10:08 PM David Gow <davidgow@...gle.com> wrote:
>
> When a number of tests fail, it can be useful to get higher-level
> statistics of how many tests are failing (or how many parameters are
> failing in parameterised tests), and in what cases or suites. This is
> already done by some non-KUnit tests, so add support for automatically
> generating these for KUnit tests.
>
> This change adds a 'kunit.stats_enabled' switch which has three values:
> - 0: No stats are printed (current behaviour)
> - 1: Stats are printed only for tests/suites with more than one
> subtest (new default)
> - 2: Always print test statistics
>
> For parameterised tests, the summary line looks as follows:
> " # inode_test_xtimestamp_decoding: pass:16 fail:0 skip:0 total:16"
> For test suites, there are two lines looking like this:
> "# ext4_inode_test: pass:1 fail:0 skip:0 total:1"
> "# Totals: pass:16 fail:0 skip:0 total:16"
>
> The first line gives the number of direct subtests, the second "Totals"
> line is the accumulated sum of all tests and test parameters.
>
> This format is based on the one used by kselftest[1].
>
> [1]: https://elixir.bootlin.com/linux/latest/source/tools/testing/selftests/kselftest.h#L109
>
> Signed-off-by: David Gow <davidgow@...gle.com>
This looks great, David!
My only suggestion, can you maybe provide a sample of the TAP output
with your change running on the thread? I think it looks great, but I
imagine that it has the potential of being more interesting to people
other than you, Daniel, and myself rather than the actual code change.
(To be clear, I think the summary and the code both look good, IMO.)
Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>
Cheers!
Powered by blists - more mailing lists