selftests/livepatch: simplify test-klp-callbacks busy target tests
authorJoe Lawrence <joe.lawrence@redhat.com>
Wed, 3 Jun 2020 18:20:55 +0000 (14:20 -0400)
committerPetr Mladek <pmladek@suse.com>
Mon, 8 Jun 2020 08:36:10 +0000 (10:36 +0200)
commit547840bd5ae52a9d864abddcb91ea491a78d8199
tree8b81cec6c1d30e4f21ff079cd1c71e6a6c67ff54
parent9fb4c5250f10dc4d8257cd766991be690eb25c5b
selftests/livepatch: simplify test-klp-callbacks busy target tests

The test-klp-callbacks script includes a few tests which rely on kernel
task timings that may not always execute as expected under system load.
These may generate out of sequence kernel log messages that result in
test failure.

Instead of using sleep timing windows to orchestrate these tests, add a
block_transition module parameter to communicate the test purpose and
utilize flush_queue() to serialize the test module's task output.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20200603182058.109470-2-ycote@redhat.com
lib/livepatch/test_klp_callbacks_busy.c
tools/testing/selftests/livepatch/test-callbacks.sh