[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080211105145.GI7944@in.ibm.com>
Date: Mon, 11 Feb 2008 16:21:45 +0530
From: Ananth N Mavinakayanahalli <ananth@...ibm.com>
To: lkml <linux-kernel@...r.kernel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>, Andi Kleen <ak@...e.de>,
Christoph Hellwig <hch@...radead.org>, sam@...nborg.org,
Arjan van de Ven <arjan@...ux.intel.com>
Subject: [PATCH 7/8] Move backtrace tests to tests/
From: Ananth N Mavinakayanahalli <ananth@...ibm.com>
Move backtrace selftests to tests/
Signed-off-by: Ananth N Mavinakayanahalli <ananth@...ibm.com>
---
kernel/backtracetest.c | 48 ------------------------------------------------
kernel/Makefile | 1 -
lib/Kconfig.debug | 12 ------------
tests/Kconfig | 12 ++++++++++++
tests/Makefile | 1 +
tests/backtracetest.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 61 insertions(+), 61 deletions(-)
Index: linux-2.6.25-rc1/kernel/Makefile
===================================================================
--- linux-2.6.25-rc1.orig/kernel/Makefile
+++ linux-2.6.25-rc1/kernel/Makefile
@@ -35,7 +35,6 @@ obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-$(CONFIG_PM) += power/
obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
obj-$(CONFIG_KEXEC) += kexec.o
-obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o
obj-$(CONFIG_COMPAT) += compat.o
obj-$(CONFIG_CGROUPS) += cgroup.o
obj-$(CONFIG_CGROUP_DEBUG) += cgroup_debug.o
Index: linux-2.6.25-rc1/kernel/backtracetest.c
===================================================================
--- linux-2.6.25-rc1.orig/kernel/backtracetest.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Simple stack backtrace regression test module
- *
- * (C) Copyright 2008 Intel Corporation
- * Author: Arjan van de Ven <arjan@...ux.intel.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; version 2
- * of the License.
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/delay.h>
-
-static struct timer_list backtrace_timer;
-
-static void backtrace_test_timer(unsigned long data)
-{
- printk("Testing a backtrace from irq context.\n");
- printk("The following trace is a kernel self test and not a bug!\n");
- dump_stack();
-}
-static int backtrace_regression_test(void)
-{
- printk("====[ backtrace testing ]===========\n");
- printk("Testing a backtrace from process context.\n");
- printk("The following trace is a kernel self test and not a bug!\n");
- dump_stack();
-
- init_timer(&backtrace_timer);
- backtrace_timer.function = backtrace_test_timer;
- mod_timer(&backtrace_timer, jiffies + 10);
-
- msleep(10);
- printk("====[ end of backtrace testing ]====\n");
- return 0;
-}
-
-static void exitf(void)
-{
-}
-
-module_init(backtrace_regression_test);
-module_exit(exitf);
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Arjan van de Ven <arjan@...ux.intel.com>");
Index: linux-2.6.25-rc1/lib/Kconfig.debug
===================================================================
--- linux-2.6.25-rc1.orig/lib/Kconfig.debug
+++ linux-2.6.25-rc1/lib/Kconfig.debug
@@ -466,18 +466,6 @@ config BOOT_PRINTK_DELAY
BOOT_PRINTK_DELAY also may cause DETECT_SOFTLOCKUP to detect
what it believes to be lockup conditions.
-config BACKTRACE_SELF_TEST
- tristate "Self test for the backtrace code"
- depends on DEBUG_KERNEL
- default n
- help
- This option provides a kernel module that can be used to test
- the kernel stack backtrace code. This option is not useful
- for distributions or general kernels, but only for kernel
- developers working on architecture code.
-
- Say N if you are unsure.
-
config FAULT_INJECTION
bool "Fault-injection framework"
depends on DEBUG_KERNEL
Index: linux-2.6.25-rc1/tests/Kconfig
===================================================================
--- linux-2.6.25-rc1.orig/tests/Kconfig
+++ linux-2.6.25-rc1/tests/Kconfig
@@ -64,4 +64,16 @@ config KPROBES_SANITY_TEST
Say N if you are unsure.
+config BACKTRACE_SELF_TEST
+ tristate "Self test for the backtrace code"
+ depends on DEBUG_KERNEL
+ default n
+ help
+ This option provides a kernel module that can be used to test
+ the kernel stack backtrace code. This option is not useful
+ for distributions or general kernels, but only for kernel
+ developers working on architecture code.
+
+ Say N if you are unsure.
+
endif # KERNEL_TESTS
Index: linux-2.6.25-rc1/tests/Makefile
===================================================================
--- linux-2.6.25-rc1.orig/tests/Makefile
+++ linux-2.6.25-rc1/tests/Makefile
@@ -7,3 +7,4 @@ obj-$(CONFIG_RCU_TORTURE_TEST) += rcutor
obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o
obj-$(CONFIG_LKDTM) += lkdtm.o
obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
+obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o
Index: linux-2.6.25-rc1/tests/backtracetest.c
===================================================================
--- /dev/null
+++ linux-2.6.25-rc1/tests/backtracetest.c
@@ -0,0 +1,48 @@
+/*
+ * Simple stack backtrace regression test module
+ *
+ * (C) Copyright 2008 Intel Corporation
+ * Author: Arjan van de Ven <arjan@...ux.intel.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; version 2
+ * of the License.
+ */
+
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/delay.h>
+
+static struct timer_list backtrace_timer;
+
+static void backtrace_test_timer(unsigned long data)
+{
+ printk("Testing a backtrace from irq context.\n");
+ printk("The following trace is a kernel self test and not a bug!\n");
+ dump_stack();
+}
+static int backtrace_regression_test(void)
+{
+ printk("====[ backtrace testing ]===========\n");
+ printk("Testing a backtrace from process context.\n");
+ printk("The following trace is a kernel self test and not a bug!\n");
+ dump_stack();
+
+ init_timer(&backtrace_timer);
+ backtrace_timer.function = backtrace_test_timer;
+ mod_timer(&backtrace_timer, jiffies + 10);
+
+ msleep(10);
+ printk("====[ end of backtrace testing ]====\n");
+ return 0;
+}
+
+static void exitf(void)
+{
+}
+
+module_init(backtrace_regression_test);
+module_exit(exitf);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Arjan van de Ven <arjan@...ux.intel.com>");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists