lkml.org 
[lkml]   [2012]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 05/12] rbtree: performance and correctness test
On Thu, 12 Jul 2012 17:31:50 -0700
Michel Lespinasse <walken@google.com> wrote:

> This small module helps measure the performance of rbtree insert and erase.
>
> Additionally, we run a few correctness tests to check that the rbtrees have
> all desired properties:
> - contains the right number of nodes in the order desired,
> - never two consecutive red nodes on any path,
> - all paths to leaf nodes have the same number of black nodes,
> - root node is black
>
> Signed-off-by: Michel Lespinasse <walken@google.com>
> ---
> Makefile | 2 +-
> lib/Kconfig.debug | 1 +
> tests/Kconfig | 18 +++++++
> tests/Makefile | 1 +
> tests/rbtree_test.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++

This patch does a new thing: adds a kernel self-test module into
lib/tests/ and sets up the infrastructure to add new kernel self-test
modules in that directory.

I don't see a problem with this per-se, but it is a new thing which we
should think about.

In previous such cases (eg, kernel/rcutorture.c) we put those modules
into the same directory as the code which is being tested. So to
follow that pattern, this new code would have gone into lib/.

If we adopt your new proposal then we should perhaps also move tests
such as rcutorture over into tests/. And that makes one wonder whether
we should have a standalone directory for kernel selftest modules. eg
tests/self-test-nmodules/.



\
 
 \ /
  Last update: 2012-07-13 23:01    [W:0.416 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site