Subject: + rbtree_test-add-test-for-postorder-iteration.patch added to -mm tree To: cody@xxxxxxxxxxxxxxxxxx,David.Woodhouse@xxxxxxxxx,riel@xxxxxxxxxx,sjenning@xxxxxxxxxxxxxxxxxx,walken@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 29 Jul 2013 15:43:57 -0700 The patch titled Subject: rbtree_test: add test for postorder iteration has been added to the -mm tree. Its filename is rbtree_test-add-test-for-postorder-iteration.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/rbtree_test-add-test-for-postorder-iteration.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/rbtree_test-add-test-for-postorder-iteration.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Cody P Schafer <cody@xxxxxxxxxxxxxxxxxx> Subject: rbtree_test: add test for postorder iteration Just check that we examine all nodes in the tree for the postorder iteration. Signed-off-by: Cody P Schafer <cody@xxxxxxxxxxxxxxxxxx> Reviewed-by: Seth Jennings <sjenning@xxxxxxxxxxxxxxxxxx> Cc: David Woodhouse <David.Woodhouse@xxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Michel Lespinasse <walken@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/rbtree_test.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff -puN lib/rbtree_test.c~rbtree_test-add-test-for-postorder-iteration lib/rbtree_test.c --- a/lib/rbtree_test.c~rbtree_test-add-test-for-postorder-iteration +++ a/lib/rbtree_test.c @@ -114,6 +114,16 @@ static int black_path_count(struct rb_no return count; } +static void check_postorder(int nr_nodes) +{ + struct rb_node *rb; + int count = 0; + for (rb = rb_first_postorder(&root); rb; rb = rb_next_postorder(rb)) + count++; + + WARN_ON_ONCE(count != nr_nodes); +} + static void check(int nr_nodes) { struct rb_node *rb; @@ -136,6 +146,8 @@ static void check(int nr_nodes) WARN_ON_ONCE(count != nr_nodes); WARN_ON_ONCE(count < (1 << black_path_count(rb_last(&root))) - 1); + + check_postorder(nr_nodes); } static void check_augmented(int nr_nodes) _ Patches currently in -mm which might be from cody@xxxxxxxxxxxxxxxxxx are mm-page_alloc-restructure-free-page-stealing-code-and-fix-a-bug.patch mm-page_alloc-restructure-free-page-stealing-code-and-fix-a-bug-fix.patch mm-fix-the-value-of-fallback_migratetype-in-alloc_extfrag-tracepoint.patch rbtree-add-postorder-iteration-functions.patch rbtree-add-rbtree_postorder_for_each_entry_safe-helper.patch rbtree_test-add-test-for-postorder-iteration.patch rbtree-allow-tests-to-run-as-builtin.patch mm-zswap-use-postorder-iteration-when-destroying-rbtree.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html