You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add selftests for the newly added cpumask iter.
- cpumask_iter_success
- The number of CPUs should be expected when iterating over the cpumask
- percpu data extracted from the percpu struct should be expected
- It can work in both non-sleepable and sleepable prog
- RCU lock is only required by bpf_iter_cpumask_new()
- It is fine without calling bpf_iter_cpumask_next()
- cpumask_iter_failure
- RCU lock is required in sleepable prog
- The cpumask to be iterated over can't be NULL
- bpf_iter_cpumask_destroy() is required after calling
bpf_iter_cpumask_new()
- bpf_iter_cpumask_destroy() can only destroy an initilialized iter
- bpf_iter_cpumask_next() must use an initilialized iter
The result as follows,
#64/37 cpumask/test_cpumask_iter:OK
#64/38 cpumask/test_cpumask_iter_sleepable:OK
#64/39 cpumask/test_cpumask_iter_sleepable:OK
#64/40 cpumask/test_cpumask_iter_next_no_rcu:OK
#64/41 cpumask/test_cpumask_iter_no_next:OK
#64/42 cpumask/test_cpumask_iter:OK
#64/43 cpumask/test_cpumask_iter_no_rcu:OK
#64/44 cpumask/test_cpumask_iter_no_destroy:OK
#64/45 cpumask/test_cpumask_iter_null_pointer:OK
#64/46 cpumask/test_cpumask_iter_next_uninit:OK
#64/47 cpumask/test_cpumask_iter_destroy_uninit:OK
#64 cpumask:OK
Signed-off-by: Yafang Shao <[email protected]>
0 commit comments