linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] lib/interval_tree: add some test cases and cleanup
@ 2025-03-04  1:19 Wei Yang
  2025-03-04  1:19 ` [PATCH 1/7] lib/rbtree: enable userland test suite for rbtree related data structure Wei Yang
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Wei Yang @ 2025-03-04  1:19 UTC (permalink / raw)
  To: akpm; +Cc: willy, michel, linux-mm, Wei Yang

Originally, I sent an interval tree cleanup[1], but lack of reasonable test.

As Matthew suggested, this patch set includes proper test to exercise the
change in interval tree.

Since rbtree/augmented tree/interval tree share similar data structure,
besides new cases for interval tree, this patch set also does cleanup for
others.

Patch 1: There are test cases as kernel module, this patch enable them in
         userland. This would help for testing and debugging.
Patch 2: Split cases for better reading. And prepare for new cases adding.
Patch 3: Add random seed to cover different situations
Patch 4: Add case for interval_tree_iter_xxx() helper
Patch 5: Add case for span iteration
Patch 6: is the original cleanup
Patch 7: fix the comment of interval_tree_span_iter_next_gap()

[1]: https://lkml.kernel.org/r/20250224022239.21976-1-richard.weiyang@gmail.com

Wei Yang (7):
  lib/rbtree: enable userland test suite for rbtree related data
    structure
  lib/rbtree: split tests
  lib/rbtree: add random seed
  lib/interval_tree: add test case for interval_tree_iter_xxx() helpers
  lib/interval_tree: add test case for span iteration
  lib/interval_tree: skip the check before go to the right subtree
  lib/interval_tree: fix the comment of
    interval_tree_span_iter_next_gap()

 include/linux/interval_tree_generic.h         |   8 +-
 lib/interval_tree.c                           |  12 +-
 lib/interval_tree_test.c                      | 237 ++++++++++++++++--
 lib/rbtree_test.c                             |  30 ++-
 tools/include/asm/timex.h                     |  13 +
 tools/include/linux/bitmap.h                  |  21 ++
 tools/include/linux/container_of.h            |   5 +
 tools/include/linux/math64.h                  |   5 +
 tools/include/linux/moduleparam.h             |   7 +
 tools/include/linux/prandom.h                 |  51 ++++
 tools/include/linux/slab.h                    |   1 +
 tools/lib/bitmap.c                            |  20 ++
 tools/lib/slab.c                              |  16 ++
 tools/testing/rbtree/Makefile                 |  33 +++
 tools/testing/rbtree/interval_tree_test.c     |  58 +++++
 tools/testing/rbtree/rbtree_test.c            |  48 ++++
 tools/testing/rbtree/test.h                   |   4 +
 tools/testing/shared/interval_tree-shim.c     |   5 +
 tools/testing/shared/linux/interval_tree.h    |   7 +
 .../shared/linux/interval_tree_generic.h      |   2 +
 tools/testing/shared/linux/rbtree.h           |   8 +
 tools/testing/shared/linux/rbtree_augmented.h |   7 +
 tools/testing/shared/linux/rbtree_types.h     |   8 +
 tools/testing/shared/rbtree-shim.c            |   6 +
 24 files changed, 583 insertions(+), 29 deletions(-)
 create mode 100644 tools/include/asm/timex.h
 create mode 100644 tools/include/linux/container_of.h
 create mode 100644 tools/include/linux/moduleparam.h
 create mode 100644 tools/include/linux/prandom.h
 create mode 100644 tools/testing/rbtree/Makefile
 create mode 100644 tools/testing/rbtree/interval_tree_test.c
 create mode 100644 tools/testing/rbtree/rbtree_test.c
 create mode 100644 tools/testing/rbtree/test.h
 create mode 100644 tools/testing/shared/interval_tree-shim.c
 create mode 100644 tools/testing/shared/linux/interval_tree.h
 create mode 100644 tools/testing/shared/linux/interval_tree_generic.h
 create mode 100644 tools/testing/shared/linux/rbtree.h
 create mode 100644 tools/testing/shared/linux/rbtree_augmented.h
 create mode 100644 tools/testing/shared/linux/rbtree_types.h
 create mode 100644 tools/testing/shared/rbtree-shim.c

-- 
2.34.1



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-03-07  2:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-04  1:19 [PATCH 0/7] lib/interval_tree: add some test cases and cleanup Wei Yang
2025-03-04  1:19 ` [PATCH 1/7] lib/rbtree: enable userland test suite for rbtree related data structure Wei Yang
2025-03-04  1:46   ` Matthew Wilcox
2025-03-04  3:04     ` Wei Yang
2025-03-04  1:19 ` [PATCH 2/7] lib/rbtree: split tests Wei Yang
2025-03-04  1:19 ` [PATCH 3/7] lib/rbtree: add random seed Wei Yang
2025-03-05  3:05   ` kernel test robot
2025-03-05  9:10     ` Wei Yang
2025-03-06 11:34   ` kernel test robot
2025-03-07  1:55     ` Wei Yang
2025-03-07  2:36   ` kernel test robot
2025-03-04  1:19 ` [PATCH 4/7] lib/interval_tree: add test case for interval_tree_iter_xxx() helpers Wei Yang
2025-03-04  1:19 ` [PATCH 5/7] lib/interval_tree: add test case for span iteration Wei Yang
2025-03-04  1:19 ` [PATCH 6/7] lib/interval_tree: skip the check before go to the right subtree Wei Yang
2025-03-04  1:19 ` [PATCH 7/7] lib/interval_tree: fix the comment of interval_tree_span_iter_next_gap() Wei Yang
2025-03-04 14:12   ` Jason Gunthorpe
2025-03-05  0:57     ` Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox