2 * Simple stack backtrace regression test module
4 * (C) Copyright 2008 Intel Corporation
5 * Author: Arjan van de Ven <arjan@linux.intel.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; version 2
13 #include <linux/module.h>
14 #include <linux/sched.h>
15 #include <linux/delay.h>
17 static struct timer_list backtrace_timer;
19 static void backtrace_test_timer(unsigned long data)
21 printk("Testing a backtrace from irq context.\n");
22 printk("The following trace is a kernel self test and not a bug!\n");
25 static int backtrace_regression_test(void)
27 printk("====[ backtrace testing ]===========\n");
28 printk("Testing a backtrace from process context.\n");
29 printk("The following trace is a kernel self test and not a bug!\n");
32 init_timer(&backtrace_timer);
33 backtrace_timer.function = backtrace_test_timer;
34 mod_timer(&backtrace_timer, jiffies + 10);
37 printk("====[ end of backtrace testing ]====\n");
41 static void exitf(void)
45 module_init(backtrace_regression_test);
47 MODULE_LICENSE("GPL");
48 MODULE_AUTHOR("Arjan van de Ven <arjan@linux.intel.com>");