[PATCH RFC 0/2] Tests for preemptoff and irqsoff tracers

From: Joel Fernandes
Date: Thu May 17 2018 - 21:02:39 EST


From: "Joel Fernandes (Google)" <joel@xxxxxxxxxxxxxxxxx>

Hi,
Here is test code and kselftest for testing the preemptoff and irqsoff
tracers. I am posting it separately just for early feedback since its
the first time I'm writing a kselftest.

I am planning to include these tests in the next series posting of
"Centralize and unify usage of preempt/irq tracepoints" [1]

By the way, other than these I have also completed testing with Ingo's
locking API test suite for [1]. I will include these and other results
in the v7 posting of [1].

[1] http://lkml.iu.edu/hypermail/linux/kernel/1805.0/04948.html

Joel Fernandes (Google) (2):
lib: Add module to simulate atomic sections for testing
{preempt,irqs}off tracers
kselftests: ftrace: Add tests for the preemptoff and irqsoff tracers

lib/Kconfig.debug | 9 +++
lib/Makefile | 1 +
lib/test_atomic_sections.c | 80 +++++++++++++++++++
tools/testing/selftests/ftrace/config | 3 +
.../test.d/preemptirq/irqsoff_tracer.tc | 74 +++++++++++++++++
5 files changed, 167 insertions(+)
create mode 100644 lib/test_atomic_sections.c
create mode 100644 tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc

Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Peter Zilstra <peterz@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
Cc: Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Thomas Glexiner <tglx@xxxxxxxxxxxxx>
Cc: Boqun Feng <boqun.feng@xxxxxxxxx>
Cc: Paul McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Todd Kjos <tkjos@xxxxxxxxxx>
Cc: Erick Reyes <erickreyes@xxxxxxxxxx>
Cc: Julia Cartwright <julia@xxxxxx>
Cc: kernel-team@xxxxxxxxxxx
Signed-off-by: Joel Fernandes (Google) <joel@xxxxxxxxxxxxxxxxx>

--
2.17.0.441.gb46fe60e1d-goog