summaryrefslogtreecommitdiff
path: root/tools/testing/ktest/examples/bootconfigs/tracing.bconf
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2021-06-18 18:26:47 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-06-24 22:34:33 +0300
commit171ec346fc8936f52e1184f1ab1377ee40052bfc (patch)
treedaf94b7bd165299f76fd76ed1e1cddc7b845b951 /tools/testing/ktest/examples/bootconfigs/tracing.bconf
parent2db7ab6b4c962e2499c86e8fe9cb1369ebaf91d1 (diff)
downloadlinux-171ec346fc8936f52e1184f1ab1377ee40052bfc.tar.xz
bootconfig/tracing/ktest: Add ktest examples of testing bootconfig
bootconfig is a new feature that appends scripts onto the initrd, and the kernel executes the scripts as an extended kernel command line. Need to add tests to test that the happened. To test the bootconfig properly, the initrd needs to be updated and the kernel rebooted. ktest is the perfect solution to perform these tests. Add a example bootconfig.conf in the tools/testing/ktest/examples/include and example bootconfig scripts in tools/testing/ktest/examples/bootconfig and also include verifier scripts that ktest will install on the target and run to make sure that the bootconfig options in the scripts took place after the target rebooted with the new initrd update. Link: https://lkml.kernel.org/r/20210618112647.6a81dec5@oasis.local.home Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest/examples/bootconfigs/tracing.bconf')
-rw-r--r--tools/testing/ktest/examples/bootconfigs/tracing.bconf33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/testing/ktest/examples/bootconfigs/tracing.bconf b/tools/testing/ktest/examples/bootconfigs/tracing.bconf
new file mode 100644
index 000000000000..bf117c78115a
--- /dev/null
+++ b/tools/testing/ktest/examples/bootconfigs/tracing.bconf
@@ -0,0 +1,33 @@
+ftrace {
+ tracer = function_graph;
+ options = event-fork, sym-addr, stacktrace;
+ buffer_size = 1M;
+ alloc_snapshot;
+ trace_clock = global;
+ events = "task:task_newtask", "initcall:*";
+ event.sched.sched_process_exec {
+ filter = "pid < 128";
+ }
+ instance.bar {
+ event.kprobes {
+ myevent {
+ probes = "vfs_read $arg2 $arg3";
+ }
+ myevent2 {
+ probes = "vfs_write $arg2 +0($arg2):ustring $arg3";
+ }
+ myevent3 {
+ probes = "initrd_load";
+ }
+ enable
+ }
+ }
+ instance.foo {
+ tracer = function;
+ tracing_on = false;
+ };
+}
+kernel {
+ ftrace_dump_on_oops = "orig_cpu"
+ traceoff_on_warning
+}