Temporarily disable range tests
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Jun 2011 16:45:34 +0000 (12:45 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Jun 2011 16:45:34 +0000 (12:45 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_rbtree.c

index 85a8d7d0b896c454cda1e8ebf21eb9c7a0e70be5..461f43a9c28fd5b1a5ae3b222b91bbd0c4d18ceb 100644 (file)
@@ -257,7 +257,7 @@ void *thr_reader(void *_count)
                        assert(!rcu_rbtree_is_nil(&rbtree, node));
                        rcu_read_unlock();
                }
-
+#if 0
                /* search end of range */
                for (i = 0; i < global_items; i++) {
                        rcu_read_lock();
@@ -278,6 +278,7 @@ 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++) {
@@ -368,13 +369,13 @@ void *thr_writer(void *_count)
 
                for (i = 0; i < NR_RAND; i++) {
                        node = rbtree_alloc();
-                       //key[i] = (void *)(unsigned long)(rand() % 2048);
-                       key[i] = (void *)(unsigned long)((rand() * 4) % 2048);
+                       key[i] = (void *)(unsigned long)(rand() % 2048);
+                       //key[i] = (void *)(unsigned long)((rand() * 4) % 2048);
                        //For more collisions
                        //key[i] = (void *)(unsigned long)(rand() % 6);
                        node->begin = key[i];
+                       node->end = (void *)((unsigned long) key[i] + 1);
                        //node->end = (void *)((unsigned long) key[i] + 4);
-                       node->end = (void *)((unsigned long) key[i] + 4);
                        rcu_read_lock();
                        rcu_rbtree_insert(&rbtree, node);
                        rcu_read_unlock();
@@ -563,13 +564,13 @@ int main(int argc, char **argv)
        /* Insert items looked up by readers */
        for (i = 0; i < global_items; i++) {
                node = rbtree_alloc();
-               global_key[i] = (void *)(unsigned long)((rand() * 4) % 2048);
-               //global_key[i] = (void *)(unsigned long)(rand() % 2048);
+               //global_key[i] = (void *)(unsigned long)((rand() * 4) % 2048);
+               global_key[i] = (void *)(unsigned long)(rand() % 2048);
                //For more collisions
-               global_key[i] = (void *)(unsigned long)(rand() % 6);
+               //global_key[i] = (void *)(unsigned long)(rand() % 6);
                node->begin = global_key[i];
-               //node->end = (void *)((unsigned long) global_key[i] + 1);
-               node->end = (void *)((unsigned long) global_key[i] + 4);
+               node->end = (void *)((unsigned long) global_key[i] + 1);
+               //node->end = (void *)((unsigned long) global_key[i] + 4);
                rcu_rbtree_insert(&rbtree, node);
        }
        rcu_read_unlock();
This page took 0.035362 seconds and 4 git commands to generate.