From: Mathieu Desnoyers Date: Sun, 4 Mar 2012 20:50:07 +0000 (-0500) Subject: Allow tests to run on architectures without per-cpu call_rcu support X-Git-Tag: v0.7.0~40 X-Git-Url: https://git.lttng.org/?p=urcu.git;a=commitdiff_plain;h=8bcbd94a60f624c1faae1481fcb0888aec25b481 Allow tests to run on architectures without per-cpu call_rcu support Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_hash.c b/tests/test_urcu_hash.c index c8d8a89..aac1db8 100644 --- a/tests/test_urcu_hash.c +++ b/tests/test_urcu_hash.c @@ -1015,7 +1015,9 @@ int main(int argc, char **argv) count_writer = malloc(sizeof(*count_writer) * nr_writers); err = create_all_cpu_call_rcu_data(0); - assert(!err); + if (err) { + printf("Per-CPU call_rcu() worker threads unavailable. Using default global worker thread.\n"); + } if (memory_backend) { test_ht = _cds_lfht_new(init_hash_size, min_hash_alloc_size, diff --git a/tests/test_urcu_lfq.c b/tests/test_urcu_lfq.c index 11e7eb3..01a2781 100644 --- a/tests/test_urcu_lfq.c +++ b/tests/test_urcu_lfq.c @@ -381,7 +381,9 @@ int main(int argc, char **argv) count_dequeuer = malloc(2 * sizeof(*count_dequeuer) * nr_dequeuers); cds_lfq_init_rcu(&q, call_rcu); err = create_all_cpu_call_rcu_data(0); - assert(!err); + if (err) { + printf("Per-CPU call_rcu() worker threads unavailable. Using default global worker thread.\n"); + } next_aff = 0; diff --git a/tests/test_urcu_lfs.c b/tests/test_urcu_lfs.c index 883fd0c..b48a35f 100644 --- a/tests/test_urcu_lfs.c +++ b/tests/test_urcu_lfs.c @@ -379,7 +379,9 @@ int main(int argc, char **argv) count_dequeuer = malloc(2 * sizeof(*count_dequeuer) * nr_dequeuers); cds_lfs_init_rcu(&s); err = create_all_cpu_call_rcu_data(0); - assert(!err); + if (err) { + printf("Per-CPU call_rcu() worker threads unavailable. Using default global worker thread.\n"); + } next_aff = 0;