tests/rcutorture: mild documenting refactor of update thread
commita74c82c8dc73560d856dfabd22a6abb40ac907dc
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 25 Feb 2020 12:46:55 +0000 (25 12:46 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 25 Feb 2020 17:42:59 +0000 (25 17:42 +0000)
tree6ab9a80460a5f218fb2ce4d0f6e242c05ccd70fc
parentea70ccff651d10625cb051521d7ac029874008c3
tests/rcutorture: mild documenting refactor of update thread

This is mainly to help with reasoning what the test is trying to do.
We can move rcu_stress_idx to a local variable as there is only ever
one updater thread. I've also added an assert to catch the case where
we end up updating the current structure to itself which is the only
way I can see the mberror cases we are seeing on Travis.

We shall see if the rcutorture test failures go away now.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200225124710.14152-5-alex.bennee@linaro.org>
tests/rcutorture.c