move everything out of trunk
[lttv.git] / tests / kernel / test-printk-effect.c
diff --git a/tests/kernel/test-printk-effect.c b/tests/kernel/test-printk-effect.c
new file mode 100644 (file)
index 0000000..a9429de
--- /dev/null
@@ -0,0 +1,38 @@
+/* test-time-probe.c
+ *
+ * Test printk effect on timer interrupt.
+ */
+
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/ltt-core.h>
+
+#define NR_LOOPS 20000
+
+static int ltt_test_init(void)
+{
+       unsigned int i;
+
+       printk(KERN_ALERT "test init\n");
+       
+       for(i=0; i<NR_LOOPS; i++) {
+               printk(KERN_ALERT "Flooding the console\n");
+       }
+       printk(KERN_ALERT "test end\n");
+       
+       return -EAGAIN; /* Fail will directly unload the module */
+}
+
+static void ltt_test_exit(void)
+{
+       printk(KERN_ALERT "test exit\n");
+}
+
+module_init(ltt_test_init)
+module_exit(ltt_test_exit)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mathieu Desnoyers");
+MODULE_DESCRIPTION("Linux Trace Toolkit Test");
+
This page took 0.037305 seconds and 4 git commands to generate.