rcu-tasks: Add RCU-tasks self tests
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Wed, 9 Dec 2020 20:27:32 +0000 (21:27 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 4 Jan 2021 23:54:49 +0000 (15:54 -0800)
commitbfba7ed084f8ab0269a5a1d2f51b07865456c334
tree56654b60b67210f54c3ce2aa2b26c735bfab2fe3
parent7dffe01765d9309b8bd5505503933ec0ec53d192
rcu-tasks: Add RCU-tasks self tests

This commit adds self tests for early-boot use of RCU-tasks grace periods.
It tests all three variants (Rude, Tasks, and Tasks Trace) and covers
both synchronous (e.g., synchronize_rcu_tasks()) and asynchronous (e.g.,
call_rcu_tasks()) grace-period APIs.

Self-tests are run only in kernels built with CONFIG_PROVE_RCU=y.

Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
[ paulmck: Handle CONFIG_PROVE_RCU=n and identify test cases' callbacks. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tasks.h