aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/rcutorture
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2020-01-23 09:19:01 -0800
committerPaul E. McKenney <paulmck@kernel.org>2020-02-20 15:59:59 -0800
commit80c503e0e68fbe271680ab48f0fe29bc034b01b7 (patch)
tree0cb58bcf7d475c1bdf7fd1d477b2fb20bbe8cb22 /tools/testing/selftests/rcutorture
parentLinux 5.6-rc1 (diff)
downloadwireguard-linux-80c503e0e68fbe271680ab48f0fe29bc034b01b7.tar.xz
wireguard-linux-80c503e0e68fbe271680ab48f0fe29bc034b01b7.zip
locktorture: Print ratio of acquisitions, not failures
The __torture_print_stats() function in locktorture.c carefully initializes local variable "min" to statp[0].n_lock_acquired, but then compares it to statp[i].n_lock_fail. Given that the .n_lock_fail field should normally be zero, and given the initialization, it seems reasonable to display the maximum and minimum number acquisitions instead of miscomputing the maximum and minimum number of failures. This commit therefore switches from failures to acquisitions. And this turns out to be not only a day-zero bug, but entirely my own fault. I hate it when that happens! Fixes: 0af3fe1efa53 ("locktorture: Add a lock-torture kernel module") Reported-by: Will Deacon <will@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Acked-by: Will Deacon <will@kernel.org> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture')
0 files changed, 0 insertions, 0 deletions