Add search begin key test
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Jun 2011 13:42:04 +0000 (09:42 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Jun 2011 13:42:04 +0000 (09:42 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_rbtree.c

index f11046287711f6e025fdf60ab4b5f84681932da9..1e7445d3081f53330e2430d9186e5d94a9687c4c 100644 (file)
@@ -257,7 +257,7 @@ void *thr_reader(void *_count)
                        assert(!rcu_rbtree_is_nil(&rbtree, node));
                        rcu_read_unlock();
                }
-#if 0
+
                /* search range */
                for (i = 0; i < global_items; i++) {
                        rcu_read_lock();
@@ -268,7 +268,17 @@ void *thr_reader(void *_count)
                        assert(!rcu_rbtree_is_nil(&rbtree, node));
                        rcu_read_unlock();
                }
-#endif //0
+
+               /* search begin key */
+               for (i = 0; i < global_items; i++) {
+                       rcu_read_lock();
+                       node = rcu_rbtree_search_begin_key(&rbtree,
+                                                rcu_dereference(rbtree.root),
+                                                global_key[i]);
+                       assert(!rcu_rbtree_is_nil(&rbtree, node));
+                       rcu_read_unlock();
+               }
+
                /* min + next */
                memset(lookup_hit, 0, sizeof(*lookup_hit) * global_items);
 
This page took 0.028123 seconds and 4 git commands to generate.