From: Mathieu Desnoyers Date: Thu, 2 Jun 2011 13:54:04 +0000 (-0400) Subject: Use larger number pool in test X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4310d6da1824a12ee70e897bcbed46d45e104a1e;p=urcu.git Use larger number pool in test Prior range was to stress-test collisions. Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_rbtree.c b/tests/test_urcu_rbtree.c index 1e7445d..89e1c90 100644 --- a/tests/test_urcu_rbtree.c +++ b/tests/test_urcu_rbtree.c @@ -358,8 +358,9 @@ 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() % 6); + key[i] = (void *)(unsigned long)(rand() % 2048); + //For more collisions + //key[i] = (void *)(unsigned long)(rand() % 6); node->begin = key[i]; node->end = (void *)((unsigned long) key[i] + 1); rcu_read_lock(); @@ -550,6 +551,8 @@ 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() % 2048); + //For more collisions global_key[i] = (void *)(unsigned long)(rand() % 6); node->begin = global_key[i]; node->end = (void *)((unsigned long) global_key[i] + 1);