16 #include <linux/module.h>
17 #include <linux/sched.h>
20 static void backtrace_test_normal(
void)
22 printk(
"Testing a backtrace from process context.\n");
23 printk(
"The following trace is a kernel self test and not a bug!\n");
30 static void backtrace_test_irq_callback(
unsigned long data)
36 static DECLARE_TASKLET(backtrace_tasklet, &backtrace_test_irq_callback, 0);
38 static void backtrace_test_irq(
void)
40 printk(
"Testing a backtrace from irq context.\n");
41 printk(
"The following trace is a kernel self test and not a bug!\n");
43 init_completion(&backtrace_work);
44 tasklet_schedule(&backtrace_tasklet);
48 #ifdef CONFIG_STACKTRACE
49 static void backtrace_test_saved(
void)
51 struct stack_trace
trace;
54 printk(
"Testing a saved backtrace.\n");
55 printk(
"The following trace is a kernel self test and not a bug!\n");
66 static void backtrace_test_saved(
void)
68 printk(
"Saved backtrace test skipped.\n");
72 static int backtrace_regression_test(
void)
74 printk(
"====[ backtrace testing ]===========\n");
76 backtrace_test_normal();
78 backtrace_test_saved();
80 printk(
"====[ end of backtrace testing ]====\n");
84 static void exitf(
void)