abbd00d3 |
1 | /* test-time-probe.c |
2 | * |
3 | * Test printk effect on timer interrupt. |
4 | */ |
5 | |
6 | |
7 | #include <linux/init.h> |
8 | #include <linux/module.h> |
9 | #include <linux/ltt-core.h> |
10 | |
11 | #define NR_LOOPS 20000 |
12 | |
13 | static int ltt_test_init(void) |
14 | { |
15 | unsigned int i; |
16 | |
17 | printk(KERN_ALERT "test init\n"); |
18 | |
19 | for(i=0; i<NR_LOOPS; i++) { |
20 | printk(KERN_ALERT "Flooding the console\n"); |
21 | } |
22 | printk(KERN_ALERT "test end\n"); |
23 | |
24 | return -EAGAIN; /* Fail will directly unload the module */ |
25 | } |
26 | |
27 | static void ltt_test_exit(void) |
28 | { |
29 | printk(KERN_ALERT "test exit\n"); |
30 | } |
31 | |
32 | module_init(ltt_test_init) |
33 | module_exit(ltt_test_exit) |
34 | |
35 | MODULE_LICENSE("GPL"); |
36 | MODULE_AUTHOR("Mathieu Desnoyers"); |
37 | MODULE_DESCRIPTION("Linux Trace Toolkit Test"); |
38 | |